提要:ISIS与OSPF域间选路比较(ISIS部分)
TOPO如下:
基本配置如下:
l
R1
l
R2
l
R3
l
R4
l
R5
R1基本配置
| interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Serial1/0
ip address 12.1.1.1 255.255.255.0
ip router isis
!
interface Serial2/0
ip address 13.1.1.1 255.255.255.0
ip router isis
!
router isis
net 02.0010.0100.1001.00
passive-interface Loopback0
|
R2基本配置
| interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface Serial1/0
ip address 24.1.1.2 255.255.255.0
ip router isis
!
interface Serial2/0
ip address 12.1.1.2 255.255.255.0
ip router isis
!
router isis
net 01.0020.0200.2002.00
passive-interface Loopback0
|
R3基本配置
| interface Loopback0
ip address 3.3.3.3 255.255.255.0
!
interface Ethernet0/0
ip address 34.1.1.3 255.255.255.0
ip router isis
!
interface Serial1/0
ip address 13.1.1.3 255.255.255.0
ip router isis
!
interface Serial2/0
ip address 35.1.1.3 255.255.255.0
ip router isis
!
router isis
net 03.0030.0300.3003.00
passive-interface Loopback0
|
R4基本配置
| interface Loopback0
ip address 4.4.4.4 255.255.255.0
!
interface Ethernet0/0
ip address 34.1.1.4 255.255.255.0
ip router isis
!
interface Serial2/0
ip address 24.1.1.4 255.255.255.0
ip router isis
!
router isis
net 03.0040.0400.4004.00
passive-interface Loopback0
!
| R5基本配置
| interface Loopback0
ip address 5.5.5.5 255.255.255.0
!
interface Serial1/0
ip address 35.1.1.5 255.255.255.0
ip router isis
!
router isis
net 03.0050.0500.5005.00
is-type level-1
passive-interface Loopback0
|
测试⑴:
在R3上查看2.0.0.0/24的路由,有两条路径做负载
r3#sho ip route | be 2.0.0.0/24
2.0.0.0/24 is subnetted, 1 subnets
i L2
2.2.2.0 [115/20] via 13.1.1.1, Serial1/0
[115/20] via 34.1.1.4, Ethernet0/0
r3#traceroute 2.2.2.2
Type escape sequence to abort.
Tracing the route to 2.2.2.2
1
*
13.1.1.1 32 msec ――>走下面的那条
34.1.1.4 4 msec
――>走上面的那条
2 12.1.1.2 56 msec
24.1.1.2 20 msec *
在R5上使用扩张ping 加record参数
r5#ping
Protocol [ip]:
Target IP address: 2.2.2.2
Repeat count [5]:
Datagram size [100]:
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]:
Validate reply data? [no]:
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: re
Number of hops [ 9 ]:
Loose, Strict, Record, Timestamp, Verbose[RV]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet has IP options:
Total option bytes= 39, padded length=40
Record route: <*>
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
(0.0.0.0)
Reply to request 0 (48 ms).
Received packet has options
Total option bytes= 40, padded length=40
Record route:
(35.1.1.5)
(34.1.1.3)
(24.1.1.4) ――>走上面的那条
(2.2.2.2)
(24.1.1.2)
(34.1.1.4)
(35.1.1.3)
(35.1.1.5) <*>
(0.0.0.0)
End of list
Reply to request 1 (72 ms).
Received packet has options
Total option bytes= 40, padded length=40
Record route:
(35.1.1.5)
(13.1.1.3)
(12.1.1.1) ――>走下面的那条
(2.2.2.2)
(12.1.1.2)
(13.1.1.1)
(35.1.1.3)
(35.1.1.5) <*>
(0.0.0.0)
End of list
Reply to request 2 (48 ms).
Received packet has options
Total option bytes= 40, padded length=40
Record route:
(35.1.1.5)
(34.1.1.3)
(24.1.1.4) ――>走上面的那条
(2.2.2.2)
(24.1.1.2)
(34.1.1.4)
(35.1.1.3)
(35.1.1.5) <*>
(0.0.0.0)
End of list
Reply to request 3 (72 ms).
Received packet has options
Total option bytes= 40, padded length=40
Record route:
(35.1.1.5)
(13.1.1.3)
(12.1.1.1) ――>走下面的那条
(2.2.2.2)
(12.1.1.2)
(13.1.1.1)
(35.1.1.3)
(35.1.1.5) <*>
(0.0.0.0)
End of list
Reply to request 4 (48 ms).
Received packet has options
Total option bytes= 40, padded length=40
Record route:
(35.1.1.5)
(34.1.1.3)
(24.1.1.4) ――>走上面的那条
(2.2.2.2)
(24.1.1.2)
(34.1.1.4)
(35.1.1.3)
(35.1.1.5) <*>
(0.0.0.0)
End of list
测试⑵
注意如果使用traceroute跟踪2.2.2.2 的路径时,如果没有在R3上面关闭fast-switching是看不出有两条的。
r5#traceroute 2.2.2.2
没有在R3关闭fast-switching的效果
Type escape sequence to abort.
Tracing the route to 2.2.2.2
1 35.1.1.3 28 msec 20 msec 20 msec
2 13.1.1.1 40 msec 40 msec 40 msec
3 12.1.1.2 52 msec *
48 msec
为了达到实验效果我们关闭R3所有接口的fast-switching,然后在R5上traceroute 2.2.2.2
r3(config)#int s1/0
r3(config-if)#no ip route-cac
r3(config-if)#no ip route-cache
r3(config-if)#int e0/0
r3(config-if)#no ip route-cache
r3(config-if)#int s2/0
r3(config-if)#no ip route-cache
r5#traceroute 2.2.2.2
Type escape sequence to abort.
Tracing the route to 2.2.2.2
1 35.1.1.3 16 msec 20 msec 20 msec
2 13.1.1.1 40 msec
――>走下面的那条
34.1.1.4 20 msec
――>走上面的那条
13.1.1.1 40 msec
3 24.1.1.2 52 msec
12.1.1.2 48 msec *
总结:
IS-IS选路基本过程:
1、到外部区域:L1先选到最近的L1/L2
2、L1/L2路由器根据L2拓扑数据库选路
|