Redistribute giữa ISIS và OSPF

22 604 2
Redistribute giữa ISIS và OSPF

Đ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 sẽ thực hiện redistribute giữa hai giao thức classless là OSPF và ISIS với nhau .

Redistribute gi a ISIS OSPFữTác gi : Nguy n Th Băng Tâm ả ễ ịTrong bài này s th c hi n redistribute gi a hai giao th c classless là OSPF vàẽ ự ệ ữ ứ ISIS v i nhau .ớM c tiêu bài làmụ :Th c hi n multiple redistribute points (redistribute t i nhi u đi m )ự ệ ạ ề ểCh ra v n đ g p ph i khi redistribute cách gi i quy t v n đ đó .ỉ ấ ề ặ ả ả ế ấ ềT m t router ping th y t t c các đ a ch trong m ng .ừ ộ ấ ấ ả ị ỉ ạMô hình m ng nh sau : router R3 R4 s ch y giao th c OSPF , R5 ch yạ ư ẽ ạ ứ ạ giao th c ISIS. Router R4 R1 s là các router th c hi n redistribute .ứ ẽ ự ệĐ a ch trên các interface c a các router :ị ỉ ủRouter Interface đ a chị ỉRouter R1 E0/0S0/0172.16.1.1/24172.16.2.2 /30Router R2 S0/0E0/0172.16.2.1/30192.168.4.2/24Router R3 E0/0S0/0192.168.4.1/24192.168.1.1/24Router R4 S0/1S0/0192.168.1.2/24192.168.2.1/30Router R5 S0/0E0/0Loopback 0192.168.2.2/30172.16.1.2/2410.1.1.1/24 C u hình ban đ u : ấ ầR1!hostname R1!enable password cisco!interface Ethernet0/0 ip address 172.16.1.1 255.255.255.0!interface Serial0/0ip address 172.16.2.2 255.255.255.252!endR2!hostname R2!interface Ethernet0/0 ip address 192.168.4.2 255.255.255.0!interface Serial0/0 ip address 172.16.2.1 255.255.255.252 clockrate 64000!ip classless!endR3!hostname R3!interface Ethernet0/0 ip address 192.168.4.1 255.255.255.0 half-duplex!interface Serial0/0 ip address 192.168.1.1 255.255.255.0 no fair-queue!endR4!hostname R4!interface Ethernet0/0 ip address 192.168.100.1 255.255.255.0!interface Serial0/0 ip address 192.168.2.1 255.255.255.0 clockrate 64000 no fair-queue!interface Serial0/1 ip address 192.168.1.2 255.255.255.0 clockrate 64000!ip http serverip classless!endR5!hostname R5!interface Loopback0 ip address 10.1.1.1 255.255.255.0 no ip directed-broadcast!interface Ethernet0/0ip address 172.16.1.2 255.255.255.0 no ip directed-broadcast!interface Serial0/0 ip address 192.168.2.2 255.255.255.252!ip classlessendC u hình ban đ u cho các router :ấ ầR1 Router# 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)#loginR1(config)#line vty 0 4R1(config-line)#password ciscoR1(config-line)#loginR1(config-line)#exitR1(config)#enable password ciscoR1(config)#interface s0/0R1(config-if)#ip address 172.16.2.2 255.255.255.252 R1(config-if)#clock rate 64000R1(config-if)#no shutdownR1(config-if)#int e0/0R1(config-if)#ip address 172.16.1.1 255.255.255.0R1(config-if)#no shutdownR1(config-if)#exitR1(config)#c u hình cho router R2 : ấRouter>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2R2(config)#line console 0R2(config-line)#password ciscoR2(config-line)#line vty 0 4R2(config-line)#no loginR2(config-line)#exitR2(config)#interface e0/0R2(config-if)#ip address 192.168.4.2 255.255.255.0R2(config-if)#no shutdownR2(config-if)#interface s0/0R2(config-if)#ip address 172.16.2.1 255.255.255.252R2(config-if)#clock rate 64000R2(config-if)#no shutdownR2(config-if)#exitR2(config)#^ZR2# c u hình cho router R3 : ấRouter# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R3R3(config)#line console 0R3(config-line)#password ciscoR3(config-line)#line vty 0 4R3(config-line)#no loginR3(config-line)#exitR3(config)#interface s0/0R3(config-if)#ip address 192.168.1.1 255.255.255.0R3(config-if)#clock rate 64000R3(config-if)#no shutdownR3(config-if)#interface e0/0R3(config-if)#ip address 192.168.4.1 255.255.255.0R3(config-if)#no shutdownR3(config-if)#exitR3(config)#^ZR3#c u hình cho router R4 :ấRouter# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R4R4(config)#line console 0R4(config-line)#password ciscoR4(config-line)#line vty 0 4R4(config-line)#no loginR4(config-line)#exitR4(config)#interface s0/1R4(config-if)#ip address 192.168.1.2 255.255.255.0R4(config-if)#clock rate 64000R4(config-if)#no shutdownR4(config-if)#interface s0/0R4(config-if)#ip address 192.168.2.1 255.255.255.252R4(config-if)#clock rate 64000R4(config-if)#no shutdownR4(config-if)#exitc u hình cho router R5 :ấRouter# configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R5R5(config)#line console 0R5(config-line)#password ciscoR5(config-line)#line vty 0 4 R5(config-line)#no loginR5(config-line)#exitR5(config)#interface s0/0R5(config-if)#ip address 192.168.2.2 255.255.255.252R5(config-if)#clock rate 64000R5(config-if)#no shutdownR5(config-if)#interface e0/0R5(config-if)#ip address 172.16.1.2 255.255.255.0R5(config-if)#no shutdownR5(config-if)#interface loopback 0R5(config-if)#ip address 10.1.1.1 255.255.255.0R5(config-if)#^ZR5#ki m tra b ng đ nh tuy n : ể ả ị ếR1#show ip routeGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masksC 172.16.1.0/24 is directly connected, Ethernet0/0C 172.16.2.0/30 is directly connected, Serial0/0R2#show ip routeGateway of last resort is not set 172.16.0.0/30 is subnetted, 1 subnetsC 172.16.2.0 is directly connected, Serial0/0C 192.168.4.0/24 is directly connected, Ethernet0/0R3#show ip routeGateway of last resort is not setC 192.168.4.0/24 is directly connected, Ethernet0/0C 192.168.1.0/24 is directly connected, Serial0/0R4#show ip routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Serial0/1 192.168.2.0/30 is subnetted, 1 subnetsC 192.168.2.0/30 is directly connected, Serial0/0R5#show ip routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0 192.168.2.0/30 is subnetted, 1 subnetsC 192.168.2.0 is directly connected, Serial0/0C u hình đ nh tuy n cho các router .Router R2,R3, interface s0/0 c a R1 vàấ ị ế ủ interface s0/1 c a R4 ch y OSPF process 1 ,còn l i là ch y ISIS .ủ ạ ạ ạTa bi t c u hình ISIS đòi h i c n ph i có đ a ch NET ,m i system-ID đ iế ấ ỏ ầ ả ị ỉ ỗ ạ di n cho m i node, ta có th g n nó m t cách tùy ý nh ng đ đ m b oệ ỗ ể ắ ộ ư ể ả ả system-ID là duy nh t c a m i router trong m t area ta s s d ng đ a chấ ủ ỗ ộ ẽ ử ụ ị ỉ Mac .Ta ki m tra đ a ch Mac c a thi t b b ng cách show arp ho c show interface .ể ị ỉ ủ ế ị ằ ặR1#show arpProtocol Address Age (min) Hardware Addr Type InterfaceInternet 172.16.1.1 - 0004.c052.7ce0 ARPA Ethernet0/0R4#show interface e0/0Ethernet0/0 is administratively down, line protocol is down Hardware is AmdP2, address is 0002.4b79.9ca0 (bia 0002.4b79.9ca0) Internet address is 192.168.100.1/24 MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, reliability 252/255, txload 1/255, rxload 1/255 <omitted>R5#sh arpProtocol Address Age (min) Hardware Addr Type InterfaceInternet 172.16.1.2 - 00d0.ba1a.f080 ARPA Ethernet0/0C u hình nh sau : ấ ưR1(config)#router ospf 1R1(config-router)#network 172.16.2.0 0.0.0.3 area 0R1(config-router)#exitR1(config)#clns routingR1(config)#router isisR1(config-router)#net 01.0001.0004.c052.7ce0.00R1(config-router)#exitR1(config)#interface e0/0R1(config-if)#ip router isisR1(config-if)#^ZR1#R2(config)#router ospf 1R2(config-router)#network 192.168.4.0 0.0.0.255 area 0R2(config-router)#network 172.16.2.0 0.0.0.3 area 0R2(config-router)#exit R2(config)#^ZR3(config)#router ospf 1R3(config-router)#network 192.168.4.0 0.0.0.255 area 0R3(config-router)#network 192.168.1.0 0.0.0.255 area 0R3(config-router)#exitR3(config)#^ZR4(config)#router ospf 1R4(config-router)#network 192.168.1.0 0.0.0.255 area 0R4(config-router)#exitR4(config)#clns routingR4(config)#router isisR4(config-router)#net 01.0001.0002.4b79.9ca0.00R4(config-router)#exitR4(config)#int s0/0R4(config-if)#ip router isisR4(config-if)#^ZR5(config)#clns routingR5(config)#router isis R5(config-router)#net 01.0001.00d0.ba1a.f080.00R5(config-router)#int s0/0R5(config-if)#ip router isisR5(config-if)#int e0/0R5(config-if)#ip router isisR5(config-if)#exitR5(config)#int loopback 0R5(config-if)#ip router isisR5(config)#^Zki m tra l i b ng đ nh tuy n :ể ạ ả ị ếR1#sh ip routeGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masksC 172.16.1.0/24 is directly connected, Ethernet0/0C 172.16.2.0/30 is directly connected, Serial0/0O 192.168.4.0/24 [110/74] via 172.16.2.1, 00:03:18, Serial0/0 10.0.0.0/24 is subnetted, 1 subnetsi L1 10.1.1.0 [115/20] via 172.16.1.2, Ethernet0/0O 192.168.1.0/24 [110/138] via 172.16.2.1, 00:03:18, Serial0/0 192.168.2.0/30 is subnetted, 1 subnetsi L1 192.168.2.0 [115/20] via 172.16.1.2, Ethernet0/0 Nh ng route nào h c t ISIS s b t đ u b ng i. Trong bài này các routerữ ọ ừ ẽ ắ ầ ằ ch y ISIS đ m c đ nh là L1/L2 router các router đang ch y level – 1ạ ể ặ ị ạ routing nên có kí hi u là L1 .Đ i v i metric c a ISIS thì lo i metric có chi uệ ố ớ ủ ạ ề dài là 1 byte. Bit 8 ch ra s hi n di n c a lo i metric trong TLV.Bit 7 đ cỉ ự ệ ệ ủ ạ ượ dùng đ phân lo i metric là internal hay là external .Internal metric đ c p đ nể ạ ề ậ ế các route đ c t o ra trong mi n ISIS , trong khi đó external route đ c p đ nượ ạ ề ề ậ ế các route bên ngoài mi n ISIS ho c là t các giao th c đ nh tuy n khác. 6 bitề ặ ừ ứ ị ế còn l i dành cho vi c tính toán th c s giá tr c a metric. Do đó ta có giá trạ ệ ự ự ị ủ ị cost c c đ i c a default metric là 63 trên m t link . Đ i v i Cisco router costự ạ ủ ộ ố ớ c a m t link đ c quy t đ nh b i giá tr đ c đăng kí đ n interface ngõ ra .ủ ộ ượ ế ị ở ị ượ ế Cisco đăng kí default metric là 10 cho m i interface mà không quan tâmỗ interface đó thu c lo i nào. Lúc này m i subnetwork đ c xem là b ng nhauộ ạ ỗ ượ ằ ISIS metric đ c tính toán đ n gi n b ng cách tính t ng các hop-count nóượ ơ ả ằ ổ ph i đi qua đ đ n đích , m i hop có cost là 10. Ví d trong b ng đ nh tuy nả ể ế ỗ ụ ả ị ế c a R1 ta th y ,route 192.168.2.0 có metric là 20 vì nó đi qua R5,R1. Cost c aủ ấ ủ các route h c đ c t OSPF đ c tính t ng t nh bài redistribute gi aọ ượ ừ ượ ươ ự ư ữ classfull classless. Cost c a 192.168.1.0/24 là 138 vì nó ph i đi qua 2 serialủ ả interface (m i interface có cost là 64) m t ethernet interface (có cost là 10).ỗ ộ Cách tính cost c a OSPF là không đ i khi th c hi n redistribute ,do đó trongủ ổ ự ệ bài này ta s không xét kĩ v nó .ẽ ềR2#show ip routeGateway of last resort is not set 172.16.0.0/30 is subnetted, 1 subnetsC 172.16.2.0 is directly connected, Serial0/0C 192.168.4.0/24 is directly connected, Ethernet0/0O 192.168.1.0/24 [110/74] via 192.168.4.1, 00:00:05, Ethernet0/0R3#sh ip routeGateway of last resort is not set 172.16.0.0/30 is subnetted, 1 subnetsO 172.16.2.0 [110/74] via 192.168.4.2, 00:01:07, Ethernet0/0C 192.168.4.0/24 is directly connected, Ethernet0/0C 192.168.1.0/24 is directly connected, Serial0/0R4#sh ip routeGateway of last resort is not set 172.16.0.0/16 is variably subnetted, 2 subnets, 2 masksi L1 172.16.1.0/24 [115/20] via 192.168.2.2, Serial0/0O 172.16.2.0/30 [110/138] via 192.168.1.1, 00:01:51, Serial0/1O 192.168.4.0/24 [110/74] via 192.168.1.1, 00:01:51, Serial0/1 10.0.0.0/24 is subnetted, 1 subnetsi L1 10.1.1.0 [115/20] via 192.168.2.2, Serial0/0C 192.168.1.0/24 is directly connected, Serial0/1 192.168.2.0/30 is subnetted, 1 subnetsC 192.168.2.0 is directly connected, Serial0/0 R5#show ip routeGateway of last resort is not set 172.16.0.0/24 is subnetted, 1 subnetsC 172.16.1.0 is directly connected, Ethernet0/0 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0 192.168.2.0/30 is subnetted, 1 subnetsC 192.168.2.0 is directly connected, Serial0/0Ki m tra b ng l nh ping :ể ằ ệR4#ping 172.16.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/40 msR2#ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 msR4#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 100 percent (5/5), round-trip min/avg/max = 28/29/32 msR4#ping 192.168.4.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.4.2, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 msR2#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)R2 không th ping 192.168.2.1 đ c vì R2 ch y giao th c OSPF còn m ngể ượ ạ ứ ạ 192.168.2.0/24 s d ng ISIS .Mu n th c hi n ping thành công ta ph iử ụ ố ự ệ ả redistribute gi a hai giao th c . c u hình redistribute đ c th c hi n trên cữ ứ ấ ượ ự ệ ả hai routert R1 R4 đ c g i là multiple redistribute points C u hình nh sau :ượ ọ ấ ư [...]... R4(config-router)#exit R1(config)#router ospf 1 R1(config-router) #redistribute isis level-1 metric 20 % Only classful networks will be redistributed à redistribute các route ISIS vào OSPF v i metric là 20 các route này đóngớ vai trò là level-1. R1(config-router)#router isis R1(config-router) #redistribute ospf 1 metric 10 level-1-2 à redistribute nh ng route OSPF vào ISIS v i metric là 10 các route có vaiữ ớ... redistribute m t subnets.ộ R4(config)#router ospf 1 R4(config-router)#no redistribute isis level-1 metric 20 R4(config-router) #redistribute isis level-1 metric 20 subnets R4(config-router)#router isis R4(config-router)#no redistribute ospf 1 metric 10 level-1-2 R4(config-router) #redistribute ospf 1 metric 10 metric-type external à các route đ c redistribute vào ISIS có th là internal route ho c externalượ... Trong c u hình trên các OSPF route đ c redistribute nh là external route v iấ ượ ư ớ default metric là 10 . R1(config)#router ospf 1 R1(config-router)#no redistribute isis level-1 metric 20 R1(config-router) #redistribute isis level-1 metric 20 subnets R1(config-router)#router isis R1(config-router)#no redistribute ospf 1 metric 10 level-1-2 R1(config-router) #redistribute ospf 1 metric 10 metric-type... 0.0.0.0 255.255.255.255 1 ! router isis net 01.0001.0004.c052.7ce0.00 redistribute ospf 1 metric 10 metric-type external distance 130 clns distance 115 172.16.1.2 0.0.0.0 2 ! R4(config)#router ospf 1 R4(config-router) #redistribute isis level-1 metric 20 % Only classful networks will be redistributed R4(config-router)#router isis R4(config-router) #redistribute ospf 1 metric 10 level-1-2 R4(config-router)#exit R1(config)#router... vì R2 ch y giao th c OSPF còn m ngể ượ ạ ứ ạ 192.168.2.0/24 s d ng ISIS .Mu n th c hi n ping thành công ta ph iử ụ ố ự ệ ả redistribute gi a hai giao th c . c u hình redistribute đ c th c hi n trên cữ ứ ấ ượ ự ệ ả hai routert R1 R4 đ c g i là multiple redistribute points C u hình nh sau :ượ ọ ấ ư Đ R2,R3 th y đ c các route trong ISIS ta thêm vào trong câu l nhể ấ ượ ệ redistribute m t subnets.ộ R4(config)#router... đ nh tuy n đ n t t cả ị ế ủ ấ ằ ị ế ế ấ ả các m ng trong mi n OSPF thông qua R3 đ n t t c các m ng trong mi nạ ề ế ấ ả ạ ề ISIS thông qua R5 . Distance c a OSPF ISIS đ c g n cho các route .B ngủ ượ ắ ả đ nh tuy n c a R1 t ng t .ị ế ủ ươ ự Đ th y rõ h n ý nghĩa c a câu l nh distance 130 ,ta gi s interface gi a R5ể ấ ơ ủ ệ ả ử ữ và R4 down . R4(config)#int s0/0 R4(config-if)#shutdown *Mar 1... n R1. R4 ch g i nh ng route mà nó h c t ISIS ử ơ ỉ ử ữ ọ ừ vào OSPF , đó là nh ng route 172.16.1.0 10.1.1.0 , nó khơng g i nh ngữ ử ữ route k t n i tr c ti p ho c là nh ng route nó đã đ c h c thơng qua OSPF. ế ố ự ế ặ ữ ượ ọ R3 nh n update t R4 , xem R4 nh là next –hop router (quan sát b ng đ nhậ ừ ư ả ị tuy n c a R3 ,nh ng route h c t R4 đ c tô đ m ) g i update đ n R2 . ế ủ ữ ọ ừ ượ ậ ử ế R3#show... permit 10.1.1.0 0.0.0.255 access-list 2 permit 192.168.2.0 0.0.0.255 ! R4#sh run ! router ospf 1 log-adjacency-changes redistribute isis level-1 metric 20 subnets network 192.168.1.0 0.0.0.255 area 0 distance 130 distance 110 0.0.0.0 255.255.255.255 1 ! router isis net 01.0001.0002.4b79.9ca0.00 redistribute ospf 1 metric 10 metric-type external distance 130 clns distance 115 192.168.2.2 0.0.0.0... t l p distance m c đ nh choệ ầ ấ ế ậ ặ ị các route c a OSPF ISIS là 130 . Câu l nh distance th hai thi t l p m tủ ệ ứ ế ậ ộ distance khác tùy theo router qu ng bá nào đ c ch đ nh có tham chi u đ nả ượ ỉ ị ế ế access-list .Ch ng h n trên router R1 , ti n trình ISIS c a R1 đăng kí distanceẳ ạ ế ủ là 115 cho các route đ c qu ng bá b i R5 đ c cho phép b i access-listượ ả ở ượ ở 2 .T t c các... là b ng nhauộ ạ ỗ ượ ằ và ISIS metric đ c tính tốn đ n gi n b ng cách tính t ng các hop-count nóượ ơ ả ằ ổ ph i đi qua đ đ n đích , m i hop có cost là 10. Ví d trong b ng đ nh tuy nả ể ế ỗ ụ ả ị ế c a R1 ta th y ,route 192.168.2.0 có metric là 20 vì nó đi qua R5,R1. Cost c aủ ấ ủ các route h c đ c t OSPF đ c tính t ng t nh bài redistribute gi aọ ượ ừ ượ ươ ự ư ữ classfull classless. Cost c a . 1R1(config-router) #redistribute isis level-1 metric 20% Only classful networks will be redistributedà redistribute các route ISIS vào OSPF v i metric là 20 và các. R1(config-router)#router isisR1(config-router) #redistribute ospf 1 metric 10 level-1-2à redistribute nh ng route OSPF vào ISIS v i metric là 10 và các route có

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

Từ khóa liên quan

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

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

Tài liệu liên quan