Redistribute giữa OSPF và IGRP

24 707 4
Redistribute giữa OSPF và IGRP

Đ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

Trong bài này ta sẽ thực hiện redistribute giữa hai giao thức hiểu classfull là IGRP và giao thức hiểu classless là OSPF .

Redistribute gi a OSPF IGRPữTác gi : Nguy n Th Băng Tâm ả ễ ịTrong bài này ta s th c hi n redistribute gi a hai giao th c hi u classfull làẽ ự ệ ữ ứ ể IGRP giao th c hi u classless là OSPF .ứ ểM c tiêu bài làmụ : T m t router b t kì trong m ng ping th y t t c các đ a ch .ừ ộ ấ ạ ấ ấ ả ị ỉGi i quy t v n đ mà classfull g p ph i là discontiguous network VLSM .ả ế ấ ề ặ ảKi m tra metric c a hai giao th c .ể ủ ứMô hình m ng nh hình v d i đây , router R2 ch y hai giao th c là OSPFạ ư ẽ ướ ạ ứ IGRP .Router này s th c hi n redistribute gi a hai giao th c này .ẽ ự ệ ữ ứĐi ch c a các interface trên các router nh sau : ạ ỉ ủ ưRouter Interface Đ a chị ỉRouter R1 S0/0F0/1F0/0Loopback 0 192.168.2.1/24172.16.1.1/28172.16.1.17/28192.168.6.1/24Router R2 S0/0S0/1E0/0192.168.2.2/24192.168.1.2/24192.168.3.2/24Router R3 S0/0E0/0Loopback 0192.168.1.3/24172.16.4.1/2410.3.1.1/24Router R4 E0/0Loopback 0Loopback 1Loopback 2192.168.3.4/2410.1.1.1/2410.1.2.160/24172.16.5.1/24 C u hình ban đ u : ấ ầR1!Hostname R1!Interface Loopback0Ip address 192.168.6.1 255.255.255.0!Interface fastethernet0/0 Ip address 172.16.1.16 255.255.255.240!Interface Serial0/0 Ip address 192.168.2.1 255.255.255.0!Interface fastethernet0/1 Ip address 172.16.1.1 255.255.255.240!EndR2!Hostname R2!Interface Ethernet0/0Ip address 192.168.3.2 255.255.255.0!Interface Serial0/0 Ip address 192.168.2.2 255.255.255.0 Clockrate 64000!Interface Serial0/1 Ip address 192.168.1.2 255.255.255.0!EndR3!Hostname R3!Interface Loopback0 Ip address 10.3.1.1 255.255.255.0 ! Interface Ethernet0/0 Ip address 172.16.4.1 255.255.255.0!Interface Serial0/0 Ip address 192.168.1.3 255.255.255.0 Clockrate 64000!Ip classless!EndR4!Hostname R4!Interface Loopback0Ip address 10.1.1.1 255.255.255.0!Interface Loopback1 Ip address 10.1.2.160 255.255.255.0!Interface Loopback2 Ip address 172.16.5.1 255.255.255.0!Interface Ethernet0/0 Ip address 192.168.3.4 255.255.255.0!EndBây gi ta ti n hành c u hình t ng b c cho các router : ờ ế ấ ừ ướC u hình cho router R1 : ấ Press RETURN to get started!Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1R1(config)#line console 0R1(config-line)#password ciscoR1(config-line)#logging synchronousR1(config-line)#line vty 0 4R1(config-line)#no login R1(config-line)#exitR1(config)#interface s0/0R1(config-if)#ip address 192.168.2.1 255.255.255.0R1(config-if)#clock rate 64000R1(config-if)#no shutdownR1(config-if)#exitR1(config)#interface f0/1R1(config-if)#ip address 172.16.1.1 255.255.255.240R1(config-if)#no keepalive R1(config-if)#no shutdown00:15:24: %LINK-3-UPDOWN: Interface fastethernet0/1, changed state to up00:15:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface fastethernet0/1, changed State to upR1(config-if)#interface f0/0R1(config-if)#ip address 172.16.1.17 255.255.255.240R1(config-if)#no keepalive R1(config-if)#no shutdownR1(config-if)#exit00:15:45: %LINK-3-UPDOWN: Interface fastethernet0/0, changed state to up00:15:46: %LINEPROTO-5-UPDOWN: Line protocol on Interface fastethernet0/0, changed state to upR1(config)#interface loopback 0R1(config-if)#ip address 192.168.6.1 255.255.255.0R1(config)#exitR1#copy running-config startup-configBuilding configuration .[OK](th c hiên l u c u hình)ự ư ấC u hình cho router R2 : ấPress RETURN to get started!Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#line console 0 R2(config-line)#password ciscoR2(config-line)#logging synchronousR2(config-line)#line vty 0 4R2(config-line)#no loginR2(config-line)#exitR2(config)#interface s0/0R2(config-if)#ip address 192.168.2.2 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shutdownR2(config-if)#interface s0/1R2(config-if)#ip address 192.168.1.2 255.255.255.0R2(config-if)#clock rate 64000R2(config-if)#no shutdownR2(config-if)#exitR2(config)#interface e0/0R2(config-if)#ip address 192.168.3.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#exitR2(config)#exitR2#R2#wrBuilding configuration .[OK](th c hi n l u c u hình )ự ệ ư ấC u hình cho router R3 :ấPress RETURN to get started!Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R3R3(config)#line console 0 R3(config-line)#password ciscoR3(config-line)#logging synchronousR3(config-line)#line vty 0 4R3(config-line)#no loginR3(config-line)#exitR3(config)#interface s0/0R3(config-if)#ip address 192.168.1.3 255.255.255.0R3(config-if)#clock rate 64000R3(config-if)#no shutdownR3(config-if)#exitR3(config)#interface e0/0R3(config-if)#ip address 172.16.4.1 255.255.255.0 R3(config-if)#no keepalive R3(config-if)#no shutdownR3(config-if)#exitR3(config)#int loopback 0R3(config-if)#ip address 10.3.31.1 255.255.255.0R3(config-if)#no shutdownR3(config-if)#exitR3(config)#exitR3#writeBuilding configuration .[OK](th c hi n l u c u hình)ự ệ ư ấC u hình cho router R4 : ấPress RETURN to get started!Router>enableRouter#configure tEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R4R4(config)#line console 0 R4(config-line)#password ciscoR4(config-line)#logging synchronousR4(config-line)#line vty 0 4R4(config-line)#no loginR4(config-line)#exitR4(config)#interface e0/0R4(config-if)#ip address 192.168.3.4 255.255.255.0R4(config-if)#no shutdownR4(config-if)#exit*Mar 1 00:04:19.865: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to upR4(config)#interface loopback 0R4(config-if)#ip address 10.1.1.1 255.255.255.0R4(config-if)#interface loopback 1R4(config-if)#ip address 10.1.2.160 255.255.255.0R4(config-if)#interface loopback 2R4(config-if)#ip address 172.16.5.1 255.255.255.0R4(config-if)#exitR4(config)#exitR4#wrBuilding configuration .[OK] (th c hi n l u c u hình)ự ệ ư ấKi m tra b ng đ nh tuy n c a m i router : ể ả ị ế ủ ỗR1#sh ip routeGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 2 subnets, 1 masksC 172.16.1.0/28 is directly connected, fastethernet0/1C 172.16.1.16/28 is directly connected, fastethernet0/0C 192.168.2.0/24 is directly connected, Serial0/0C 192.168.6.0/24 is directly connected, Loopback0R2#sh ip route<omitted>Gateway of last resort is not setC 192.168.1.0/24 is directly connected, Serial0/1C 192.168.2.0/24 is directly connected, Serial0/0C 192.168.3.0/24 is directly connected, Ethernet0/0R3#sh ip route<omitted>Gateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.4.0 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 1 subnetsC 10.3.1.0 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, Serial0/0R4#sh ip routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.5.0 is directly connected, Loopback2 10.0.0.0/24 is subnetted, 2 subnetsC 10.1.2.0 is directly connected, Loopback1C 10.1.1.0 is directly connected, Loopback0C 192.168.3.0/24 is directly connected, Ethernet0/0 trên b ng đ nh tuy n ta ch th y các connected network ,lí do là vì không cóỞ ả ị ế ỉ ấ giao th c đ nh tuy n nào ch y trên đó .C u hình cho các router R1,R4 vàứ ị ế ạ ấ interface s0/0 c a R2 ch y OSPF v i process –id là 1, area 0 . Router R3 vàủ ạ ớ interface s0/1 c a R2 ch y IGRP process 1.ủ ạ C u hình nh sau : ấ ưR1(config)#router ospf 1R1(config-router)#network 172.16.1.0 0.0.0.15 area 0R1(config-router)#network 172.16.1.16 0 0.0.0.15 area 0R1(config-router)#network 192.168.2.0 0.0.0.255 area 0R1(config-router)#network 192.168.6.0 0.0.0.255 area 0R2(config)#router ospf 1R2(config-router)#network 192.168.2.0 0.0.0.255 area 0R2(config-router)#network 192.168.3.0 0.0.0.255 area 0R2(config-router)#exitR2(config)#router igrp 1R2(config-router)#network 192.168.1.0R2(config-router)#exitR3(config)#router igrp 1R3(config-router)#network 172.16.0.0R3(config-router)#network 10.0.0.0R3(config-router)#network 192.168.1.0R4(config)#router ospf 1R4(config-router)#network 192.168.3.0 0.0.0.255 area 0R4(config-router)#network 10.1.1.0 0.0.0.255 area 0R4(config-router)#network 10.1.2.0 0.0.0.255 area 0R4(config-router)#network 172.16.5.1 0.0.0.0 area 0Ki m tra l i b ng đ nh tuy n : ể ạ ả ị ếR1#sh ip route <omitted>Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksO 172.16.5.1/32 [110/75] via 192.168.2.2, 00:00:26, Serial0/0C 172.16.1.0/28 is directly connected, fastethernet0/1C 172.16.1.16/28 is directly connected, fastethernet0/0 10.0.0.0/24 is subnetted, 2 subnetsO 10.1.1.0 [110/75] via 192.168.2.2, 00:00:26, Serial0/0O 10.1.2.0 [110/75] via 192.168.2.2, 00:00:26, Serial0/0C 192.168.2.0/24 is directly connected, Serial0/0C 192.168.6.0/24 is directly connected, loopback0O 192.168.3.0/24 [110/74] via 192.168.2.2, 00:00:26, Serial0/0Quan sát b ng trên ta th y : ả ấ O miêu t các route OSPF mà R1 h c đ c .Ví d nh b ng trên ta có thả ọ ượ ụ ư ả ể th y R1 h c đ c route 172.16.5.1 thông qua interface 192.168.2.2 , 110 là ADấ ọ ượ c a OSPF ,75 là cost đ đi đ n đ c route 172.16.5.1 .Quan sát ta th y ,R1ủ ể ế ượ ấ cũng h c đ c m ng 192.168.3.0/24 thông qua OSPF nh ng ch có cost 74 ,sọ ượ ạ ư ỉ ự khác nhau đây là vì R1 mu n h c đ c 172.16.5.1 ph i đi qua m t hop-ở ố ọ ượ ả ộcount là R4,do đó trong quá trình tính cost có c ng thêm 1 .ộR1#ping 192.168.3.4Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.4, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 36/40/56 msR1#ping 172.16.5.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.5.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/40/60 msR2#sh ip routeGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksO 172.16.5.1/32 [110/11] via 192.168.3.4, 00:00:04, Ethernet0/0I 172.16.0.0/16 [100/8576] via 192.168.1.3, 00:00:04, Serial0/1O 172.16.1.0/28 [110/65] via 192.168.2.1, 00:00:04, Serial0/0O 172.16.1.16/28 [110/65] via 192.168.2.1, 00:00:04, Serial0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masksI 10.0.0.0/8 [100/8976] via 192.168.1.3, 00:00:04, Serial0/1O 10.1.1.0/24 [110/11] via 192.168.3.4, 00:00:04, Ethernet0/0O 10.1.2.0/24 [110/11] via 192.168.3.4, 00:00:04, Ethernet0/0O 192.168.6.0/24 [110/65] via 192.168.2.1,00:00:04, Serial0/0C 192.168.1.0/24 is directly connected, Serial0/1C 192.168.2.0/24 is directly connected, Serial0/0C 192.168.3.0/24 is directly connected, Ethernet0/0Quan sát b ng đ nh tuy n c a router 2 : ả ị ế ủR2 h c đ c 5 route qua OSPF , đó là nh ng route b t đ u b ng ch O ,cóọ ượ ữ ắ ầ ằ ữ AD b ng 110 . Cost gi a router R2 R4 là 10 nên khi R2 h c routeằ ữ ọ 10.1.1.1,10.1.2.1,172.16.5.1 t R4 s có cost là 11 .Cũng nhìn trên b ng đ nhừ ẽ ả ị tuy n ta có th bi t đ c cost gi a R2 R1 là 64 .ế ể ế ượ ữBăng thông m c đ nh trên interface Ethernet là 10Mbps ,do đó cost trênặ ị interface này là 108/ 10Mbps = 10 .T c đ m c đ nh trên các interface serial làố ộ ặ ị T1= 1.544Mbps ,do đó cost m c đ nh trên các interface serial là :ặ ị 108/1,544Mbps = 64 . R2 h c đ c 2 route qua IGRP , đó là nh ng route b t đ u b ng ch I .Ta cóọ ượ ữ ắ ầ ằ ữ th d a vào nh ng quy t c g i nh n update c a các giao th c hi uể ự ữ ắ ử ậ ủ ứ ể classfull đ gi i thích cho các route IGRP trong b ng đ nh tuy n nh sau :ể ả ả ị ế ưKhi R3 g i update ,nó th c hi n ki m tra nh ng vi c sau : ử ự ệ ể ữ ệRoute 172.16.4.0/24 có cùng major network v i 192.168.1.0/24 (là đi chớ ạ ỉ đ c đăng kí đ n interface g i update ) hay không ?ượ ế ửKhông , R3 summarize 172.16.4.0/24 thành network có cùng subnet mask v iớ majornet là 172.16.0.0/16 g i route này đi .ử10.3.1.0/24 cũng đ c gi i thích t ng t R3 s g i 10.0.0.0/8 đi thay vìượ ả ươ ự ẽ ử g i 10.3.1.0/24 .ửKhi R2 nh n update ,nó th c hi n nh ng vi c sau :ậ ự ệ ữ ệMajor network đ c nh n 172.16.0.0 có cùng majornet v i 192.168.1.0 (là đ aượ ậ ớ ị ch đ c đăng kí đ n interface nh n update ) hay không ?ỉ ượ ế ậKhông ,có subnet nào c a majornet 172.16.0.0 t n t i trong b ng đ nh tuy nủ ồ ạ ả ị ế mà R2 h c đ c t interface khác không ?ọ ượ ừKhông ,R2 s ch p nh n route v i mask là 16 vì 172.16.0.0 là đi ch l p Bẽ ấ ậ ớ ạ ỉ ớRoute 10.0.0.0 đ c gi i thích t ng t .ượ ả ươ ựĐó là lí do t i sao trên b ng đ nh tuy n c a R2 l i xu t hi n các routeạ ả ị ế ủ ạ ấ ệ 172.16.0.0/16 10.0.0.0/8.R2#ping 172.16.4.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.4.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/37/52 msR3#ping 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: .Success rate is 0 percent (0/5)R3 ping 192.168.2.1 không thành công là vì R3 ch y IGRP còn 192.168.2.0ạ ch y OSPF .Mu n ping thành công ta ph i th c hi n redistribute trên R2 đạ ố ả ự ệ ể hai giao th c này hi u nhau .ứ ểR2(config)#router igrp 1R2(config-router)#redistribute ospf 1 metric 1000 100 255 1 1500 R2(config-router)#exitàc u hình trên redistribute các route đ c khám phá b i OSPF process 1 vàoấ ượ ở IGRP process 1. Ph n metric trong câu l nh là đ đăng kí metric IGRP cho cácầ ệ ể route ,th t nh sau :ứ ự ưBanđwidth , đ n v là Kbps (m c đ nh là 1000)ơ ị ặ ịDelay ,đ n v là tens of microsecond (m c đ nh là 100)ơ ị ặ ịReliability , có giá tr t 1 – 255 ,v i 255 thì m c đ reliability là 100% (m cị ừ ớ ứ ộ ặ đ nh là 255)ị [...]... ị R2(config)#router ospf 1 R2(config-router) #redistribute igrp 1 metric 20 subnets R2(config-router)#exit à c u hình trên s redistribute các route đ c khám phá b i IGRP process 1ấ ẽ ượ ở vào OSPF process 1. Ph n metric trong câu l nh đăng kí cost OSPF là 20 choầ ệ m i route đ c redistribute .ỗ ượ Redistribute làm cho R2 tr thành ASBR (autonomous system boundary router)ở trong mi n OSPF các route đ c redistribute. .. hi n redistribute , các external route vào OSPF m c đ nh là type E2 ,taự ệ ặ ị có th c u hình ch ra external type là E1 b ng cách ch ra trong câu l nhể ấ ỉ ằ ỉ ệ redistribute m t metric-type ộ R2(config)#router ospf 1 R2(config-router)#no redistribute igrp 1 metric 20 subnets R2(config-router) #redistribute igrp 1 metric 20 metric-type 1 subnets Khi m t external route đ c redistribute vào mi n OSPF. .. connected, Ethernet0/0 Khi th c hi n redistribute mà khơng đăng kí metric cho các external route thìự ệ m c đ nh metric là 20 cho các route đ c redistribute vào OSPF ,external typeặ ị ượ là E2 , 0 cho các route đ c redistribute vào các giao th c khác .ượ ứ R2(config)#router ospf 1 R2(config-router)#no redistribute igrp 1 subnets R2(config-router) #redistribute igrp 1 metric-type 1 subnets R4#sh... y IGRP cịn 192.168.2.0ạ ch y OSPF .Mu n ping thành công ta ph i th c hi n redistribute trên R2 đạ ố ả ự ệ ể hai giao th c này hi u nhau .ứ ể R2(config)#router igrp 1 R2(config-router) #redistribute ospf 1 metric 1000 100 255 1 1500 R2(config-router)#exit àc u hình trên redistribute các route đ c khám phá b i OSPF process 1 vàoấ ượ ở IGRP process 1. Ph n metric trong câu l nh là đ đăng kí metric IGRP. .. 00:31:42, Serial0/0 Redistribute gi a OSPF IGRP Tác gi : Nguy n Th Băng Tâm ả ễ ị Trong bài này ta s th c hi n redistribute gi a hai giao th c hi u classfull làẽ ự ệ ữ ứ ể IGRP giao th c hi u classless là OSPF .ứ ể M c tiêu bài làmụ : T m t router b t kì trong m ng ping th y t t c các đ a ch .ừ ộ ấ ạ ấ ấ ả ị ỉ Gi i quy t v n đ mà classfull g p ph i là discontiguous network VLSM .ả ế ấ ề ặ... nhừ ề ượ ằ ử ụ ệ redistribute s có đ u tiên h n đ i v i metric đ c đăng kí b ng default-ẽ ộ ư ơ ố ớ ượ ằ metric . R2(config)#router igrp 1 R2(config-router)#default-metric 5000 100 255 1 1500 R2#show running-config ! Router ospf 1 Redistribute igrp 1 metric-type 1 subnets Network 192.168.2.0 0.0.0.255 area 0 Network 192.168.3.0 0.0.0.255 area 0 ! Router igrp 1 Redistribute ospf 1 metric 1000... external routes .M cề ượ ặ đ nh là E2 external path . Subnets đ c s d ng khi redistribute các route vàoị ượ ử ụ OSPF ch ra subnet details t c là có c subnet mask s đ c redistribute ,n uỉ ứ ả ẽ ượ ế khơng có nó thì đ a ch major network đ c redistribute .ị ỉ ượ Ki m tra database c a OSPF đ th y rõ h n đi u đó .ể ủ ể ấ ơ ề R2#show ip ospf database Type-5 AS External Link States Link ID ADV Router Age Seq#... DLY IGRPsum = 21000/10 = 2100 metric = BW IGRPmin + DLY IGRPsum = 10000 + 2100 metric = 12100 Th c hi n l nh show ip route cho t ng route đ th y rõ h n :ự ệ ệ ừ ể ấ ơ R3#sh ip route 192.168.2.0 Routing entry for 192.168.2.0/24 Known via " ;igrp 1", distance 100, metric 10476 Redistributing via igrp 1 Advertised by igrp 1 (self originated) Last update... E1 10.0.0.0/8 [110/74] via 192.168.2.2, 00:14:07, Serial0/0 O E1 192.168.1.0/24 [110/74] via 192.168.2.2, 00:14:07, Serial0/0 R2(config)#router ospf 1 R2(config-router)#no redistribute igrp 1 metric 10 metric-type 1 subnets R2(config-router)# redistribute igrp 1 subnets R4#sh ip route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks O 172.16.1.16/28 [110/75]... connected, loopback0 O 192.168.3.0/24 [110/74] via 192.168.2.2, 00:03:24, Serial0/0 Show ip route trên c hai router ta th y các route đ c h c b i IGRP ấ ượ ọ ở redistribute vào OSPF có kí hi u là O E2 .Các route này có metric là 20 (metricệ khi c u hình redistribute ) ấ Ki m tra b ng l nh ping ể ằ ệ R4#ping 10.3.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.3.1.1, timeout . thông qua OSPF và đ c redistribute vào IGRP , do đó metric c a m ngượ ủ ạ 192.168.6.0 đ c tính theo metric mà ta đã thi t l p trong câu l nh redistribute ợ. ỉ ệ redistribute m t metric-type ộR2(config)#router ospf 1R2(config-router)#no redistribute igrp 1 metric 20 subnetsR2(config-router) #redistribute igrp

Ngày đăng: 09/10/2012, 16:20

Từ khóa liên quan

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

Tài liệu liên quan