ISIS-路由计算
实验图示中,路由器已配置ISIS协议,配置如下:
AR1路由器Level-1
isis 1
is-level level-1
network-entity 49.0001.0010.0100.1001.00
interface GigabitEthernet0/0/0
ip address 10.0.1.1 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/0/1
ip address 10.0.3.1 255.255.255.0
isis enable 1
#
interface LoopBack0
ip address 1.1.1.1 255.255.255.255
isis enable 1
AR2路由器Level-1-2
isis 1
network-entity 49.0001.0020.0200.2002.00
#
interface GigabitEthernet0/0/0
ip address 10.0.1.2 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/0/1
ip address 10.0.2.2 255.255.255.0
isis enable 1
#
interface LoopBack0
ip address 2.2.2.2 255.255.255.255
isis enable 1
AR4路由器Level-2
isis 1
is-level level-2
network-entity 50.0001.0040.0400.4004.00
interface GigabitEthernet0/0/1
ip address 10.0.2.4 255.255.255.0
isis enable 1
#
interface GigabitEthernet0/0/2
ip address 10.0.4.4 255.255.255.0
isis enable 1
#
interface LoopBack0
ip address 4.4.4.4 255.255.255.255
isis enable 1是
AR3和AR5分布属于Level-1-2和Level-2,同类型路由器配置一致。
注:Level-1不能跨区域建立ISIS邻居关系,Level-2可以跨区域建立ISIS邻居关系。
如实验配置显示:
Level-1路由器AR1区域号为49.0001开头;Level-1-2路由器AR2区域号也为49.0001,Level-1与Level-1-2才能建立邻居。
Level-2与Level-1-2路由器区域号不相同,但是可以建立ISIS邻居关系
试验节点一:
<AR1>dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 11 Routes : 11
Destination/Mask Proto Pre Cost Flags NextHop Interface
0.0.0.0/0 ISIS-L1 15 10 D 10.0.1.2 GigabitEthernet
0/0/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.2/32 ISIS-L1 15 10 D 10.0.1.2 GigabitEthernet
0/0/0
10.0.1.0/24 Direct 0 0 D 10.0.1.1 GigabitEthernet
0/0/0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.2.0/24 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet
0/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
查看Level-1路由器AR1路由表,发现到达其他区域的网络没有明细路由,只有一条默认路由。
是因为作为Level-1-2路由的AR2和AR3会发送ATT为1的LSP报文给AR1路由器,宣告可以通过AR2到达其他区域。
要使Level-1路由器不生成默认路由,有两种方式:
第一种:在Level-1-2路由器配置下发ATT为0报文
第二种:在Level-1路由器配置不因为ATT报文生成缺省路由
第一种方式修改ATT为0实验验证:attached-bit advertise never
AR2配置:
[AR2-isis-1]import-route isis level-2 into level-1 [AR2-isis-1]attached-bit advertise never
AR3配置:
[AR3-isis-1]import-route isis level-2 into level-1 [AR3-isis-1]attached-bit advertise never
验证:查看AR1路由表
<AR1>dis ip routing-table Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 18 Routes : 19 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0 2.2.2.2/32 ISIS-L1 15 10 D 10.0.1.2 GigabitEthernet 0/0/0 3.3.3.3/32 ISIS-L1 15 10 D 10.0.3.3 GigabitEthernet 0/0/1 4.4.4.4/32 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet 0/0/0 5.5.5.5/32 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet 0/0/1 10.0.1.0/24 Direct 0 0 D 10.0.1.1 GigabitEthernet 0/0/0 10.0.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0 10.0.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0 10.0.2.0/24 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet 0/0/0 10.0.3.0/24 Direct 0 0 D 10.0.3.1 GigabitEthernet 0/0/1 10.0.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1 10.0.3.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1 10.0.4.0/24 ISIS-L1 15 30 D 10.0.1.2 GigabitEthernet 0/0/0 ISIS-L1 15 30 D 10.0.3.3 GigabitEthernet 0/0/1 10.0.5.0/24 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet 0/0/1 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 <AR1>
如上显示,AR1不自动生成默认路由,学习到其他区域路由。
第二种方式:AR1忽略ATT为1的报文,不生成默认路由,attached-bit avoid-learning
[AR1-isis-1]attached-bit avoid-learning
查看AR1路由,验证结果:
[AR1-isis-1]dis ip routing-table Route Flags: R - relay, D - download to fib ------------------------------------------------------------------------------ Routing Tables: Public Destinations : 18 Routes : 19 Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0 2.2.2.2/32 ISIS-L1 15 10 D 10.0.1.2 GigabitEthernet 0/0/0 3.3.3.3/32 ISIS-L1 15 10 D 10.0.3.3 GigabitEthernet 0/0/1 4.4.4.4/32 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet 0/0/0 5.5.5.5/32 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet 0/0/1 10.0.1.0/24 Direct 0 0 D 10.0.1.1 GigabitEthernet 0/0/0 10.0.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0 10.0.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/0 10.0.2.0/24 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet 0/0/0 10.0.3.0/24 Direct 0 0 D 10.0.3.1 GigabitEthernet 0/0/1 10.0.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1 10.0.3.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet 0/0/1 10.0.4.0/24 ISIS-L1 15 30 D 10.0.1.2 GigabitEthernet 0/0/0 ISIS-L1 15 30 D 10.0.3.3 GigabitEthernet 0/0/1 10.0.5.0/24 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet 0/0/1 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0 127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0 [AR1-isis-1]
实验节点二:等价路由
[AR1-isis-1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 18 Routes : 19
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.2/32 ISIS-L1 15 10 D 10.0.1.2 GigabitEthernet
0/0/0
3.3.3.3/32 ISIS-L1 15 10 D 10.0.3.3 GigabitEthernet
0/0/1
4.4.4.4/32 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet
0/0/0
5.5.5.5/32 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
10.0.1.0/24 Direct 0 0 D 10.0.1.1 GigabitEthernet
0/0/0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.2.0/24 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet
0/0/0
10.0.3.0/24 Direct 0 0 D 10.0.3.1 GigabitEthernet
0/0/1
10.0.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.3.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.4.0/24 ISIS-L1 15 30 D 10.0.3.3 GigabitEthernet
0/0/1
ISIS-L1 15 30 D 10.0.1.2 GigabitEthernet
0/0/0
10.0.5.0/24 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[AR1-isis-1]
AR1路由表中10.0.4.0有两条等价路由,
多条等价路由具有负载分担作用,但流量转发具有随机性,不利于业务流量的管理。
ISIS等价路由的处理方式
1:设置等价路由的最大数量
2:设置等价路由的优先级
实验验证等价路由的最大数量:maximum load-balancing 1-8
[AR1-isis-1]maximum load-balancing
查看AR1路由表验证:
[AR1-isis-1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 18 Routes : 18
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.2/32 ISIS-L1 15 10 D 10.0.1.2 GigabitEthernet
0/0/0
3.3.3.3/32 ISIS-L1 15 10 D 10.0.3.3 GigabitEthernet
0/0/1
4.4.4.4/32 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet
0/0/0
5.5.5.5/32 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
10.0.1.0/24 Direct 0 0 D 10.0.1.1 GigabitEthernet
0/0/0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.2.0/24 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet
0/0/0
10.0.3.0/24 Direct 0 0 D 10.0.3.1 GigabitEthernet
0/0/1
10.0.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.3.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.4.0/24 ISIS-L1 15 30 D 10.0.1.2 GigabitEthernet
0/0/0
10.0.5.0/24 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[AR1-isis-1]
如上显示,10.0.4.0不中断状态,流量下一跳地址为10.0.1.2。假如AR2故障,10.0.4.0下一跳自动切换到0/0/1端口
[AR1-isis-1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 15 Routes : 15
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.2/32 ISIS-L1 15 40 D 10.0.3.3 GigabitEthernet
0/0/1
3.3.3.3/32 ISIS-L1 15 10 D 10.0.3.3 GigabitEthernet
0/0/1
4.4.4.4/32 ISIS-L1 15 30 D 10.0.3.3 GigabitEthernet
0/0/1
5.5.5.5/32 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
10.0.2.0/24 ISIS-L1 15 40 D 10.0.3.3 GigabitEthernet
0/0/1
10.0.3.0/24 Direct 0 0 D 10.0.3.1 GigabitEthernet
0/0/1
10.0.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.3.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.4.0/24 ISIS-L1 15 30 D 10.0.3.3 GigabitEthernet
0/0/1
10.0.5.0/24 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[AR1-isis-1]
实验验证等价路由优先级:nexthop 10.0.1.2 weight 1-254 (优先级越小越优先)
[AR1-isis-1]nexthop 10.0.3.3 weight 1 [AR1-isis-1]nexthop 10.0.1.2 weight 2
实验结果验证,10.0.3.3为下一跳:
[AR1-isis-1]dis ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 18 Routes : 18
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.1/32 Direct 0 0 D 127.0.0.1 LoopBack0
2.2.2.2/32 ISIS-L1 15 10 D 10.0.1.2 GigabitEthernet
0/0/0
3.3.3.3/32 ISIS-L1 15 10 D 10.0.3.3 GigabitEthernet
0/0/1
4.4.4.4/32 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet
0/0/0
5.5.5.5/32 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
10.0.1.0/24 Direct 0 0 D 10.0.1.1 GigabitEthernet
0/0/0
10.0.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/0
10.0.2.0/24 ISIS-L1 15 20 D 10.0.1.2 GigabitEthernet
0/0/0
10.0.3.0/24 Direct 0 0 D 10.0.3.1 GigabitEthernet
0/0/1
10.0.3.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.3.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet
0/0/1
10.0.4.0/24 ISIS-L1 15 30 D 10.0.3.3 GigabitEthernet
0/0/1
10.0.5.0/24 ISIS-L1 15 20 D 10.0.3.3 GigabitEthernet
0/0/1
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0