GIÁO TRÌNH CCNA PHẦN 3

66 171 0
GIÁO TRÌNH CCNA   PHẦN 3

Đ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

CCNA Tài liӋu dành cho hӑc viên Ph̯n :Routing BÀI 12: ĈӎNH TUYӂN TƬNH (Static route) Giӟi thiӋu : Ĉ͓nh tuy͇n (Routing) trình mà Router thӵc thi sӱ ÿӇ chuyӇn mӝt gói tin(Packet) tӯ mӝt ÿӏa chӍ nguӗn (soucre)ÿӃn mӝt ÿӏa chӍ ÿích(destination) mҥng.Trong trình Router phҧI dӵa vào nhӳng thông tin ÿӏnh tuyӃn ÿӇ ÿѭa nhӳng quyӃt ÿӏnh nhҵm chuyӇn gói tin ÿӃn nhӳng ÿӏa chӍ ÿích ÿã ÿӏnh trѭӟc.Có hai loҥI ÿӏnh tuyӃn cѫ bҧn Ĉ͓nh tuy͇n tƭnh (Static Route) Ĉ͓nh tuy͇n ÿ͡ng (Dynamic Route) Ĉ͓nh tuy͇n tƭnh (Static Route) trình ÿӏnh tuyӃn mà ÿӇ thӵc hiӋn bҥn phҧI cҩu hình bҵng tay(manually) tӯng ÿӏa chӍ ÿích cө thӇ cho Router Mӝt dҥng mһc ÿӏnh cӫa ÿӏnh tuyӃn tƭnh Default Routes, dҥng ÿѭӧc sӱ dөng cho mҥng cөt (Stub Network) Ĉ͓nh tuy͇n ÿ͡ng (Dynamic Route) ÿây mà mӝt dҥng ÿӏnh tuyӃn mà ÿѭӧc cҩu hình ӣ dҥng này, Router sӁ sӱ dөng nhӳng giao thӭc ÿӏnh tuyӃn nhѭ RIP(Routing Information Protocol),OSPF(Open Shortest Path Frist),IGRP(Interior Gateway Routing Protocol)… ÿӇ thӵc thi viӋc ÿӏnh tuyӃn mӝt cách tӵ ÿӝng (Automatically) mà bҥn không phҧi cҩu hình trӵc tiӃp bҵng tay Mô tҧ lab ÿӗ hình : Ĉӗ hình lab nhѭ hình, PC nӕi vӟi router bҵng cáp chéo Hai router nӕi vӟi bҵng cáp serial Ĉӏa chӍ IP cӫa interface PC nhѭ hình vӁ Bài lab giúp bҥn thӵc hiӋn cҩu hình ÿӏnh tuyӃn tƭnh cho router, làm cho router có khҧ “nhìn thҩy “ÿѭӧc cҧ mҥng Cҩu hình Ĉӏnh tuyӃn tƭnh (Static Route) Chúng ta cҩu hình cho router PC nhѭ sau : Router Vsic1 hostname Vsic1 ! logging rate-limit console 10 except errors ! ip subnet-zero no ip finger ! no ip dhcp-client network-discovery ! interface Ethernet0 ip address 10.0.0.1 255.255.255.0 ! interface Serial0 VSIC Education Corporation Trang 70 CCNA Tài liӋu dành cho hӑc viên ip address 192.168.0.1 255.255.255.0 ! interface Serial1 no ip address shutdown ! ip kerberos source-interface any ip classless ip http server ! line transport input none line aux line vty ! end Router Vsic2 hostname Vsic2 ! ip subnet-zero ! interface Ethernet0 ip address 10.0.1.1 255.255.255.0 ! interface Serial0 ip address 192.168.0.2 255.255.255.0 clockrate 56000 ! interface Serial1 no ip address shutdown ! ip classless ip http server ! line line aux line vty ! end Host : IP 10.0.0.2 Subnetmask: 255.255.255.0 Gateway: 10.0.0.1 Host : IP: 10.0.1.2 VSIC Education Corporation Trang 71 CCNA Tài liӋu dành cho hӑc viên Subnetmask: 255.255.255.0 Gateway:10.0.1.1 Chúng ta tiӃn hành kiӇm tra kӃt nӕi bҵng cách : Ping tӯ Host1 sang ÿӏa chӍ 10.0.0.1 Ping tӯ Host sang ÿӏa chӍ 192.168.0.1 Ping tӯ Host sang ÿӏa chӍ 192.168.0.2 Mӣ chӃ ÿӝ debug tҥi Router Vsic2 vsic2#debug ip packet IP packet debugging is on Thӵc hiӋn lҥi lӋnh ping ta thҩy vsic2# 00:33:59: IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 00:33:59: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable VSIC Education Corporation Trang 72 CCNA Tài liӋu dành cho hӑc viên 00:34:04: IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 00:34:04: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable 00:34:09: IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 00:34:09: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable 00:34:14: IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 00:34:14: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable Ping tӯ Host sang ÿӏa chӍ 10.0.1.1 Mӣ chӃ ÿӝ debug tҥi Router Vsic1 vsic1#debug ip packet IP packet debugging is on Thӵc hiӋn lҥi lӋnh Ping: vsic1# 00:36:41: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable 00:36:41: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending 00:36:42: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable 00:36:42: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending 00:36:43: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable 00:36:43: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending 00:36:44: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable 00:36:44: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending LӋnh Ping ӣ trѭӡng hӧp không thӵc hiӋn thành công, ta dùng lӋnh debug ip packet ÿӇ mӣ chӃ ÿӝ debug tҥi Router, ta thҩy Router Vsic vүn nhұn ÿѭӧc gói packet tӯ host1 ta ping ÿӏa chӍ 192.168.0.2, nhiên host không liên kӃt trӵc tiӃp vӟi Router Vsic nên gói Packet ICMP trҧ vӅ lӋnh ping ÿӏa chӍ ÿích,do vұy gói Packet bӏ hӫy,ÿiӅu dҭn ÿӃn lӋnh Ping không thành công Ӣ trѭӡng hӧp ta ping tӯ Host1 sang ÿӏa chӍ 10.0.1.1 gói packet bӏ mҩt tҥi router vsic1 Router vsic1 không xác ÿӏnh ÿѭӧc ÿӏa chӍ ÿích cҫn ÿӃn bҧng ÿӏnh tuyӃn(ÿӏa chӍ không liên kӃt trӵc tiӃp vӟi Router vsic1).Ta so sánh vӏ trí Unroutable kӃt quҧ debug packet ӣ cҩu lӋnh ping ÿӇ thҩy ÿѭӧc sӵ khác ĈӇ thӵc hiӋn thành công kӃt nӕi này,ta phҧi thӵc hiӋn cҩu hình Static Route cho Router Vsic1 Router Vsic2 nhѭ sau: vsic1(config)#ip route 10.0.1.0 255.255.255.0 s0 vsic1(config)#exit VSIC Education Corporation Trang 73 CCNA Tài liӋu dành cho hӑc viên Bҥn thӵc hiӋn lӋnh Ping tӯ Host1 sang Host Bҥn thӵc hiӋn lӋnh Ping tӯ Router Vsic2 sang Host1 vsic2#ping 10.0.0.2 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is seconds: Success rate is percent (0/5) ĈӇ thӵc hiӋn thành công lӋnh Ping bҥn phҧi thӵc hiӋn cҩu hình Static route cho Router vsic nhѭ sau Vsic2(config)#ip route 10.0.0.0 255.255.255.0 s0 Vsic2(config)#^Z Lúc tӯ Host2 bҥn có thӇ Ping thҩy ÿӏa chӍ Trên Router Vsic Host1 VSIC Education Corporation Trang 74 CCNA Tài liӋu dành cho hӑc viên Chúng ta kiӇm tra bҧng ÿӏnh tuyӃn cӫa router bҵng lӋnh show ip route vsic1#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 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set 10.0.0.0/24 is subnetted, subnets C 10.0.0.0 is directly connected, Ethernet0 S 10.0.1.0 is directly connected, Serial0 C 192.168.0.0/24 is directly connected, Serial0 S bi͋u th͓ nhͷng k͇t n͙i thông qua ÿ͓nh tuy͇n tƭnh C bi͋u th͓ nhͷng k͇t n͙i tr͹c ti͇p Vsic2#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 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set S C C 10.0.0.0/24 is subnetted, subnets 10.0.0.0 is directly connected, Serial0 10.0.1.0 is directly connected, Ethernet0 192.168.0.0/24 is directly connected, Serial0 Thӵc hiӋn lӋnh Show run tҥi Router ÿӇ xem lҥi cҩu hình ÿӏnh tuyӃn: vsic1#show run Building configuration ip kerberos source-interface any ip classless VSIC Education Corporation Trang 75 CCNA Tài liӋu dành cho hӑc viên ip route 10.0.1.0 255.255.255.0 Serial0 ip http server ! end vsic2#show run Building configuration ip classless ip route 10.0.0.0 255.255.255.0 Serial0 ip http server ! End Bҥn ÿã thӵc hiӋn thành công viӋc ÿӏnh tuyӃn cho Router kӃt nӕi ÿѭӧc vӟi cҧ mҥng cӫa chúng, bҥn cNJng có thӇ mӣ rӝng ÿӗ hình thêm vӟi 3, hay hop ÿӇ thӵc hành viӋc cҩu hình ÿӏnh tuyӃn tƭnh nhiên bҥn thҩy rõ viӋc cҩu hình tѭѫng ÿӕi rҳc rӕi dài dòng nhҩt ÿӕi vӟi môi trѭӡng Internet bên ngoài,vì vұy bҥn sӁ phҧi thӵc hiӋn viӋc cҩu hình ÿӏnh tuyӃn ÿӝng cho Router ӣ sau Tӵ thӵc hành bҵng Dynagen : Ĉҫu tiên chӍnh file cҩu hình lab12static.net ÿӇ có ÿӏa chӍ card mҥng phù hӧp # Simple lab [localhost] [[3640]] image = \Program Files\Dynamips\images\C3640_IS_MZ122_3.BIN # On Linux / Unix use forward slashes: # image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image ram=96 [[ROUTER VSIC1]] model=3640 s1/0 = VSIC2 s1/0 F0/0 = NIO_gen_eth:\Device\NPF_{7211A84E-B69B-4DDF-B780-7835124CF83B} [[router VSIC2]] model=3640 F0/0 = NIO_gen_eth:\Device\NPF_{7211A84E-B69B-4DDF-B780-7835124CF83B} # No need to specify an adapter here, it is taken care of # by the interface specification under Router VSIC1 Ta ÿѭӧc mô hình lab sau: VSIC Education Corporation Trang 76 CCNA Tài liӋu dành cho hӑc viên Ta sӱ dөng VMware ÿӇ giҧ lâp cho PC2 Card mҥng VMware ÿѭӧc bridge vӟi card mҥng cӫa PC, fa0/0 cӫa VSIC1, VSIC2 Trong ÿó VSIC1 PC1 thuӝc LAN thӭ nhҩt, VSIC2 PC2 thuӝc LAN thӭ Ta có thӇ thӱ kӃt nӕi giӳa PC1 Router VSIC1 (ÿã cҩu hình ip fa0/0) bҵng cách sӱ dөng lӋnh ping VSIC Education Corporation Trang 77 CCNA Tài liӋu dành cho hӑc viên Bây giӡ ta cҩu hình static route giӳa router giӕng nhѭ thӵc hành ӣ Sau ÿó test lҥi bҵng cách ping tӯ PC1 ÿӃn PC2 VSIC Education Corporation Trang 78 CCNA Tài liӋu dành cho hӑc viên BÀI 13: RIP( ROUTING INFORMATION PROTOCOL) Giӟi thiӋu : RIP (Routing Information Protocol) mӝt giao thӭc ÿӏnh tuyӃn dùng ÿӇ quҧng bá thông tin vӅ ÿӏa chӍ mà muӕn quҧng bá bên thu thұp thông tin ÿӇ hình thành bҧng ÿӏnh tuyӃn (Routing Table)cho Router Ĉây loҥi giao thӭc Distance Vector sӱ dөng tiêu chí chӑn ÿѭӡng chӫ yӃu dӵa vào sӕ hop (hop count) ÿӏa chӍ mà Rip muӕn quҧng bá ÿѭӧc gӱi ÿi ӣ dҥng Classful (ÿӕi vӟi RIP verion 1) Classless (ÿӕi vӟi RIP version 2) Vì sӱ dөng tiêu chí ÿӏnh tuyӃn hop count bӏ giӟi hҥn ӣ sӕ hop 15 nên giao thӭc chӍ ÿѭӧc sӱ dөng mҥng nhӓ (dѭӟi 15 hop) Mô tҧ lab ÿӗ hình : Các PC nӕi vӟi router bҵng cáp chéo, hai router nӕi vӟi bҵng cáp serial Ĉӏa chӍ IP cӫa interface PC nhѭ hình Bài thӵc hành giúp bҥn thӵc hiӋn ÿѭӧc viӋc cҩu hình cho mҥng có thӇ liên lҥc ÿѭӧc vӟi bҵng giao thӭc RIP Cҩu hình: Trѭӟc tiên bҥn cҩu hình cho thiӃt bӏ nhѭ sau: Router Vsic1 Vsic1#show run Building configuration Current configuration : 609 bytes ! version 12.2 no service single-slot-reload-enable service timestamps debug uptime service timestamps log uptime no service password-encryption VSIC Education Corporation Trang 79 CCNA Tài liӋu dành cho hӑc viên Vsic1(config-router)#net 10.0.0.0 0.0.255.255 area Vsic2(config)#router ospf Vsic2(config-router)#net 192.168.1.0 0.0.0.255 area Vsic2(config-router)#net 170.1.0.0 0.0.255.255 area Vsic2(config-router)#net 11.1.0.0 0.255.255.255 area Vsic3(config)#router ospf Vsic3(config-router)#net 170.1.0.0 0.0.255.255 area Vsic3(config-router)#net 12.1.0.0 0.0.0.3 area Chúng ta cҩu hình OSPF cho cҧ ba router mӝt area (backbone) Ngoài có thӇ cҩu hình OSPF cho cҧ ba router theo cách sau : Vsic1(config)#router ospf Vsic1(config-router)#net 192.168.1.1 0.0.0.0 area Vsic1(config-router)#net 10.0.0.1 0.0.0.0 area Vsic2(config)#router ospf Vsic2(config-router)#net 192.168.1.2 0.0.0.0 area Vsic2(config-router)#net 170.1.0.1 0.0.0.0 area Vsic2(config-router)#net 11.1.0.1 0.0.0.0 area Vsic3(config)#router ospf Vsic3(config-router)#net 170.1.0.2 0.0.0.0 area Vsic3(config-router)#net 12.1.0.1 0.0.0.0 area Khi quҧng bá cho OSPF có thӇ quҧng bá theo hai cách : quҧng bá ÿѭӡng mҥng (cách ÿҫu) hoһc quҧng bá interface ÿó (cách sau) NӃu quҧng bá interface wildcard mask phҧi 0.0.0.0 Sau quҧng bá mҥng cӫa router xong kiӇm tra lҥi bҧng ÿӏnh tuyӃn cӫa router bҵng câu lӋnh show ip route Vsic1#sh ip route Gateway of last resort is not set O 170.1.0.0/16 [110/128] via 192.168.1.2, 01:20:18, Serial0 10.0.0.0/16 is subnetted, subnets C 10.0.0.0 is directly connected, Loopback0 11.0.0.0/32 is subnetted, subnets O 11.1.0.1 [110/65] via 192.168.1.2, 01:20:18, Serial0 12.0.0.0/32 is subnetted, subnets O 12.1.0.1 [110/129] via 192.168.1.2, 01:20:18, Serial0 C 192.168.1.0/24 is directly connected, Serial0 Vsic2#sh ip route Gateway of last resort is not set C 170.1.0.0/16 is directly connected, Serial1 10.0.0.0/32 is subnetted, subnets O 10.0.0.1 [110/65] via 192.168.1.1, 01:20:38, Serial0 C 11.0.0.0/8 is directly connected, Loopback0 12.0.0.0/32 is subnetted, subnets O 12.1.0.1 [110/65] via 170.1.0.2, 01:20:38, Serial1 VSIC Education Corporation Trang 121 CCNA Tài liӋu dành cho hӑc viên C 192.168.1.0/24 is directly connected, Serial0 Vsic3#sh ip route Gateway of last resort is not set C 170.1.0.0/16 is directly connected, Serial0 10.0.0.0/32 is subnetted, subnets O 10.0.0.1 [110/129] via 170.1.0.1, 00:00:20, Serial0 11.0.0.0/32 is subnetted, subnets O 11.1.0.1 [110/65] via 170.1.0.1, 00:00:20, Serial0 12.0.0.0/30 is subnetted, subnets C 12.1.0.0 is directly connected, Loopback0 O 192.168.1.0/24 [110/128] via 170.1.0.1, 00:00:20, Serial0 Nhұn xét : router ÿã biӃt ÿѭӧc tҩt cҧ mҥng ÿӗ hình cӫa Các route router biӃt ÿѭӧc nhӡ giao thӭc OSPF ÿѭӧc ÿánh O ӣ ÿҫu route Trong kӃt quҧ route ÿó ÿѭӧc in ÿұm Bây giӡ sӁ kiӇm tra lҥi xem mҥng có thӇ liên lҥc ÿѭӧc vӟi hay chѭa bҵng cách lҫn lѭӧt ÿӭng tӯng router ping ÿӃn mҥng không nӕi trӵc tiӃp vӟi Vsic3#ping 11.1.0.1 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 11.1.0.1, timeout is seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms Vsic3#ping 10.0.0.1 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 11.1.0.1, timeout is seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/68/108 ms Các bҥn làm tѭѫng tӵ cho mҥng khác ÿӇ kiӇm tra, chҳc chҳn sӁ ping thҩy! ™ Cҩu hình mҥng area khác : Chúng ta sӁ khҧo sát cách cҩu hình mҥng ÿѭӧc phân bӕ nhiӅu area khác mөc Trѭӟc hӃt, khҧo sát nӃu cҩu hình cho m̩ng 12.1.0.0/30 interface S0 cͯa Vsic3 area m̩ng khác v̳n area toàn mҥng cӫa có thӇ liên lҥc ÿѭӧc hay không ? Do phҫn ÿã cҩu hình OSPF cho mӝt vùng Nên bây giӡ chӍ cҫn gӣ bӓ cҩu hình OSPF cho router Vsic3 cҩu hình lҥi cho nhѭ yêu cҫu cӫa câu hӓi ÿһt Cách thӵc hiӋn nhѭ sau : Vsic3(config)#router ospf Vsic3(config-router)#no net 170.1.0.0 0.0.255.255 area gӣ bӓ cҩu hình cҩu hình OSPF cNJ Vsic3(config-router)#no net 12.1.0.0 0.0.0.3 area Vsic3(config)#router ospf Vsic3(config-router)#net 170.1.0.0 0.0.255.255 area VSIC Education Corporation C̭u hình cho interface S0 router Vsic3 thu͡c Trang 122 CCNA Tài liӋu dành cho hӑc viên area Vsic3(config-router)#net 12.1.0.0 0.0.0.3 area C̭u hình m̩ng 12.1.0.0/30 thu͡c area Sau cҩu hình xong kiӇm tra lҥi bҧng ÿӏnh tuyӃn cӫa router : Vsic1#sh ip route Gateway of last resort is not set O 170.1.0.0/16 [110/128] via 192.168.1.2, 00:00:53, Serial0 10.0.0.0/16 is subnetted, subnets C 10.0.0.0 is directly connected, Loopback0 11.0.0.0/32 is subnetted, subnets O 11.1.0.1 [110/65] via 192.168.1.2, 00:00:53, Serial0 C 192.168.1.0/24 is directly connected, Serial0 Vsic2#sh ip route Gateway of last resort is not set C 170.1.0.0/16 is directly connected, Serial1 10.0.0.0/32 is subnetted, subnets O 10.0.0.1 [110/65] via 192.168.1.1, 00:00:43, Serial0 C 11.0.0.0/8 is directly connected, Loopback0 C 192.168.1.0/24 is directly connected, Serial0 Vsic3#sh ip route Gateway of last resort is not set C 170.1.0.0/16 is directly connected, Serial0 12.0.0.0/30 is subnetted, subnets C 12.1.0.0 is directly connected, Loopback0 Nhұn xét : router Vsic1 Vsic2 biӃt ÿѭӧc mҥng cӫa nhѭng không biӃt ÿѭӧc mҥng cӫa router Vsic3 Ngѭӧc lҥi router Vsic3, không biӃt ÿѭӧc mҥng cӫa router Vsic1 Vsic2 ĈiӅu chӭng tӓ, router mӝt area chӍ biӃt ÿѭӧc mҥng area ÿó, mҥng area khác router không biӃt (Trѭӡng hӧp, router Vsic1 thҩy ÿѭӧc mҥng 170.1.0.0/16 router Vsic2 quҧng bá mҥng ÿó thuӝc area 0) ĈӇ liên kӃt ÿѭӧc mҥng area khác phҧi có mӝt router biên nӕi area ÿó vӅ area (backbone) Router có mӝt interface thuӝc area ÿó mӝt interface thuӝc area VSIC Education Corporation Trang 123 CCNA Tài liӋu dành cho hӑc viên Trong trѭӡng hӧp lab, có hai cách ÿӇ giҧi quyӃt vҩn ÿӅ Cách thӭ nhҩt cҩu hình cho mҥng cӫa interface S0 cӫa router Vsic3 thuӝc area Lúc này, router Vsic3 ÿóng vai trò mӝt router biên Cách thӭ hai cҩu hình cho mҥng cӫa interface S1 router Vsic2 thuӝc area 1, lúc router Vsic2 ÿóng vai trò router biên Chúng ta sӁ khҧo sát cách (c̭u hình cho m̩ng interface S0 cͯa vsic3 thu͡c area0) Cách ÿѭӧc thӵc hiӋn tѭѫng tӵ Cách cҩu hình : Vsic3(config)#router ospf Vsic3(config-router)#no net 170.1.0.0 0.0.255.255 area Vsic3(config-router)#net 170.1.0.0 0.0.255.255 area Sau cҩu hình xong, kiӇm tra lҥi bҧng ÿӏnh tuyӃn cӫa router : Vsic1#sh 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 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set O 170.1.0.0/16 [110/128] via 192.168.1.2, 00:01:30, Serial0 10.0.0.0/16 is subnetted, subnets C 10.0.0.0 is directly connected, Loopback0 11.0.0.0/32 is subnetted, subnets O 11.1.0.1 [110/65] via 192.168.1.2, 00:01:30, Serial0 12.0.0.0/32 is subnetted, subnets O IA 12.1.0.1 [110/129] via 192.168.1.2, 00:01:30, Serial0 C 192.168.1.0/24 is directly connected, Serial0 Vsic2#sh ip route Gateway of last resort is not set C 170.1.0.0/16 is directly connected, Serial1 10.0.0.0/32 is subnetted, subnets O 10.0.0.1 [110/65] via 192.168.1.1, 00:01:07, Serial0 C 11.0.0.0/8 is directly connected, Loopback0 12.0.0.0/32 is subnetted, subnets VSIC Education Corporation Trang 124 CCNA Tài liӋu dành cho hӑc viên O IA 12.1.0.1 [110/65] via 170.1.0.2, 00:01:07, Serial1 C 192.168.1.0/24 is directly connected, Serial0 Vsic3#sh ip route Gateway of last resort is not set C 170.1.0.0/16 is directly connected, Serial0 10.0.0.0/32 is subnetted, subnets O 10.0.0.1 [110/129] via 170.1.0.1, 00:00:06, Serial0 11.0.0.0/32 is subnetted, subnets O 11.1.0.1 [110/65] via 170.1.0.1, 00:00:06, Serial0 12.0.0.0/30 is subnetted, subnets C 12.1.0.0 is directly connected, Loopback0 O 192.168.1.0/24 [110/128] via 170.1.0.1, 00:00:06, Serial0 Nhұn xét : router ÿã thҩy ÿѭӧc mҥng cӫa router khác Nhѭ vұy toàn mҥng ÿã liên lҥc ÿѭӧc vӟi Chúng ta có thӇ kiӇm tra bҵng cách ping ÿӃn tӯng mҥng Cách tӵ thӵc hành Dynagen: Vӟi thӵc hành ta phҧi sӱ dөng ÿӃn router, sӱ dөng file lab18ospfcb.net ÿӇ thӵc hành vӟi sѫ ÿӗ sau: VSIC Education Corporation Trang 125 CCNA Tài liӋu dành cho hӑc viên BÀI 19: CҨU HÌNH EIGRP Mô tҧ lab ÿӗ hình : Các PC nӕi vӟi router bҵng cáp chéo, hai router ÿѭӧc nӕi vӟi bҵng cáp serial Ĉӏa chӍ IP cӫa interface PC nhѭ hình vӁ Trong lab sӁ tiӃn hành cҩu hình giao thӭc EIGRP cho router EIGRP giao thӭ hӛ trӧ VLSM, metric cӫa EIGRP ÿѭӧc tính bҵng IGRP nhân 256 Cҩu hình : Chúng ta cҩu hình cho router Vsic1 Vsic2 nhѭ sau : Vsic1#sh run Building configuration Current configuration : 541 bytes ! version 12.1 ! hostname Vsic1 ! interface Ethernet0 ip address 10.1.0.1 255.255.0.0 ! interface Serial1 ip address 192.168.0.1 255.255.255.0 clockrate 64000 ! end Vsic2#sh run Building configuration Current configuration : 541 bytes ! version 12.1 ! hostname Vsic2 ! interface Ethernet0 VSIC Education Corporation Trang 126 CCNA Tài liӋu dành cho hӑc viên ip address 11.1.0.1 255.255.0.0 ! interface Serial1 ip address 192.168.0.2 255.255.255.0 ! end Sau cҩu hình xong ÿӏa chӍ IP cho interface cӫa router Vsic1, Vsic2 tiӃn hành cҩu hình EIGRP cho router nhѭ sau: Vsic1(config)#router eigrp 100 100 s͙ Autonomus –system Vsic1(config-router)#network 10.1.0.0 qu̫ng bá m̩ng 10.1.0.0 Vsic1(config-router)#network 192.168.0.0 qu̫ng bá m̩ng 192.168.0.0 Vsic2(config)#router eigrp 100 Vsic2(config-router)#network 11.0.0.0 Vsic2(config-router)#network 192.168.0.0 Bây giӡ tiӃn hành kiӇm tra kӃt nӕi mҥng bҵng cách : Vsic1#ping 11.1.0.2 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 11.1.0.2, timeout is seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/32/40 ms Vsic1# Chúng ta sӱ dөng câu lӋnh show ip route ÿӇ kiӇm tra bҧng ÿӏnh tuyӃn cӫa hai router Vsic2#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 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, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P - periodic downloaded static route Gateway of last resort is not set D 10.0.0.0/8 [90/2195456] via 192.168.0.1, 00:11:35, Serial1 C 11.1.0.0/16 is directly connected, Ethernet0 C 192.168.0.0/24 is directly connected, Serial1 Trong bҧng ÿӏnh tuyӃn cӫa router Vsic2 ÿã có route ÿӃn mҥng cӫa Vsic1, Vsic1 ping thành công ÿӃn loopback cӫa Vsic2 Tӵ thӵc hành bҵng Dynagen: Ta có thӇ sӱ dөng file lab19eigrp.net ÿӇ thӵc hành, sѫ ÿӗ hoàn toàn giông nhѭ static, RIP Ta có thӇ giҧ lұp mҥng Lan bҵng interface loopback VSIC Education Corporation Trang 127 CCNA Tài liӋu dành cho hӑc viên BÀI 20: CҨU HÌNH OSPF GIӲA WINDOWS SERVER 2003 VÀ ROUTER Giӟi thiӋu : Trong lab sӁ khҧo sát cҩu hình OSPF giӳa mӝt máy Server sӱ dөng Windows 2003 router PC có thӇ ÿѭӧc sӱ dөng làm Router, ÿӗng thӟi có thӇ tích hӧp vào hӋ thӕng router ÿӏnh tuyӃn thông qua giao thӭc chuҭn OSPF Mô tҧ lab ÿӗ hình : Ĉӗ hình lab nhѭ hình vӁ, sӁ cҩu hình loopback cho router Ĉӏa chӍ IP cӫa interface ÿѭӧc ghi hình Lѭu ý, cҩu hình IP cho server, không cҩu hình default gateway Server hoҥt ÿӝng giӕng nhѭ Router, sӁ trao ÿәi thông tin ÿӏnh tuyӃn thông qua giao thӭc OSPF có thӇ biӃt ÿѭӧc mҥng 10.0.0.0, 12.0.0.0 ӣ ÿҫu xa Cҩu hình cho router : Chúng ta cҩu hình cho cho router nhѭ sau : Vsic1#sh run Building configuration Current configuration : 592 bytes version 12.1 hostname Vsic1 interface Loopback0 ip address 10.0.0.1 255.255.0.0 interface Serial0 VSIC Education Corporation Trang 128 CCNA Tài liӋu dành cho hӑc viên ip address 192.168.1.1 255.255.255.0 router ospf log-adjacency-changes network 10.0.0.0 0.0.255.255 area network 192.168.1.0 0.0.0.255 area end Vsic2#sh run Building configuration Current configuration : 712 bytes version 12.1 hostname Vsic2 interface Loopback0 ip address 11.1.0.1 255.0.0.0 interface Ethernet0 ip address 15.1.0.1 255.0.0.0 interface Serial0 ip address 192.168.1.2 255.255.255.0 no fair-queue clockrate 64000 interface Serial1 ip address 170.1.0.1 255.255.0.0 router ospf log-adjacency-changes network 11.1.0.0 0.255.255.255 area network 15.0.0.0 0.255.255.255 area network 170.1.0.0 0.0.255.255 area network 192.168.1.0 0.0.0.255 area end Vsic3#sh run Building configuration Current configuration : 608 bytes version 12.1 hostname Vsic3 interface Loopback0 ip address 12.1.0.1 255.255.255.252 interface Serial0 ip address 170.1.0.2 255.255.0.0 clockrate 64000 router ospf log-adjacency-changes network 12.1.0.0 0.0.0.3 area network 170.1.0.0 0.0.255.255 area end Cҩu hình cho server : VSIC Education Corporation Trang 129 CCNA Tài liӋu dành cho hӑc viên Chúng ta vào Start Program Administrative Tools Routing And Remote Access Sau ÿó chӑn PC muӕn cҩu hình rӗi nhҩp chuӝt phҧi chӑn Configure and Enable Routing and Remote Access Rӗi nhҩn Next chӑn Custom Configuration Next chӑn Lan routing Next Finish Yes Click vào IP routing, bên ô cӱa sә bên phҧi nhҩp chuӝt phҧi vào General rӗi chӑn New Routing Protocol … Chӑn Open Shortest Path Frist (OSPF) OK Nhҩp chuӝt phҧi vào OSPF (trong IP routing) chӑn New Interface Trong ô cӱa sә hiӋn chӑn Local Area Connection OK Trong cӱa sә hiӋn ra, ÿánh dҩu chӑn Enable OSPF for this address, phҫn Network Type, ta chӑn mөc Broadcast Sau ÿó nhҩn OK VSIC Education Corporation Trang 130 CCNA Tài liӋu dành cho hӑc viên Chúng ta có thӇ set cost cho route bҵng cách nhұp giá trӏ vàp ô Cost, ÿӝ ѭu tiên cho router bҵng cách nhұp giá trӏ vào ô Router priority Router có ÿӝ ѭu tiên cao nhҩt sӁ designated router Nhҩp chuӝt phҧi vào OSPF chӑn Properties Trong cӱa sә hiӋn chӑn Enable antonomous system boundary router VSIC Education Corporation Trang 131 CCNA Click vào tab Areas, chӑn 0.0.0.0 Tài liӋu dành cho hӑc viên nhҩn Edit Trong cӱa sә vӯa hiӋn ra, bӓ Enable plaintext password VSIC Education Corporation OK Trang 132 CCNA Tài liӋu dành cho hӑc viên Chúng ta nhҩn chuӝt phҧi vào OSPF chӑn Show Link-state Database Trong cӱa sә hiӋn sӁ thҩt ÿѭӧc mҥng cӫa router Vsic1, Vsic2, Vsic3 Bây giӡ sӁ ping tӟi mҥng cӫa ba router ÿӇ kiӇm tra VSIC Education Corporation Trang 133 CCNA Tài liӋu dành cho hӑc viên Chúng ta ping thành công mҥng 10.0.0.0 cӫa Vsic1, bҥn tiӃp tөc ping tӟi mҥng khác ÿӇ kiӇm tra chҳc chҳn sӁ thành công Nhѭ vұy toàn mҥng ÿã liên lҥc ÿѭӧc vӟi ViӋc chҥy OSPF giӳa Winserver 2003 router ÿã thành công Tӵ thӵc hành sӱ dөng Dynagen : Ĉӕi vӟi thӵc hành này, ta có thӇ sӱ dөng máy tính hiӋn hành chҥy hӋ ÿiӅu hành 2003 hay có thӇ sӱ dөng máy ҧo Trѭӟc tiên ta kiӇm tra viӋc cài ÿһt admin tool “ Routing Remote Access” Win 2003 Sau ÿó tiӃn hành Bridge card mҥng cӫa máy sӱ dөng vӟi Router VSIC2 VSIC Education Corporation Trang 134 CCNA Tài liӋu dành cho hӑc viên Chҥy file lab20ospfs.net ÿӇ thӵc hành chӍnh ÿӏa chӍ card mҥng phù hӧp vӟi PC win 2003 # Simple lab [localhost] [[3640]] image = \Program Files\Dynamips\images\C3640_IS_MZ122_3.BIN # On Linux / Unix use forward slashes: # image = /opt/7200-images/c7200-jk9o3s-mz.124-7a.image ram=96 [[ROUTER VSIC1]] model=3640 s1/0 = VSIC2 s1/0 [[router VSIC2]] s1/1 = VSIC3 s1/1 F0/0 = NIO_gen_eth:\Device\NPF_{3E56FAD7-7D96-4763-AD9E-6232CA66410B} Æthay ÿәi ÿӏa chӍ mҥng ӣ dòng model=3640 [[ROUTER VSIC3]] model=3640 # No need to specify an adapter here, it is taken care of # by the interface specification under Router VSIC1 Chúng ta bҳt ÿҫu thӵc hành, ta thӱ thêm giao thӭc có admin tool “Routing Remote Access “ RIP VSIC Education Corporation Trang 135 [...]... min/avg/max = 32 /35 /36 ms Vsic1#ping 11.0.0.1 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 11.0.0.1, timeout is 2 seconds: Success rate is 0 percent (0/5) Thӵc hiӋn các lӋnh Ping tӯ Router Vsic2 Vsic2#ping 192.168.0.1 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 192.168.0.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 32 /35 /36 ... (Serial0), len 60, rcvd 3 01:49:58: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable 01:50: 03: IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 3 01:50: 03: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable 01:50:08: IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 3 01:50:08: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable 01:50: 13: IP: s=10.0.0.2... IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 3 01:50: 13: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable Vsic2# 01:55 :30 : IP: s=10.0.0.2 (Serial0), d=11.0.0.1, len 60, rcvd 4 01:55 :30 : IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable 01:55 :35 : IP: s=10.0.0.2 (Serial0), d=11.0.0.1, len 60, rcvd 4 01:55 :35 : IP: s=11.0.0.1 (local), d=10.0.0.2, len 60, unroutable 01:55:40:... Loopback0 I 1 93. 1.1.0/24 [100/90956] via 192.1.1.2, 00:00:16, Serial0 C 192.1.1.0/24 is directly connected, Serial0 Bây giӡ ta thiӃt lұp các tham sӕ timer cӫa VSIC3,VSIC2 giӕng nhѭ cӫa VSIC1, và sau ÿó ta thҩy giao thӭc hoҥt ÿӝng ÿӏnh tuyӃn trӣ lҥi bình thѭӡng VSIC3#conf t Enter configuration commands, one per line End with CNTL/Z VSIC3(config)#router igrp 100 VSIC3(config-router)#timer basic VSIC3(config-router)#timer... không Trong hình trên có 3 router gӗm VSIC1,VSIC2,VSIC3 ÿѭӧc nӕi vӟi nhau thông qua cáp Serial Sinh viên thӵc hành gán ÿӏa và cҳm cáp, sau ÿó sӁ cҩu hình giao thӭc ÿӏnh tuyӃn IGRP nhѭ trên KiӇm tra quá trình hoҥt ÿӝng giao thӭc bҵng lӋnh show ip route và ping, sau ÿó bҳt tay vào cҩu hình các tham sӕ timer( Cҩu hình tҥi VSIC1 trѭӟc và không cҩu hình tҥi VSIC3,VSIC2) và giám sát quá trình hӑat ÿӝng trên... vӟi nhau bҵng cáp chéo Hai router Vsic1 và Vsic3 ÿѭӧc cҩu hình thêm interface loopback 0 3 Mөc tiêu cӫa bài lab : Phҧi cҩu hình sao cho router Vsic1 có 2 route qua mҥng 14.1.0.0 cӫa router Vsic3 và viӋc truyӇn dӳ liӋu qua mҥng 14.1.0.0 phҧi ÿѭӧc chia ra trên 2 route ÿó 4 Cҩu hình router : Vsic1#sh run Building configuration Current configuration : 733 bytes version 12.2 hostname Vsic1 interface Loopback0... 13. 1.0.1 255.255.255.0 router igrp 1 network 11.0.0.0 network 12.0.0.0 network 13. 0.0.0 end Vsic3#sh run Building configuration Current configuration : 546 bytes version 12.1 hostname Vsic3 interface Loopback0 ip address 14.1.0.1 255.255.255.0 interface Serial0 ip address 13. 1.0.2 255.255.255.0 clockrate 64000 router igrp 1 network 13. 0.0.0 network 14.0.0.0 end Sau khi cҩu hình các router ta kiӇm tra bҧng... subnetted, 1 subnets C 12.1.0.0 is directly connected, Ethernet0 VSIC Education Corporation Trang 99 CCNA Tài liӋu dành cho hӑc viên I I 13. 0.0.0/8 [100/8576] via 12.1.0.2, 00:00: 03, Ethernet0 14.0.0.0/8 [100/9076] via 12.1.0.2, 00:00: 03, Ethernet0 Router Vsic1 giӡ chӍ còn duy nhҩt mӝt ÿѭӡng ÿӃn mҥng 13. 1.0.0/24 và mӝt ÿѭӡng ÿӃn mҥng 14.1.0.0/24 Do lúc này route ÿӃn hai mҥng ÿó qua S0 cӫa Vsic1 có metric... basic 5 15 15 30 VSIC2#conf t Enter configuration commands, one per line End with CNTL/Z VSIC2(config)#router igrp 100 VSIC2(config-router)#timers basic 5 15 15 30 VSIC3#ping 10.1.1.1 Type escape sequence to abort Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms VSIC Education Corporation Trang 94 CCNA VSIC Education... input none line aux 0 line vty 0 4 ! end VSIC3#show run Building configuration Current configuration : 706 bytes ! hostname VSIC3 ! logging rate-limit console 10 except errors ! ip subnet-zero no ip finger ! interface Loopback0 VSIC Education Corporation Trang 92 CCNA Tài liӋu dành cho hӑc viên ip address 152.1.1.1 255.255.255.0 ! interface Serial0 ip address 1 93. 1.1.2 255.255.255.0 no fair-queue clockrate ... model =36 40 s1/0 = VSIC2 s1/0 F0/0 = NIO_gen_eth:DeviceNPF_{7211A84E-B69B-4DDF-B780-7 835 124CF83B} [[router VSIC2]] model =36 40 F0/0 = NIO_gen_eth:DeviceNPF_{7211A84E-B69B-4DDF-B780-7 835 124CF83B}... len 60, unroutable 00 :36 :42: IP: s=10.0.0.1 (local), d=10.0.0.2 (Ethernet0), len 56, sending 00 :36 : 43: IP: s=10.0.0.2 (Ethernet0), d=10.0.1.1, len 60, unroutable 00 :36 : 43: IP: s=10.0.0.1 (local),... vsic2# 00 :33 :59: IP: s=10.0.0.2 (Serial0), d=192.168.0.2 (Serial0), len 60, rcvd 00 :33 :59: IP: s=192.168.0.2 (local), d=10.0.0.2, len 60, unroutable VSIC Education Corporation Trang 72 CCNA Tài

Ngày đăng: 04/12/2015, 14:38

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

Tài liệu liên quan