Tài liệu học CCNA kỳ 2 mod6 routing

39 283 0
Tài liệu học CCNA kỳ 2 mod6 routing

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

1 Module 6 - Routing and Routing Protocols CCNA 2 version 3.1 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 2 Overview • Explain the significance of static routing • Configure static and default routes • Verify and troubleshoot static and default routes • Identify the classes of routing protocols • Identify distance vector routing protocols • Identify link-state routing protocols • Describe the basic characteristics of common routing protocols • Identify interior gateway protocols • Identify exterior gateway protocols • Enable Routing Information Protocol (RIP) on a router 2 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 3 The Routing Table • Before we begin lets see lets discuss the routing table and directly connected routes. • This is information which is not in the curriculum, but will give you a better understanding of what is taking place. Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 4 The Routing Table prior to any interface configuration • The command to view the IP Routing table is: (priviledge or user mode) Router# show ip route • Currently, no routes in the routing table. Directly Connected Networks and the IP Routing Table RTA#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set RTA# 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.0.0.0/8 s0 s0 s1s1e0 e0 3 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 5 • Adding an ip address/mask to an interface tells the router that it is a member, “Directly Connected” to that network – just like when a host computer is configured with an ip address/mask. • Notice the route is shown with the subnet mask and the “exit-interface.” • Don’t forget the “no shutdown” • Don’t forget the interface must be in “up” and “up” Directly Connected Networks and the IP Routing Table RTA(config)#inter e 0 RTA(config-if)#ip add 192.168.2.1 255.255.255.0 RTA(config-if)#no shutdown RTA#show ip route Codes: C - connected, <Other codes and gateway information omitted> C 192.168.2.0/24 is directly connected, Ethernet0 RTA# 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.0.0.0/8 s0 s0 s1s1e0 e0 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 6 Directly Connected Networks and the IP Routing Table RTA#show ip route Codes: C - connected, <Other codes and gateway information omitted> C 172.16.0.0/16 is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 RTB#show ip route Codes: C - connected, <Other codes and gateway information omitted> C 172.16.0.0/16 is directly connected, Serial0 C 192.168.1.0/24 is directly connected, Serial1 RTC#show ip route Codes: C - connected, <Other codes and gateway information omitted> C 10.0.0.0/8 is directly connected, Ethernet0 C 192.168.1.0/24 is directly connected, Serial1 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.0.0.0/8 s0 s0 s1s1e0 e0 The Routing Tables • Notice that the routers only know about their own directly connected networks. • They are not sharing routing information because we have not configured any static routes or dynamic routin g p rotocols. 4 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 7 Configuring an interface which has a subnet mask greater than the classful mask • We will discuss this in much more detail later using the presentation – “The Routing Table.” • For now, notice that when the subnet mask is not a classful mask, but a subnetted /16 mask. • The routing table information shows the route to the subnetted network • The mask is shown in the above, “parent” classful network. Directly Connected Networks and the IP Routing Table RTC(config)#inter e 0 RTC(config-if)#ip add 10.1.0.1 255.255.0.0 RTC#show ip route Codes: C - connected, <Other codes and gateway information omitted> 10.0.0.0/16 is subnetted, 1 subnets C 10.1.0.0 is directly connected, Ethernet0 C 192.168.1.0/24 is directly connected, Serial1 RTC# 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.1.0.0/16 s0 s0 s1s1e0 e0 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 8 Routing – Only directly connected hosts (routers) • Routers can only reach networks known about in its own routing table. Directly Connected Networks and the IP Routing Table RTA#show ip route C 172.16.0.0/16 is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 RTA#ping 172.16.0.1 !!!!! RTA#ping 172.16.0.2 !!!!! RTA#ping 192.168.1.1 RTA#ping 192.168.1.2 RTA#ping 10.1.0.1 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.1.0.0/16 s0 s0 s1s1e0 e0 5 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 9 Routing– Routing tables must have the necessary network routes • Question: If RTA can ping RTB’s 172.16.0.2 interface why can’t it ping RTB’s 192.168.1.1 interface? - RTA does not have a route to it in its routing table. • Question: Would an extended ping from RTA, using the source IP address of 192.168.2.1 be able to ping 172.16.0.2 on RTB? Why or why not? Where does the echo request or echo reply fail? Directly Connected Networks and the IP Routing Table RTA#show ip route C 172.16.0.0/16 is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 RTA#ping 172.16.0.1 Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms RTA#ping 172.16.0.2 !!!!! 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.1.0.0/16 s0 s0 s1s1e0 e0 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 10 Routing– Routing tables must have the necessary network routes • Question: Would an extended ping from RTA, using the source IP address of 192.168.2.1 be able to ping 172.16.0.2 on RTB? Why or why not? • The echo request from RTA reaches RTB because RTA has a route to 172.16.0.0/16 in its routing table. • However, the echo reply from RTB back to RTA fails, because RTB does not have a route for 192.168.2.0/24 in its routing table. Directly Connected Networks and the IP Routing Table RTA#show ip route C 172.16.0.0/16 is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 RTB#show ip route Codes: C - connected, <Other codes and gateway information omitted> C 172.16.0.0/16 is directly connected, Serial0 C 192.168.1.0/24 is directly connected, Serial1 RTA#ping Protocol [ip]: Target IP address: 172.16.0.2 Extended commands [n]: y Source address or interface: 192.168.2.1 Sending 5, 100-byte ICMP Echos to 172.16.0.2, timeout is 2 seconds: 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.1.0.0/16 s0 s0 s1s1e0 e0 6 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 11 Routing Table Principles Revisited (Zinin, Cisco IP Routing) • Every router makes its decision alone, based on the information it has in its own routing table. • The fact that one router has certain information in its routing table does not mean that other routers have the same information. • Routing information about a path from one network to another does not provide routing information about the reverse, or return path. Directly Connected Networks and the IP Routing Table RTA#show ip route Codes: C - connected, <Other codes and gateway information omitted> C 172.16.0.0/16 is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 RTB#show ip route Codes: C - connected, <Other codes and gateway information omitted> C 172.16.0.0/16 is directly connected, Serial0 C 192.168.1.0/24 is directly connected, Serial1 RTC#show ip route Codes: C - connected, <Other codes and gateway information omitted> 10.0.0.0/16 is subnetted, 1 subnets C 10.1.0.0 is directly connected, Ethernet0 C 192.168.1.0/24 is directly connected, Serial1 172.16.0.0/16 192.168.1.0/24 .1 .1.2 .2 RTA RTB RTC 192.168.2.0/24 .1 .1 10.1.0.0/16 s0 s0 s1s1e0 e0 Back to the curriculum… 7 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 13 Routing Types Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 14 Static Route Operation Hoboken#show ip route Codes: C - connected, S - static, S 172.16.1.0/24 [1/0] is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 8 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 15 ip route command RTR(config)# ip route prefix mask {address | interface} [distance] [tag tag] [permanent] • prefix IP route prefix for the destination. • mask Prefix mask for the destination. • address IP address of the “next hop” that can be used to reach that network. • interface Network interface to use (exit-interface) • distance (Optional) An administrative distance. • tag tag (Optional) Tag value that can be used as a "match" value for controlling redistribution via route maps. (CCNP Advanced Routing) • Permanent (Optional) Specifies that the route will not be removed, even if the interface shuts down. (CCNP Advanced Routing) Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 16 Static Route Operation • If the exit interface (gateway) is “down” the static route will not be put in the routing table. 9 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 17 Static Route Operation • If the router cannot reach the outgoing interface that is being used in the route, the route will not be installed in the routing table. • This means if that interface is down, the route will not be placed in the routing table. Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 18 Administrative Distance and Metric • [ administrative distance / routing metric (or cost) ] • The cost for all static routes is “0” • The default administrative distance for static routes is “1” Hoboken#show ip route Codes: C - connected, S - static, S 172.16.1.0/24 [1/0] is directly connected, Serial0 C 192.168.2.0/24 is directly connected, Ethernet0 10 Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 19 Administrative Distance • Administrative Distance is the “trustworthiness” of the routing information. • Lower the administrative distance the more trustworthy the information. • If the router hears about a route to the same network from more than one source it will use the administrative distance to decide which route to put in the routing table. Họcviệnmạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 20 Examples from the curriculum [...]... Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 29 Static Routing 1 92. 168 .2. 0 /24 e0 1 72. 16.0.0/16 RTA 1 s0 s0 1 1 92. 168.1.0 /24 RTB 2 s1 s1 1 10.1.0.0/16 RTC 2 e0 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 RTA(config)#ip route 10.1.0.0 25 5 .25 5.0.0 1 72. 16.0 .2 RTB(config)#ip route 1 92. 168 .2. 0 25 5 .25 5 .25 5.0 1 72. 16.0.1 RTB(config)#ip route 10.1.0.0 25 5 .25 5.0.0 1 92. 168.1 .2. .. Khoa - Website: www.ciscobachkhoa.com 28 14 Static Routing 1 92. 168 .2. 0 /24 e0 1 72. 16.0.0/16 RTA s0 1 1 s0 1 92. 168.1.0 /24 RTB 2 s1 s1 1 10.1.0.0/16 RTC e0 2 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 2 1 RTA#show ip route Codes: C - connected, S - static, C 1 72. 16.0.0/16 is directly connected, Serial0 S 1 92. 168.1.0 /24 [1/0] via 1 72. 16.0 .2 C 1 92. 168 .2. 0 /24 is directly connected, Ethernet0... the routing table Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 27 Static Routing 1 92. 168 .2. 0 /24 e0 1 1 72. 16.0.0/16 RTA s0 s0 1 2 1 92. 168.1.0 /24 RTB s1 s1 1 10.1.0.0/16 RTC e0 2 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 RTA#show ip route Codes: C - connected, S - static, C 1 72. 16.0.0/16 is directly connected, Serial0 S 1 92. 168.1.0 /24 [1/0] via 1 72. 16.0 .2 C 1 92. 168 .2. 0 /24 ... via 1 72. 16.0 .2 C 1 92. 168 .2. 0 /24 is directly connected, Ethernet0 RTA#ping 10.1.0.1 !!!!! RTA#ping 1 92. 168.1 .2 !!!!! RTA#ping 1 92. 168.1.1 !!!!! Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 31 Static Routing – Recursive Lookups 1 92. 168 .2. 0 /24 e0 1 72. 16.0.0/16 RTA s0 1 1 s0 2 1 92. 168.1.0 /24 RTB s1 s1 1 10.1.0.0/16 RTC e0 2 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 2 1... Static Routing 1 92. 168 .2. 0 /24 e0 1 72. 16.0.0/16 RTA s0 1 1 s0 1 92. 168.1.0 /24 RTB 2 s1 s1 1 10.1.0.0/16 RTC e0 2 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 RTA(config)#ip route 10.1.0.0 25 5 .25 5.0.0 1 72. 16.0 .2 RTA#show ip route Codes: C - connected, S - static, C 1 72. 16.0.0/16 is directly connected, Serial0 10.0.0.0/16 is subnetted, 1 subnets S 10.1.0.0 [1/0] via 1 72. 16.0 .2 S 1 92. 168.1.0 /24 ... Serial0 S 1 92. 168.1.0 /24 [1/0] via 1 72. 16.0 .2 C 1 92. 168 .2. 0 /24 is directly connected, Ethernet0 Basic static route example • Be sure to use the proper subnet mask! Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 26 13 Static Routing 1 92. 168 .2. 0 /24 e0 1 72. 16.0.0/16 RTA s0 s0 1 1 92. 168.1.0 /24 RTB 2 1 s1 s1 1 10.1.0.0/16 RTC e0 2 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 RTA#show... Static Routing – Ethernet interfaces 1 92. 168 .2. 0 /24 e0 1 1 72. 16.0.0/16 RTA e1 s0 1 e0 s0 1 92. 168.1.0 /24 RTB 2 s1 s1 1 10.1.0.0/16 RTC 2 e0 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 eth 1 1 72. 16.0 .2 RTA#show ip route Codes: C - connected, S - static, C 1 72. 16.0.0/16 is directly connected, Ethernet1 S 1 92. 168.1.0 /24 [1/0] via 1 72. 16.0 .2 Ethernet1 C 1 92. 168 .2. 0 /24 is directly connected, Ethernet0... address.) Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 35 Static Routing – Point-to-Point Links 1 92. 168 .2. 0 /24 e0 1 1 72. 16.0.0/16 RTA s0 s0 1 2 1 92. 168.1.0 /24 RTB s1 s1 1 10.1.0.0/16 RTC e0 2 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 RTA#show ip route Codes: C - connected, S - static, C 1 72. 16.0.0/16 is directly connected, Serial0 S 1 92. 168.1.0 /24 [1/0] via 1 72. 16.0 .2 C... be correctly delivered Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 25 Static Routing 1 92. 168 .2. 0 /24 e0 1 1 72. 16.0.0/16 RTA s0 s0 1 2 1 92. 168.1.0 /24 RTB s1 s1 1 2 10.1.0.0/16 RTC e0 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 1 72. 16.0 .2 Network/subnet route Intermediate-Address (usually “next-hop”) RTA#show ip route Codes: C - connected, S - static, C 1 72. 16.0.0/16 is directly... in the routing table Học viện mạng Cisco Bách Khoa - Website: www.ciscobachkhoa.com 34 17 Static Routing – Point-to-Point Links 1 92. 168 .2. 0 /24 e0 1 72. 16.0.0/16 RTA 1 92. 168.1.0 /24 s0 1 1 s0 RTB 2 10.1.0.0/16 s1 s1 1 RTC 2 e0 1 RTA(config)#ip route 1 92. 168.1.0 25 5 .25 5 .25 5.0 serial 0 RTA#show ip route Codes: C - connected, S - static, C 1 72. 16.0.0/16 is directly connected, Serial0 S 1 92. 168.1.0 /24 is directly

Ngày đăng: 05/07/2015, 22:40

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan