Redistribute giữa OSPF và IGRP

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 . 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 và 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 và IGRP .Router này sẽ thực hiện redistribute giữa hai giao thức này .

pdf24 trang | Chia sẻ: tlsuongmuoi | Lượt xem: 1972 | Lượt tải: 1download
Bạn đang xem trước 20 trang tài liệu Redistribute giữa OSPF và IGRP, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
Redistribute gi a OSPF và 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 và 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 và 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ạ ư ẽ ướ ạ ứ và 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/0 F0/1 F0/0 Loopback 0 192.168.2.1/24 172.16.1.1/28 172.16.1.17/28 192.168.6.1/24 Router R2 S0/0 S0/1 E0/0 192.168.2.2/24 192.168.1.2/24 192.168.3.2/24 Router R3 S0/0 E0/0 Loopback 0 192.168.1.3/24 172.16.4.1/24 10.3.1.1/24 Router R4 E0/0 Loopback 0 Loopback 1 Loopback 2 192.168.3.4/24 10.1.1.1/24 10.1.2.160/24 172.16.5.1/24 C u hình ban đ u : ấ ầ R1 ! Hostname R1 ! Interface Loopback0 Ip 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 ! End R2 ! Hostname R2 ! Interface Ethernet0/0 Ip 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 ! End R3 ! 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 ! End R4 ! Hostname R4 ! Interface Loopback0 Ip 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 ! End Bâ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>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R1 R1(config)#line console 0 R1(config-line)#password cisco R1(config-line)#logging synchronous R1(config-line)#line vty 0 4 R1(config-line)#no login R1(config-line)#exit R1(config)#interface s0/0 R1(config-if)#ip address 192.168.2.1 255.255.255.0 R1(config-if)#clock rate 64000 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#interface f0/1 R1(config-if)#ip address 172.16.1.1 255.255.255.240 R1(config-if)#no keepalive R1(config-if)#no shutdown 00:15:24: %LINK-3-UPDOWN: Interface fastethernet0/1, changed state to up 00:15:25: %LINEPROTO-5-UPDOWN: Line protocol on Interface fastethernet0/1, changed State to up R1(config-if)#interface f0/0 R1(config-if)#ip address 172.16.1.17 255.255.255.240 R1(config-if)#no keepalive R1(config-if)#no shutdown R1(config-if)#exit 00:15:45: %LINK-3-UPDOWN: Interface fastethernet0/0, changed state to up 00:15:46: %LINEPROTO-5-UPDOWN: Line protocol on Interface fastethernet0/0, changed state to up R1(config)#interface loopback 0 R1(config-if)#ip address 192.168.6.1 255.255.255.0 R1(config)#exit R1#copy running-config startup-config Building 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>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R2 R2(config)#line console 0 R2(config-line)#password cisco R2(config-line)#logging synchronous R2(config-line)#line vty 0 4 R2(config-line)#no login R2(config-line)#exit R2(config)#interface s0/0 R2(config-if)#ip address 192.168.2.2 255.255.255.0 R2(config-if)#clock rate 64000 R2(config-if)#no shutdown R2(config-if)#interface s0/1 R2(config-if)#ip address 192.168.1.2 255.255.255.0 R2(config-if)#clock rate 64000 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#interface e0/0 R2(config-if)#ip address 192.168.3.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#exit R2# R2#wr Building 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>enable Router#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R3 R3(config)#line console 0 R3(config-line)#password cisco R3(config-line)#logging synchronous R3(config-line)#line vty 0 4 R3(config-line)#no login R3(config-line)#exit R3(config)#interface s0/0 R3(config-if)#ip address 192.168.1.3 255.255.255.0 R3(config-if)#clock rate 64000 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#interface e0/0 R3(config-if)#ip address 172.16.4.1 255.255.255.0 R3(config-if)#no keepalive R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int loopback 0 R3(config-if)#ip address 10.3.31.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#exit R3#write Building 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>enable Router#configure t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#hostname R4 R4(config)#line console 0 R4(config-line)#password cisco R4(config-line)#logging synchronous R4(config-line)#line vty 0 4 R4(config-line)#no login R4(config-line)#exit R4(config)#interface e0/0 R4(config-if)#ip address 192.168.3.4 255.255.255.0 R4(config-if)#no shutdown R4(config-if)#exit *Mar 1 00:04:19.865: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up R4(config)#interface loopback 0 R4(config-if)#ip address 10.1.1.1 255.255.255.0 R4(config-if)#interface loopback 1 R4(config-if)#ip address 10.1.2.160 255.255.255.0 R4(config-if)#interface loopback 2 R4(config-if)#ip address 172.16.5.1 255.255.255.0 R4(config-if)#exit R4(config)#exit R4#wr Building 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 route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 2 subnets, 1 masks C 172.16.1.0/28 is directly connected, fastethernet0/1 C 172.16.1.16/28 is directly connected, fastethernet0/0 C 192.168.2.0/24 is directly connected, Serial0/0 C 192.168.6.0/24 is directly connected, Loopback0 R2#sh ip route Gateway of last resort is not set C 192.168.1.0/24 is directly connected, Serial0/1 C 192.168.2.0/24 is directly connected, Serial0/0 C 192.168.3.0/24 is directly connected, Ethernet0/0 R3#sh ip route Gateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnets C 172.16.4.0 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.3.1.0 is directly connected, Loopback0 C 192.168.1.0/24 is directly connected, Serial0/0 R4#sh ip route Gateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnets C 172.16.5.0 is directly connected, Loopback2 10.0.0.0/24 is subnetted, 2 subnets C 10.1.2.0 is directly connected, Loopback1 C 10.1.1.0 is directly connected, Loopback0 C 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 1 R1(config-router)#network 172.16.1.0 0.0.0.15 area 0 R1(config-router)#network 172.16.1.16 0 0.0.0.15 area 0 R1(config-router)#network 192.168.2.0 0.0.0.255 area 0 R1(config-router)#network 192.168.6.0 0.0.0.255 area 0 R2(config)#router ospf 1 R2(config-router)#network 192.168.2.0 0.0.0.255 area 0 R2(config-router)#network 192.168.3.0 0.0.0.255 area 0 R2(config-router)#exit R2(config)#router igrp 1 R2(config-router)#network 192.168.1.0 R2(config-router)#exit R3(config)#router igrp 1 R3(config-router)#network 172.16.0.0 R3(config-router)#network 10.0.0.0 R3(config-router)#network 192.168.1.0 R4(config)#router ospf 1 R4(config-router)#network 192.168.3.0 0.0.0.255 area 0 R4(config-router)#network 10.1.1.0 0.0.0.255 area 0 R4(config-router)#network 10.1.2.0 0.0.0.255 area 0 R4(config-router)#network 172.16.5.1 0.0.0.0 area 0 Ki m tra l i b ng đ nh tuy n : ể ạ ả ị ế R1#sh ip route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks O 172.16.5.1/32 [110/75] via 192.168.2.2, 00:00:26, Serial0/0 C 172.16.1.0/28 is directly connected, fastethernet0/1 C 172.16.1.16/28 is directly connected, fastethernet0/0 10.0.0.0/24 is subnetted, 2 subnets O 10.1.1.0 [110/75] via 192.168.2.2, 00:00:26, Serial0/0 O 10.1.2.0 [110/75] via 192.168.2.2, 00:00:26, Serial0/0 C 192.168.2.0/24 is directly connected, Serial0/0 C 192.168.6.0/24 is directly connected, loopback0 O 192.168.3.0/24 [110/74] via 192.168.2.2, 00:00:26, Serial0/0 Quan 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.4 Type 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 ms R1#ping 172.16.5.1 Type 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 ms R2#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.5.1/32 [110/11] via 192.168.3.4, 00:00:04, Ethernet0/0 I 172.16.0.0/16 [100/8576] via 192.168.1.3, 00:00:04, Serial0/1 O 172.16.1.0/28 [110/65] via 192.168.2.1, 00:00:04, Serial0/0 O 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 masks I 10.0.0.0/8 [100/8976] via 192.168.1.3, 00:00:04, Serial0/1 O 10.1.1.0/24 [110/11] via 192.168.3.4, 00:00:04, Ethernet0/0 O 10.1.2.0/24 [110/11] via 192.168.3.4, 00:00:04, Ethernet0/0 O 192.168.6.0/24 [110/65] via 192.168.2.1,00:00:04, Serial0/0 C 192.168.1.0/24 is directly connected, Serial0/1 C 192.168.2.0/24 is directly connected, Serial0/0 C 192.168.3.0/24 is directly connected, Ethernet0/0 Quan 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 và 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 và 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 và 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 và g i route này đi .ử 10.3.1.0/24 cũng đ c gi i thích t ng t và 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 và 10.0.0.0/8. R2#ping 172.16.4.1 Type 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 ms R3#ping 192.168.2.1 Type 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 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 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)ị Load ,có giá tr t 1 – 255 ,m c đ nh là 1 ị ừ ặ ị MTU ,đ n v là octet (m c đ nh là 1500)ơ ị ặ ị 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 và các route đ c redistribute là các 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# Checksum Tag 10.0.0.0 192.168.3.2 8 0x80000006 0xf8a 0 172.16.0.0 192.168.3.2 8 0x80000003 0x12d7 0 192.168.1.0 192.168.3.2 8 0x80000006 0xd464 0 Ta th y các route đ c tô đ m là external route (Type 5 )ấ ượ ậ Ki m tra b ng đ nh tuy n c a các router : ể ả ị ế ủ Tr c h t ta refresh l i b ng đ nh tuy n b ng l nh clear ip route *ướ ế ạ ả ị ế ằ ệ R4#clear ip route * R1#clear ip route * R4#sh ip route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks C 172.16.5.0/24 is directly connected, Loopback2 O E2 172.16.0.0/16 [110/20] via 192.168.3.2, 00:02:34, Ethernet0/0 O 172.16.1.0/28 [110/75] via 192.168.3.2, 00:02:34, Ethernet0/0 O 172.16.1.16/28 [110/75] via 192.168.3.2, 00:02:34, Ethernet0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.2.0/24 is directly connected, Loopback1 C 10.1.1.0/24 is directly connected, Loopback0 O E2 10.0.0.0/8 [110/20] via 192.168.3.2, 00:02:34, Ethernet0/0 O E2 192.168.1.0/24 [110/20] via 192.168.3.2, 00:02:34, Ethernet0/0 O 192.168.2.0/24 [110/74] via 192.168.3.2, 00:02:34, Ethernet0/0 O 192.168.6.0/24 [110/75] via 192.168.3.2, 00:02:34, Ethernet0/0 C 192.168.3.0/24 is directly connected, Ethernet0/0 R1#sh ip route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 5 subnets, 4 masks O 172.16.5.1/32 [110/75] via 192.168.2.2, 00:03:24, Serial0/0 C 172.16.6.0/24 is directly connected, Loopback0 O E2 172.16.0.0/16 [110/20] via 192.168.2.2, 00:03:24, Serial0/0 C 172.16.1.0/28 is directly connected, fastethernet0/1 C 172.16.1.16/28 is directly connected, fastethernet0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O E2 10.0.0.0/8 [110/20] via 192.168.2.2, 00:03:24, Serial0/0 O 10.1.1.0/24 [110/75] via 192.168.2.2, 00:03:24, Serial0/0 O 10.1.2.0/24 [110/75] via 192.168.2.2, 00:03:24, Serial0/0 O E2 192.168.1.0/24 [110/20] via 192.168.2.2, 00:03:24, Serial0/0 C 192.168.2.0/24 is directly connected, Serial0/0 C 192.168.6.0/24 is directly 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 is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/40 ms R4#traceroute 10.3.1.1 Type escape sequence to abort. Tracing the route to 10.3.1.1 1 192.168.3.2 4 msec 4 msec 0 msec 2 192.168.1.3 32 msec 16 msec * R3#clear ip route * R3#sh ip route Gateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnets C 172.16.4.0 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 1 subnets C 10.3.1.0 is directly connected, Loopback0 C 192.168.1.0/24 is directly connected, Serial0/0 I 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:00:07, Serial0/0 I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:00:07, Serial0/0 I 192.168.6.0/24 [100/12100] via 192.168.1.2, 00:00:07, Serial0/0 R3 h c đ c 3 route t bên ngoài .Đó là route 192.168.2.0/24 có metric làọ ượ ừ 10476 , route 192.168.3.0/24 có metric là 8576 và route 192.168.6.0/24 có metric là 12100 .Metric đây đ c tính theo công th c mà ta đã nêu ph nở ượ ứ ở ầ m t.ộ Metric trong câu l nh redistribute các route OSPF vào IGRP ch có ý nghĩa đ iệ ỉ ố v i nh ng route mà R2 h c đ c t OSPF. Đ i v i các route k t n i tr c ti pớ ữ ọ ượ ừ ố ớ ế ố ự ế v i nó thì metric đ c l y m c đ nh trên interface đó. Hai route 192.168.3.0/24ớ ượ ấ ặ ị và 192.168.2.0/24 là 2 route k t n i tr c ti p v i R2 do đó metric c a nó làế ố ự ế ớ ủ metric m c đ nh trên 2 interface ethernet và serial .ặ ị Đ i v i m ng 192.168.2.0 /24ố ớ ạ Băng thông m c đ nh trên serial interface là 1544Kbit , delay m c đ nh trênặ ị ặ ị interface này là 20000µs .T ng delay trên 2 serial interface s là 40000µs .ổ ẽ => BWIGRPmin = 107 / 1544 = 6476 DLYIGRPsum = 40000/10 = 4000 metric = BWIGRPmin + DLYIGRPsum = 6476 + 4000 metric = 10476 Đ i v i m ng 192.168.3.0 /24ố ớ ạ băng thông m c đ nh trên ethernet là 10Mbps => băng thông nh nh t c aặ ị ỏ ấ ủ m ng này đ đ n R3 là băng thông trên serial interface 1554kbit .ạ ể ế Delay m c đ nh trên ethernet interface là 1000 => t ng delay = 20000 +1000 =ặ ị ổ 21000 => BWIGRPmin = 107 / 1544 = 6476 DLYIGRPsum = 21000/10 = 2100 metric = BWIGRPmin + DLYIGRPsum = 6476 + 2100 metric = 8576 đ i v i m ng 192.168.6.0/24 :ố ớ ạ Vì đây không ph i là m ng k t n i tr c ti p v i R2 mà đ c R2 h c đ cả ạ ế ố ự ế ớ ượ ọ ượ 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ượ ế ậ ệ . Băng thông gán cho các route bên ngoài khi đ c redistribute vào IGRP làượ 1000Kbit , băng thông trên serial interface gi a R2 và R3 là 1544Kbit => băngữ thông nh nh t là 1000Kbit .ỏ ấ Delay gán cho các route bên ngoài khi đ c redistribute vào IGRP là 1000µs ượ => t ng delay = 20000 + 1000 = 21000ổ => BWIGRPmin = 107 / 1000 = 10000 DLYIGRPsum = 21000/10 = 2100 metric = BWIGRPmin + DLYIGRPsum = 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 from 192.168.1.2 on Serial0/1, 00:00:07 ago Routing Descriptor Blocks: * 192.168.1.2, from 192.168.1.2, 00:00:07 ago, via Serial0/1 Route metric is 10476, traffic share count is 1 Total delay is 40000 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 0 R3#sh ip route 192.168.3.0 Routing entry for 192.168.3.0/24 Known via "igrp 1", distance 100, metric 8576 Redistributing via igrp 1 Advertised by igrp 1 (self originated) Last update from 192.168.1.2 on Serial0/1, 00:00:07 ago Routing Descriptor Blocks: * 192.168.1.2, from 192.168.1.2, 00:00:07 ago, via Serial0/1 Route metric is 8576, traffic share count is 1 Total delay is 1000 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 0 R3#sh ip route 192.168.6.0 Routing entry for 192.168.6.0/24 Known via "igrp 1", distance 100, metric 12100 Redistributing via igrp 1 Advertised by igrp 1 (self originated) Last update from 192.168.1.2 on Serial0/1, 00:00:07 ago Routing Descriptor Blocks: * 192.168.1.2, from 192.168.1.2, 00:00:07 ago, via Serial0/1 Route metric is 12100, traffic share count is 1 Total delay is 21000 microseconds, minimum bandwidth is 1000 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 0 R3#ping 192.168.3.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms R3#ping 10.1.2.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 10.1.2.1, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) R3#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 0 percent (0/5) Ta ki m tra đ ng đi t R3 đ n 10.1.1.1ể ườ ừ ế R3#traceroute 10.1.1.1 Type escape sequence to abort. Tracing the route to 10.1.1.1 1 * * * 2 * * * 3 * * * à không có đ ng đ n R3 vì trên b ng đ nh tuy n không có route 10.1.1.1ườ ế ả ị ế R2#traceroute 10.1.1.1 Type escape sequence to abort. Tracing the route to 10.1.1.1 1 192.168.3.4 4 msec 4 msec * Trên b ng đ nh tuy n c a R3 ,ta ch th y xu t hi n có 3 route là 192.168.2.0 ,ả ị ế ủ ỉ ấ ấ ệ 192.168.3.0 và 192.168.6.0 còn các route khác không xu t hi n .ấ ệ Lí do là vì IGRP không hi u discontiguos network và VLSM .D a vào các quyể ự t c g i và nh n update c a IGRP ta s gi i thích đ c đi u này nh sau: ắ ử ậ ủ ẽ ả ượ ề ư R2 s qu ng bá nh ng route mà nó h c đ c t OSPF sang cho IGRP .ẽ ả ữ ọ ượ ừ Khi R2 g i update, nó ti n hành ki m tra :ử ế ể Route 172.16.1.0/28 có cùng major network v i 192.168.2.0/24 không ?ớ Không , R2 sunmarize 192.16.1.0/28 thành network có subnet mask v i majorớ net c a nó là 172.16.0.0/16 và g i route này đi .ủ ử Khi R3 nh n update, nó ti n hành ki m tra : ậ ế ể Major network đ c nh n 172.16.0.0 có cùng majornet v i 192.168.1.0 hayượ ậ ớ không? Không , có subnet c a majornet 172.16.0.0 t n t i trong b ng đ nh tuy n màủ ồ ạ ả ị ế R3 h c đ c t các interface khác hay không ?ọ ượ ừ Có , R3 lo i b update ạ ỏ Các route khác đ c gi i thích hoàn toàn t ng t .ượ ả ươ ự Đ gi i quy t v n đ discontiguous network và VLSM ta c u hình static routeể ả ế ấ ề ấ ch cho R3 bi t đ ng đi đ n các m ng trên .ỉ ế ườ ế ạ R3(config)#ip route 10.1.1.0 255.255.255.0 s0/0 R3(config)#ip route 172.16.5.0 255.255.255.0 192.168.1.2 R3(config)#ip route 10.1.2.0 255.255.255.0 192.168.1.2 Các route trên R3 có subnet mask là 24 ,do đó R3 s không hi u nh ng routeẽ ể ữ có subnet mask là 28 .Do đó ta th c hi n summarize nh ng route có mask 28ự ệ ữ thành mask 24 b ng m t static route.ằ ộ R3(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.2 R3#sh ip route Gateway of last resort is not set 172.16.0.0/24 is subnetted, 3 subnets C 172.16.4.0 is directly connected, Ethernet0/0 S 172.16.5.0 [1/0] via 192.168.1.2 S 172.16.1.0 [1/0] via 192.168.1.2 10.0.0.0/24 is subnetted, 3 subnets C 10.3.1.0 is directly connected, Loopback0 S 10.1.2.0 [1/0] via 192.168.1.2 S 10.1.1.0 is directly connected, Serial0/0 C 192.168.1.0/24 is directly connected, Serial0/0 I 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:00:00, Serial0/0 I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:00:00, Serial0/0 I 192.168.6.0/24 [100/12100] via 192.168.1.2, 00:00:00, Serial0/0 Ta c u hình static route v i đ a ch đích là các m ng trên router R4 ,quan sátấ ớ ị ỉ ạ b ng đ nh tuy n ta th y n u ta c u hình ip route đ c theo sau b i đ a chả ị ế ấ ế ấ ượ ở ị ỉ đích ,mask đ quy t đ nh ph n network c a đ a ch đích và đ a ch interfaceể ế ị ầ ủ ị ỉ ị ỉ k t n i tr c ti p c a next-hop router thì trên b ng đ nh tuy n s xu t hi nế ố ự ế ủ ả ị ế ẽ ấ ệ nh sau : ư S 172.16.5.0 [1/0] via 192.168.1.2 S 10.1.2.0 [1/0] via 192.168.1.2 S 172.16.1.0 [1/0] via 192.168.1.2 Cách th hai ,thay vì đ a ch c a next-hop router ta s d ng interface đ đi raứ ị ỉ ủ ử ụ ể ngoài m ng c a router R3 ,trên b ng đ nh tuy n ta th y : ạ ủ ả ị ế ấ S 10.1.1.0 is directly connected, Serial0/0 Các m ng trên đ c xem là k t n i tr c ti p v i interface s0/0 c a router R3.ạ ượ ế ố ự ế ớ ủ S d ng l nh debug đ quan sát xem quá trình g i và nh n update c a R3.ử ụ ệ ể ử ậ ủ R3#debug ip igrp transactions IGRP protocol debugging is on 00:38:47: IGRP: sending update to 255.255.255.255 via Ethernet0/0 (172.16.4.1) 00:38:47: network 10.0.0.0, metric=501 00:38:47: network 192.168.1.0, metric=8476 00:38:47: network 192.168.2.0, metric=10476 00:38:47: network 192.168.3.0, metric=8576 00:38:47: network 192.168.6.0, metric=12100 00:38:47: IGRP: sending update to 255.255.255.255 via Serial0/0 (192.168.1.3) 00:38:47: network 172.16.0.0, metric=1100 00:38:47: network 10.0.0.0, metric=501 00:38:47: IGRP: sending update to 255.255.255.255 via Loopback0 (10.3.1.1) 00:38:47: subnet 10.1.1.0, metric=8476 00:38:47: network 172.16.0.0, metric=1100 00:38:47: network 192.168.1.0, metric=8476 00:38:47: network 192.168.2.0, metric=10476 00:38:47: network 192.168.3.0, metric=8576 00:38:47: network 192.168.6.0, metric=12100 00:38:53: IGRP: received update from 192.168.1.2 on Serial0/0 00:38:53: network 172.16.0.0, metric 10576 (neighbor 8576) 00:38:53: network 10.0.0.0, metric 10976 (neighbor 8976) 00:38:53: network 192.168.2.0, metric 10476 (neighbor 8476) 00:38:53: network 192.168.3.0, metric 8576 (neighbor 1100) R3#ping 172.16.5.1 Type 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 = 28/29/32 ms R3#ping 172.16.1.1 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms R3#ping 172.16.1.17 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 172.16.1.17, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 56/56/56 ms Khi th c 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 ,nó ph i đ c đăngộ ượ ề ả ượ kí m t metric , ASBR s th c hi n vi c này. ộ ẽ ự ệ ệ - Type 1 external path (E1) có cost là t ng c a external cost c ng v i cost c aổ ủ ộ ớ ủ đ ng đ n ASBR ườ ế - Type 2 external path (E2) ch có external cost ,các route E2 không quan tâmỉ đ n internal cost (là cost c a đ ng đ n ASBR). Đ hi u rõ h n ta xem ví dế ủ ườ ế ể ể ơ ụ sau đây : (có hình v bên d i )ẽ ướ Router A có 2 đ ng đ n đích bên ngoài 10.1.2.0. N u đích đ c qu ng bá làườ ế ế ượ ả E1, đ ng A –B- D s có cost là 35 (5 + 20 + 10) và đ c u tiên h nườ ẽ ượ ư ơ đ ng A – C- D có cost là 50 (30 + 10 + 10) .N u đích đ c qu ng bá là E2ươ ế ượ ả ,đ ng A -B- D có cost là 30 (20 + 10 ) và đ ng A – C- D có cost là 20 (10 +ườ ườ 10 ) ,lúc này b qua cost đ n ASBR và đ ng th hai s đ c u tiên h n.ỏ ế ườ ứ ẽ ượ ư ơ Ki m tra b ng đ nh tuy n c a các router :ể ả ị ế ủ R1#sh ip route Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 4 subnets, 3 masks C 172.16.1.16/28 is directly connected, fastethernet0/0 O 172.16.5.1/32 [110/75] via 192.168.2.2, 00:31:42, Serial0/0 O E1 172.16.0.0/16 [110/84] via 192.168.2.2, 00:00:36, Serial0/0 C 172.16.1.0/28 is directly connected, fastethernet0/1 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks O E1 10.0.0.0/8 [110/84] via 192.168.2.2, 00:00:36, Serial0/0 O 10.1.1.0/24 [110/75] via 192.168.2.2, 00:31:42, Serial0/0 O 10.1.2.0/24 [110/75] via 192.168.2.2, 00:31:42, Serial0/0 O E1 192.168.1.0/24 [110/84] via 192.168.2.2, 00:00:36, Serial0/0 C 192.168.2.0/24 is directly connected, Serial0/0 C 192.168.6.0/24 is directly connected, Loopback0 O 192.168.3.0/24 [110/74] via 192.168.2.2, 00:31:42, Serial0/0 Trên b ng đ nh tuy n ta th y ,cost c a các external route là 84 (64 + 20 ) thayả ị ế ấ ủ vì 20 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] via 192.168.3.2, 00:32:06, Ethernet0/0 C 172.16.5.0/24 is directly connected, Loopback2 O E1 172.16.0.0/16 [110/30] via 192.168.3.2, 00:01:00, Ethernet0/0 O 172.16.1.0/28 [110/75] via 192.168.3.2, 00:32:06, Ethernet0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.2.0/24 is directly connected, Loopback1 C 10.1.1.0/24 is directly connected, Loopback0 O E1 10.0.0.0/8 [110/30] via 192.168.3.2, 00:01:00, Ethernet0/0 O E1 192.168.1.0/24 [110/30] via 192.168.3.2, 00:01:00, Ethernet0/0 O 192.168.2.0/24 [110/74] via 192.168.3.2, 00:32:06, Ethernet0/0 O 192.168.6.0/24 [110/74] via 192.168.3.2, 00:32:06, Ethernet0/0 C 192.168.3.0/24 is directly connected, Ethernet0/0 Cost c a các external route là 30 (10 + 20) thay vì 20 nh ban đ u .ủ ư ầ Ta th thay đ i các thông s v metric c a các external route đ c redistributeử ổ ố ề ủ ượ vào OSPF r i ki m tra b ng l nh show ip route :ồ ể ằ ệ R2(config)#router ospf 1 R2(config-router)#no redistribute igrp 1 metric 20 metric-type 1 subnets R2(config-router)#redistribute igrp 1 metric 30 metric-type 1 subnets R4#sh ip route Gateway of last resort is not set O E1 172.16.0.0/16 [110/40] via 192.168.3.2, 00:01:00, Ethernet0/0 O E1 10.0.0.0/8 [110/40] via 192.168.3.2, 00:01:00, Ethernet0/0 O E1 192.168.1.0/24 [110/40] via 192.168.3.2, 00:01:00, Ethernet0/0 R2(config)#router ospf 1 R2(config-router)#no redistribute igrp 1 metric 30 metric-type 1 subnets R2(config-router)#redistribute igrp 1 metric 10 metric-type 1 subnets R4#sh ip route Gateway of last resort is not set O E1 172.16.0.0/16 [110/20] via 192.168.3.2, 00:00:12, Ethernet0/0 O E1 10.0.0.0/8 [110/20] via 192.168.3.2, 00:00:12, Ethernet0/0 O E1 192.168.1.0/24 [110/20] via 192.168.3.2, 00:00:12, Ethernet0/0 R1#sh ip route O E1 172.16.0.0/16 [110/74] via 192.168.2.2, 00:14:07, Serial0/0 O 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] via 192.168.3.2, 01:19:52, Ethernet0/0 C 172.16.5.0/24 is directly connected, Loopback2 O E2 172.16.0.0/16 [110/20] via 192.168.3.2, 00:00:57, Ethernet0/0 O 172.16.1.0/28 [110/75] via 192.168.3.2, 01:19:52, Ethernet0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.2.0/24 is directly connected, Loopback1 C 10.1.1.0/24 is directly connected, Loopback0 O E2 10.0.0.0/8 [110/20] via 192.168.3.2, 00:00:57, Ethernet0/0 O E2 192.168.1.0/24 [110/20] via 192.168.3.2, 00:00:57, Ethernet0/0 O 192.168.2.0/24 [110/74] via 192.168.3.2, 01:19:52, Ethernet0/0 O 192.168.6.0/24 [110/74] via 192.168.3.2, 01:19:52, Ethernet0/0 C 192.168.3.0/24 is directly 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 , và 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 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] via 192.168.3.2, 01:28:16, Ethernet0/0 C 172.16.5.0/24 is directly connected, Loopback2 O E1 172.16.0.0/16 [110/30] via 192.168.3.2, 00:00:18, Ethernet0/0 O 172.16.1.0/28 [110/75] via 192.168.3.2, 01:28:16, Ethernet0/0 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks C 10.1.2.0/24 is directly connected, Loopback1 C 10.1.1.0/24 is directly connected, Loopback0 O E1 10.0.0.0/8 [110/30] via 192.168.3.2, 00:00:18, Ethernet0/0 O E1 192.168.1.0/24 [110/30] via 192.168.3.2, 00:00:18, Ethernet0/0 O 192.168.2.0/24 [110/74] via 192.168.3.2, 01:28:16, Ethernet0/0 O 192.168.6.0/24 [110/74] via 192.168.3.2, 01:28:16, Ethernet0/0 C 192.168.3.0/24 is directly connected, Ethernet0/0 Nh đã nói trên ,n u trong câu l nh redistribute không ch ra metric c thư ở ế ệ ỉ ụ ể ho c là không có m t default- metric thì metric s là 0 cho các route đ cặ ộ ẽ ượ redistribute vào các giao th c khác OSPF. Đ i v i IS-IS nó s hi u metric 0,ứ ố ớ ẽ ể nh ng v i các giao th c khác nh RIP ,IGRP , EIGRP s không hi u metric 0ư ớ ứ ư ẽ ể vì RIP có metric là hop-count có giá tr t 1 – 16, IGRP và EIGRP có metricị ừ thu c multi-metric. Do đó n u trong tr ng h p này ,redistribute s không làmộ ế ườ ợ ẽ vi c.ệ R2(config)# router igrp 1 R2(config-router)#no redistribute ospf 1 metric 1000 100 255 1 1500 R2(config-router)#redistribute ospf 1 R3#sh ip route Gateway of last resort is not set 172.16.0.0/24 is subnetted, 3 subnets C 172.16.4.0 is directly connected, Ethernet0/0 S 172.16.5.0 [1/0] via 192.168.1.2 S 172.16.1.0 [1/0] via 192.168.1.2 10.0.0.0/24 is subnetted, 3 subnets C 10.3.1.0 is directly connected, Loopback0 S 10.1.2.0 [1/0] via 192.168.1.2 S 10.1.1.0 is directly connected, Serial0/0 C 192.168.1.0/24 is directly connected, Serial0/0 I 192.168.2.0/24 is possibly down, routing via 192.168.1.2, Serial0/0 I 192.168.3.0/24 is possibly down, routing via 192.168.1.2, Serial0/0 I 192.168.6.0/24 is possibly down, routing via 192.168.1.2, Serial0/0 B t debug lên đ quan sát :ậ ể R3#debug ip igrp transactions IGRP protocol debugging is on 01:12:37: IGRP: received update from 192.168.1.2 on Serial0/0 01:12:37: network 192.168.2.0, metric=4294967295 (inaccessible) 01:12:37: network 192.168.3.0, metric=4294967295 (inaccessible) 01:12:37: network 192.168.6.0, metric=4294967295 (inaccessible) 01:12:37: IGRP: sending update to 255.255.255.255 via Ethernet0/0 (172.16.4.1) 01:12:37: network 192.168.2.0, metric=4294967295 01:12:37: network 192.168.3.0, metric=4294967295 01:12:37: network 192.168.6.0, metric=4294967295 01:12:37: IGRP: sending update to 255.255.255.255 via Serial0/0 (192.168.1.3) 01:12:37: network 192.168.2.0, metric=4294967295 01:12:37: network 192.168.3.0, metric=4294967295 01:12:37: network 192.168.6.0, metric=4294967295 01:12:37: IGRP: sending update to 255.255.255.255 via Loopback0 (10.3.1.1) 01:12:37: network 192.168.2.0, metric=4294967295 01:12:37: network 192.168.3.0, metric=4294967295 01:12:37: network 192.168.6.0, metric=4294967295 Quan sát b ng đ nh tuy n và debug ta th y n u không có metric trong câu l nhả ị ế ấ ế ệ redistribute thì 3 external route đ c h c t IGRP b đ a v tr ng thái possiblyượ ọ ừ ị ư ề ạ down .N u R3 không nh n đ c thông tin gì v 3 route này v i metric t t h nế ậ ượ ề ớ ố ơ 3 external route s đ c gi l i trong b ng đ nh tuy n cho đ n khi flush timerẽ ượ ữ ạ ả ị ế ế trôi qua (m c đ nh flush timer trong igrp là 630s) .Ta ki m tra l i b ng đ nhặ ị ể ạ ả ị tuy n c a R3 :ế ủ R3#clear ip route * R3#sh ip route Gateway of last resort is not set 172.16.0.0/24 is subnetted, 3 subnets C 172.16.4.0 is directly connected, Ethernet0/0 S 172.16.5.0 [1/0] via 192.168.1.2 S 172.16.1.0 [1/0] via 192.168.1.2 10.0.0.0/24 is subnetted, 3 subnets C 10.3.1.0 is directly connected, Loopback0 S 10.1.2.0 [1/0] via 192.168.1.2 S 10.1.1.0 is directly connected, Serial0/0 C 192.168.1.0/24 is directly connected, Serial0/0 Không còn th y 3 external route đ c h c t IGRP trong b ng đ nh tuy n n aấ ượ ọ ừ ả ị ế ữ . Bây gi ta thêm ph n metric trong câu l nh redistribute thì b ng đ nh tuy nờ ầ ệ ả ị ế c a R3 s xu t hi n nh tr c .ủ ẽ ấ ệ ư ướ Câu l nh default - metric cho phép ta c u hình m c đ nh v metric khi th cệ ấ ặ ị ề ự hi n redistribute. Nó hi u d ng trong tr ng h p các route đ c redistributeệ ệ ụ ườ ợ ượ t nhi u source .Metric đ c đăng kí b ng cách s d ng metric trong l 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 100 255 255 1500 Network 192.168.1.0 Default-metric 5000 100 255 1 1500 ! 01:19:19: IGRP: sending update to 255.255.255.255 via Ethernet0/0 (172.16.4.1) 01:19:19: network 10.0.0.0, metric=501 01:19:19: network 192.168.1.0, metric=8476 01:19:19: network 192.168.2.0, metric=10476 01:19:19: network 192.168.3.0, metric=8576 01:19:19: network 192.168.6.0, metric=12100 01:19:19: IGRP: sending update to 255.255.255.255 via Serial0/0 (192.168.1.3) 01:19:19: network 172.16.0.0, metric=1100 01:19:19: network 10.0.0.0, metric=501 01:19:19: IGRP: sending update to 255.255.255.255 via Loopback0 (10.3.1.1) 01:19:19: subnet 10.1.1.0, metric=8476 01:19:19: network 172.16.0.0, metric=1100 01:19:19: network 192.168.1.0, metric=8476 01:19:19: network 192.168.2.0, metric=10476 01:19:19: network 192.168.3.0, metric=8576 01:19:19: network 192.168.6.0, metric=12100 01:19:44: IGRP: received update from 192.168.1.2 on Serial0/0 01:19:44: network 172.16.0.0, metric 10576 (neighbor 8576) 01:19:44: network 10.0.0.0, metric 10976 (neighbor 8976) 01:19:44: network 192.168.2.0, metric 10476 (neighbor 8476) 01:19:44: network 192.168.3.0, metric 8576 (neighbor 1100) Ki m tra l i b ng đ nh tuy n c a R3 ,ta th y metric v n không thay đ i .ể ạ ả ị ế ủ ấ ẫ ổ R3#sh ip route I 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:03:30, Serial0/0 I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:03:30, Serial0/0 I 192.168.6.0/24 [100/12100] via 192.168.1.2, 00:03:30, Serial0/0 N u b ph n metric trong câu l nh redistribute thì default- metric s đ c sế ỏ ầ ệ ẽ ượ ử d ng .ụ R2#show running-config ! Router igrp 1 Redistribute ospf 1 Network 192.168.1.0 Default-metric 5000 100 255 1 1500 ! R3#sh ip route I 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:03:30, Serial0/0 I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:03:30, Serial0/0 I 192.168.6.0/24 [100/8576] via 192.168.1.2, 00:03:30, Serial0/0 R3#sh ip route 192.168.6.0 Routing entry for 192.168.6.0/24 Known via "igrp 1", distance 100, metric 8576 Redistributing via igrp 1 Advertised by igrp 1 (self originated) Last update from 192.168.1.2 on Serial0/1, 00:02:07 ago Routing Descriptor Blocks: * 192.168.1.2, from 192.168.1.2, 00:02:07 ago, via Serial0/1 Route metric is 12100, traffic share count is 1 Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 0 Ta đã bi t khi th c hi n update, IGRP s broadcast ra toàn m ng , do đó đế ự ệ ẽ ạ ể ti t ki m tài nguyên m ng và đ tránh cho OSPF nh n update có nh ng thôngế ệ ạ ể ậ ữ tin không c n thi t thì sau khi đã hoàn t t c u hình, ta nênầ ế ấ ấ s d ng thêm l nh passive-interface đ t interface s0/1 c a router R2. L nhử ụ ệ ặ ở ủ ệ này có ý nghĩa cho phép router nh n nh ng không g i update ra ngoài .Khôngậ ư ử nên s d ng l nh này đ i v i OSPF vì nó s ch n luôn quá trình trao đ i góiử ụ ệ ố ớ ẽ ặ ổ tin hello d n đ n m i quan h láng gi ng không đ c thành l p.ẫ ế ố ệ ề ượ ậ

Các file đính kèm theo tài liệu này:

  • pdfRedistribute giữa OSPF và IGRP.pdf