Redistribute gi a ISIS và 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 và 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 và R4 s ch y giao th c OSPF , R5 ch yạ ư ẽ ạ ứ ạ
giao th c ISIS. Router R4 và 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/0
S0/0
172.16.1.1/24
172.16.2.2 /30
Router R2 S0/0
E0/0
172.16.2.1/30
192.168.4.2/24
Router R3 E0/0
S0/0
192.168.4.1/24
192.168.1.1/24
Router R4 S0/1
S0/0
192.168.1.2/24
192.168.2.1/30
Router R5 S0/0
E0/0
Loopback 0
192.168.2.2/30
172.16.1.2/24
10.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/0
ip address 172.16.2.2 255.255.255.252
!
end
R2
!
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
!
end
R3
!
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
!
end
R4
!
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 server
ip classless
!
end
R5
!
hostname R5
!
interface Loopback0
ip address 10.1.1.1 255.255.255.0
no ip directed-broadcast
!
interface Ethernet0/0
ip 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 classless
end
C u hình ban đ u cho các router :ấ ầ
R1
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)#login
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit
R1(config)#enable password cisco
R1(config)#interface s0/0
R1(config-if)#ip address 172.16.2.2 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#int e0/0
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
c u hình cho router R2 : ấ
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)#line vty 0 4
R2(config-line)#no login
R2(config-line)#exit
R2(config)#interface e0/0
R2(config-if)#ip address 192.168.4.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#interface s0/0
R2(config-if)#ip address 172.16.2.1 255.255.255.252
R2(config-if)#clock rate 64000
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#^Z
R2#
c u hình cho router R3 : ấ
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)#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.1 255.255.255.0
R3(config-if)#clock rate 64000
R3(config-if)#no shutdown
R3(config-if)#interface e0/0
R3(config-if)#ip address 192.168.4.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#^Z
R3#
c u hình cho router R4 :ấ
Router# configure terminal
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)#line vty 0 4
R4(config-line)#no login
R4(config-line)#exit
R4(config)#interface s0/1
R4(config-if)#ip address 192.168.1.2 255.255.255.0
R4(config-if)#clock rate 64000
R4(config-if)#no shutdown
R4(config-if)#interface s0/0
R4(config-if)#ip address 192.168.2.1 255.255.255.252
R4(config-if)#clock rate 64000
R4(config-if)#no shutdown
R4(config-if)#exit
c u hình cho router R5 :ấ
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R5
R5(config)#line console 0
R5(config-line)#password cisco
R5(config-line)#line vty 0 4
R5(config-line)#no login
R5(config-line)#exit
R5(config)#interface s0/0
R5(config-if)#ip address 192.168.2.2 255.255.255.252
R5(config-if)#clock rate 64000
R5(config-if)#no shutdown
R5(config-if)#interface e0/0
R5(config-if)#ip address 172.16.1.2 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#interface loopback 0
R5(config-if)#ip address 10.1.1.1 255.255.255.0
R5(config-if)#^Z
R5#
ki m tra b ng đ nh tuy n : ể ả ị ế
R1#show ip route
Gateway of last resort is not set
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.1.0/24 is directly connected, Ethernet0/0
C 172.16.2.0/30 is directly connected, Serial0/0
R2#show ip route
Gateway of last resort is not set
172.16.0.0/30 is subnetted, 1 subnets
C 172.16.2.0 is directly connected, Serial0/0
C 192.168.4.0/24 is directly connected, Ethernet0/0
R3#show ip route
Gateway of last resort is not set
C 192.168.4.0/24 is directly connected, Ethernet0/0
C 192.168.1.0/24 is directly connected, Serial0/0
R4#show ip route
Gateway of last resort is not set
C 192.168.1.0/24 is directly connected, Serial0/1
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0/30 is directly connected, Serial0/0
R5#show ip route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Ethernet0/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, Loopback0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial0/0
C 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 arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 172.16.1.1 - 0004.c052.7ce0 ARPA Ethernet0/0
R4#show interface e0/0
Ethernet0/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 arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 172.16.1.2 - 00d0.ba1a.f080 ARPA Ethernet0/0
C u hình nh sau : ấ ư
R1(config)#router ospf 1
R1(config-router)#network 172.16.2.0 0.0.0.3 area 0
R1(config-router)#exit
R1(config)#clns routing
R1(config)#router isis
R1(config-router)#net 01.0001.0004.c052.7ce0.00
R1(config-router)#exit
R1(config)#interface e0/0
R1(config-if)#ip router isis
R1(config-if)#^Z
R1#
R2(config)#router ospf 1
R2(config-router)#network 192.168.4.0 0.0.0.255 area 0
R2(config-router)#network 172.16.2.0 0.0.0.3 area 0
R2(config-router)#exit
R2(config)#^Z
R3(config)#router ospf 1
R3(config-router)#network 192.168.4.0 0.0.0.255 area 0
R3(config-router)#network 192.168.1.0 0.0.0.255 area 0
R3(config-router)#exit
R3(config)#^Z
R4(config)#router ospf 1
R4(config-router)#network 192.168.1.0 0.0.0.255 area 0
R4(config-router)#exit
R4(config)#clns routing
R4(config)#router isis
R4(config-router)#net 01.0001.0002.4b79.9ca0.00
R4(config-router)#exit
R4(config)#int s0/0
R4(config-if)#ip router isis
R4(config-if)#^Z
R5(config)#clns routing
R5(config)#router isis
R5(config-router)#net 01.0001.00d0.ba1a.f080.00
R5(config-router)#int s0/0
R5(config-if)#ip router isis
R5(config-if)#int e0/0
R5(config-if)#ip router isis
R5(config-if)#exit
R5(config)#int loopback 0
R5(config-if)#ip router isis
R5(config)#^Z
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, 2 subnets, 2 masks
C 172.16.1.0/24 is directly connected, Ethernet0/0
C 172.16.2.0/30 is directly connected, Serial0/0
O 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 subnets
i L1 10.1.1.0 [115/20] via 172.16.1.2, Ethernet0/0
O 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 subnets
i L1 192.168.2.0 [115/20] via 172.16.1.2, Ethernet0/0