35
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 192.168.2.2/24 192.168.1.2/24

Redistribute Giữa OSPF Và IGRP

Embed Size (px)

DESCRIPTION

Redistribute Giữa OSPF Và IGRP

Citation preview

Page 1: Redistribute Giữa OSPF Và IGRP

Redistribute giữa OSPF và IGRPTá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/1F0/0Loopback 0

192.168.2.1/24172.16.1.1/28172.16.1.17/28192.168.6.1/24

Router R2 S0/0S0/1E0/0

192.168.2.2/24192.168.1.2/24192.168.3.2/24

Router R3 S0/0E0/0Loopback 0

192.168.1.3/24172.16.4.1/2410.3.1.1/24

Router R4 E0/0Loopback 0Loopback 1Loopback 2

192.168.3.4/2410.1.1.1/2410.1.2.160/24172.16.5.1/24

Page 2: Redistribute Giữa OSPF Và IGRP

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!End

R2!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!End

R3!Hostname R3!Interface Loopback0 Ip address 10.3.1.1 255.255.255.0!

Page 3: Redistribute Giữa OSPF Và IGRP

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 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!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>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 loginR1(config-line)#exit

Page 4: Redistribute Giữa OSPF Và IGRP

R1(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 shutdown

00: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 up

R1(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)#exit

00: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 up

R1(config)#interface loopback 0R1(config-if)#ip address 192.168.6.1 255.255.255.0R1(config)#exit

R1#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 0R2(config-line)#password cisco

Page 5: Redistribute Giữa OSPF Và IGRP

R2(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.0R3(config-if)#no keepalive

Page 6: Redistribute Giữa OSPF Và IGRP

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 up

R4(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)

Page 7: Redistribute Giữa OSPF Và IGRP

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, Loopback0

R2#sh ip route<omitted>Gateway of last resort is not set

C 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/0

R3#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/0

R4#sh ip route

Gateway 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.

Page 8: Redistribute Giữa OSPF Và IGRP

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 0

R2(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)#exit

R2(config)#router igrp 1R2(config-router)#network 192.168.1.0R2(config-router)#exit

R3(config)#router igrp 1R3(config-router)#network 172.16.0.0R3(config-router)#network 10.0.0.0R3(config-router)#network 192.168.1.0

R4(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 0

Kiể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/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

Page 9: Redistribute Giữa OSPF Và IGRP

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 ms

R1#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 ms

R2#sh ip route

Gateway 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/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ể

Page 10: Redistribute Giữa OSPF Và IGRP

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 BRoute 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.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 ms

R3#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)Load ,có giá trị từ 1 – 255 ,mặc định là 1

Page 11: Redistribute Giữa OSPF Và IGRP

MTU ,đơn vị là octet (mặc định là 1500)

R2(config)#router ospf 1R2(config-router)#redistribute igrp 1 metric 20 subnetsR2(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 Tag10.0.0.0 192.168.3.2 8 0x80000006 0xf8a 0172.16.0.0 192.168.3.2 8 0x80000003 0x12d7 0192.168.1.0 192.168.3.2 8 0x80000006 0xd464 0Ta 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 routeGateway of last resort is not set

172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksC 172.16.5.0/24 is directly connected, Loopback2O E2 172.16.0.0/16 [110/20] via 192.168.3.2, 00:02:34, Ethernet0/0O 172.16.1.0/28 [110/75] via 192.168.3.2, 00:02:34, Ethernet0/0O 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 masksC 10.1.2.0/24 is directly connected, Loopback1C 10.1.1.0/24 is directly connected, Loopback0O E2 10.0.0.0/8 [110/20] via 192.168.3.2, 00:02:34, Ethernet0/0O E2 192.168.1.0/24 [110/20] via 192.168.3.2, 00:02:34, Ethernet0/0O 192.168.2.0/24 [110/74] via 192.168.3.2, 00:02:34, Ethernet0/0

Page 12: Redistribute Giữa OSPF Và IGRP

O 192.168.6.0/24 [110/75] via 192.168.3.2, 00:02:34, Ethernet0/0C 192.168.3.0/24 is directly connected, Ethernet0/0

R1#sh ip routeGateway of last resort is not set

172.16.0.0/16 is variably subnetted, 5 subnets, 4 masksO 172.16.5.1/32 [110/75] via 192.168.2.2, 00:03:24, Serial0/0C 172.16.6.0/24 is directly connected, Loopback0O E2 172.16.0.0/16 [110/20] via 192.168.2.2, 00:03:24, 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/8 is variably subnetted, 3 subnets, 2 masksO E2 10.0.0.0/8 [110/20] via 192.168.2.2, 00:03:24, Serial0/0O 10.1.1.0/24 [110/75] via 192.168.2.2, 00:03:24, Serial0/0O 10.1.2.0/24 [110/75] via 192.168.2.2, 00:03:24, Serial0/0O E2 192.168.1.0/24 [110/20] via 192.168.2.2, 00:03:24, 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: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.1Type 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.1Type 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 subnetsC 172.16.4.0 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 1 subnets

Page 13: Redistribute Giữa OSPF Và IGRP

C 10.3.1.0 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, Serial0/0I 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:00:07, Serial0/0I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:00:07, Serial0/0I 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 /24Bă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 = 4000metric = BWIGRPmin + DLYIGRPsum = 6476 + 4000 metric = 10476

Đối với mạng 192.168.3.0 /24bă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 = 2100metric = 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 = 2100metric = BWIGRPmin + DLYIGRPsum = 10000 + 2100

Page 14: Redistribute Giữa OSPF Và IGRP

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.0Routing 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.0Routing 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.0Routing 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.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.2, timeout is 2 seconds:!!!!!

Page 15: Redistribute Giữa OSPF Và IGRP

Success rate is 100 percent (5/5), round-trip min/avg/max = 28/28/32 ms

R3#ping 10.1.2.1Type 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.1Type 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.1R3#traceroute 10.1.1.1Type 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.1Type 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 ?

Page 16: Redistribute Giữa OSPF Và IGRP

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/0R3(config)#ip route 172.16.5.0 255.255.255.0 192.168.1.2R3(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 routeGateway of last resort is not set

172.16.0.0/24 is subnetted, 3 subnetsC 172.16.4.0 is directly connected, Ethernet0/0S 172.16.5.0 [1/0] via 192.168.1.2S 172.16.1.0 [1/0] via 192.168.1.2 10.0.0.0/24 is subnetted, 3 subnetsC 10.3.1.0 is directly connected, Loopback0S 10.1.2.0 [1/0] via 192.168.1.2S 10.1.1.0 is directly connected, Serial0/0C 192.168.1.0/24 is directly connected, Serial0/0I 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:00:00, Serial0/0I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:00:00, Serial0/0I 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.2Cá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/0Cá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

Page 17: Redistribute Giữa OSPF Và IGRP

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=50100:38:47: network 192.168.1.0, metric=847600:38:47: network 192.168.2.0, metric=1047600:38:47: network 192.168.3.0, metric=857600:38:47: network 192.168.6.0, metric=1210000: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=110000:38:47: network 10.0.0.0, metric=50100: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=847600:38:47: network 172.16.0.0, metric=110000:38:47: network 192.168.1.0, metric=847600:38:47: network 192.168.2.0, metric=1047600:38:47: network 192.168.3.0, metric=857600:38:47: network 192.168.6.0, metric=1210000:38:53: IGRP: received update from 192.168.1.2 on Serial0/000: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.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 = 28/29/32 ms

R3#ping 172.16.1.1Type 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.17Type 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

Page 18: Redistribute Giữa OSPF Và IGRP

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 1R2(config-router)#no redistribute igrp 1 metric 20 subnetsR2(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 routeGateway of last resort is not set

172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksC 172.16.1.16/28 is directly connected, fastethernet0/0O 172.16.5.1/32 [110/75] via 192.168.2.2, 00:31:42, Serial0/0O E1 172.16.0.0/16 [110/84] via 192.168.2.2, 00:00:36, Serial0/0C 172.16.1.0/28 is directly connected, fastethernet0/1 10.0.0.0/8 is variably subnetted, 3 subnets, 2 masksO E1 10.0.0.0/8 [110/84] via 192.168.2.2, 00:00:36, Serial0/0O 10.1.1.0/24 [110/75] via 192.168.2.2, 00:31:42, Serial0/0O 10.1.2.0/24 [110/75] via 192.168.2.2, 00:31:42, Serial0/0O E1 192.168.1.0/24 [110/84] via 192.168.2.2, 00:00:36, Serial0/0C 192.168.2.0/24 is directly connected, Serial0/0

Page 19: Redistribute Giữa OSPF Và IGRP

C 192.168.6.0/24 is directly connected, Loopback0O 192.168.3.0/24 [110/74] via 192.168.2.2, 00:31:42, Serial0/0Trê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 routeGateway of last resort is not set

172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksO 172.16.1.16/28 [110/75] via 192.168.3.2, 00:32:06, Ethernet0/0C 172.16.5.0/24 is directly connected, Loopback2O E1 172.16.0.0/16 [110/30] via 192.168.3.2, 00:01:00, Ethernet0/0O 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 masksC 10.1.2.0/24 is directly connected, Loopback1C 10.1.1.0/24 is directly connected, Loopback0O E1 10.0.0.0/8 [110/30] via 192.168.3.2, 00:01:00, Ethernet0/0O E1 192.168.1.0/24 [110/30] via 192.168.3.2, 00:01:00, Ethernet0/0O 192.168.2.0/24 [110/74] via 192.168.3.2, 00:32:06, Ethernet0/0O 192.168.6.0/24 [110/74] via 192.168.3.2, 00:32:06, Ethernet0/0C 192.168.3.0/24 is directly connected, Ethernet0/0Cost 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 1R2(config-router)#no redistribute igrp 1 metric 20 metric-type 1 subnetsR2(config-router)#redistribute igrp 1 metric 30 metric-type 1 subnets

R4#sh ip routeGateway of last resort is not set

O E1 172.16.0.0/16 [110/40] via 192.168.3.2, 00:01:00, Ethernet0/0O E1 10.0.0.0/8 [110/40] via 192.168.3.2, 00:01:00, Ethernet0/0O E1 192.168.1.0/24 [110/40] via 192.168.3.2, 00:01:00, Ethernet0/0

R2(config)#router ospf 1R2(config-router)#no redistribute igrp 1 metric 30 metric-type 1 subnetsR2(config-router)#redistribute igrp 1 metric 10 metric-type 1 subnets

R4#sh ip routeGateway 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

Page 20: Redistribute Giữa OSPF Và IGRP

O E1 10.0.0.0/8 [110/20] via 192.168.3.2, 00:00:12, Ethernet0/0O 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/0O E1 10.0.0.0/8 [110/74] via 192.168.2.2, 00:14:07, Serial0/0O E1 192.168.1.0/24 [110/74] via 192.168.2.2, 00:14:07, Serial0/0

R2(config)#router ospf 1R2(config-router)#no redistribute igrp 1 metric 10 metric-type 1 subnetsR2(config-router)# redistribute igrp 1 subnets

R4#sh ip routeGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksO 172.16.1.16/28 [110/75] via 192.168.3.2, 01:19:52, Ethernet0/0C 172.16.5.0/24 is directly connected, Loopback2O E2 172.16.0.0/16 [110/20] via 192.168.3.2, 00:00:57, Ethernet0/0O 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 masksC 10.1.2.0/24 is directly connected, Loopback1C 10.1.1.0/24 is directly connected, Loopback0O E2 10.0.0.0/8 [110/20] via 192.168.3.2, 00:00:57, Ethernet0/0O E2 192.168.1.0/24 [110/20] via 192.168.3.2, 00:00:57, Ethernet0/0O 192.168.2.0/24 [110/74] via 192.168.3.2, 01:19:52, Ethernet0/0O 192.168.6.0/24 [110/74] via 192.168.3.2, 01:19:52, Ethernet0/0C 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 1R2(config-router)#no redistribute igrp 1 subnetsR2(config-router)#redistribute igrp 1 metric-type 1 subnets R4#sh ip routeGateway of last resort is not set

172.16.0.0/16 is variably subnetted, 4 subnets, 3 masksO 172.16.1.16/28 [110/75] via 192.168.3.2, 01:28:16, Ethernet0/0C 172.16.5.0/24 is directly connected, Loopback2O E1 172.16.0.0/16 [110/30] via 192.168.3.2, 00:00:18, Ethernet0/0O 172.16.1.0/28 [110/75] via 192.168.3.2, 01:28:16, Ethernet0/0

Page 21: Redistribute Giữa OSPF Và IGRP

10.0.0.0/8 is variably subnetted, 3 subnets, 2 masksC 10.1.2.0/24 is directly connected, Loopback1C 10.1.1.0/24 is directly connected, Loopback0O E1 10.0.0.0/8 [110/30] via 192.168.3.2, 00:00:18, Ethernet0/0O E1 192.168.1.0/24 [110/30] via 192.168.3.2, 00:00:18, Ethernet0/0O 192.168.2.0/24 [110/74] via 192.168.3.2, 01:28:16, Ethernet0/0O 192.168.6.0/24 [110/74] via 192.168.3.2, 01:28:16, Ethernet0/0C 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 1R2(config-router)#no redistribute ospf 1 metric 1000 100 255 1 1500R2(config-router)#redistribute ospf 1

R3#sh ip routeGateway of last resort is not set

172.16.0.0/24 is subnetted, 3 subnetsC 172.16.4.0 is directly connected, Ethernet0/0S 172.16.5.0 [1/0] via 192.168.1.2S 172.16.1.0 [1/0] via 192.168.1.2 10.0.0.0/24 is subnetted, 3 subnetsC 10.3.1.0 is directly connected, Loopback0S 10.1.2.0 [1/0] via 192.168.1.2S 10.1.1.0 is directly connected, Serial0/0C 192.168.1.0/24 is directly connected, Serial0/0I 192.168.2.0/24 is possibly down, routing via 192.168.1.2, Serial0/0I 192.168.3.0/24 is possibly down, routing via 192.168.1.2, Serial0/0I 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)

Page 22: Redistribute Giữa OSPF Và IGRP

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=429496729501:12:37: network 192.168.3.0, metric=429496729501:12:37: network 192.168.6.0, metric=429496729501: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=429496729501:12:37: network 192.168.3.0, metric=429496729501:12:37: network 192.168.6.0, metric=429496729501: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=429496729501:12:37: network 192.168.3.0, metric=429496729501: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 routeGateway of last resort is not set

172.16.0.0/24 is subnetted, 3 subnetsC 172.16.4.0 is directly connected, Ethernet0/0S 172.16.5.0 [1/0] via 192.168.1.2S 172.16.1.0 [1/0] via 192.168.1.2 10.0.0.0/24 is subnetted, 3 subnetsC 10.3.1.0 is directly connected, Loopback0S 10.1.2.0 [1/0] via 192.168.1.2S 10.1.1.0 is directly connected, Serial0/0C 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 1R2(config-router)#default-metric 5000 100 255 1 1500

Page 23: Redistribute Giữa OSPF Và IGRP

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=50101:19:19: network 192.168.1.0, metric=847601:19:19: network 192.168.2.0, metric=1047601:19:19: network 192.168.3.0, metric=857601:19:19: network 192.168.6.0, metric=1210001: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=110001:19:19: network 10.0.0.0, metric=50101: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=847601:19:19: network 172.16.0.0, metric=110001:19:19: network 192.168.1.0, metric=847601:19:19: network 192.168.2.0, metric=1047601:19:19: network 192.168.3.0, metric=857601:19:19: network 192.168.6.0, metric=1210001:19:44: IGRP: received update from 192.168.1.2 on Serial0/001: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 routeI 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:03:30, Serial0/0I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:03:30, Serial0/0I 192.168.6.0/24 [100/12100] via 192.168.1.2, 00:03:30, Serial0/0Nếu bỏ phần metric trong câu lệnh redistribute thì default- metric sẽ được sử dụng .

R2#show running-config !

Page 24: Redistribute Giữa OSPF Và IGRP

Router igrp 1 Redistribute ospf 1 Network 192.168.1.0 Default-metric 5000 100 255 1 1500!

R3#sh ip routeI 192.168.2.0/24 [100/10476] via 192.168.1.2, 00:03:30, Serial0/0I 192.168.3.0/24 [100/8576] via 192.168.1.2, 00:03:30, Serial0/0I 192.168.6.0/24 [100/8576] via 192.168.1.2, 00:03:30, Serial0/0

R3#sh ip route 192.168.6.0Routing 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.