特点:
- 在IS-IS地址族视图下配置
- 缺省只对level-2路由进行聚合
- 聚合后路由的开销值取所有被聚合路由中最小的开销值。
- generate_null0_route表示聚合的同时生成NULL0路由。
实验拓扑
image.png
步骤一、初始配置
按上图配置各路由器的接口IP,以及IS-IS基本配置。
完成上述操作后查看路由表:
R1
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.0/24 Direct 0 0 192.168.12.1 GE0/0
192.168.12.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.255/32 Direct 0 0 192.168.12.1 GE0/0
192.168.23.0/24 IS_L2 15 20 192.168.12.2 GE0/0
R2
Destinations : 16 Routes : 16
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/32 IS_L2 15 10 192.168.12.1 GE0/0
10.0.0.1/32 IS_L2 15 10 192.168.12.1 GE0/0
10.0.0.2/32 IS_L2 15 10 192.168.12.1 GE0/0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.0/24 Direct 0 0 192.168.12.2 GE0/0
192.168.12.2/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.255/32 Direct 0 0 192.168.12.2 GE0/0
192.168.23.0/24 Direct 0 0 192.168.23.2 GE0/1
192.168.23.2/32 Direct 0 0 127.0.0.1 InLoop0
192.168.23.255/32 Direct 0 0 192.168.23.2 GE0/1
R3
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/32 IS_L2 15 20 192.168.23.2 GE0/1
10.0.0.1/32 IS_L2 15 20 192.168.23.2 GE0/1
10.0.0.2/32 IS_L2 15 20 192.168.23.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.0/24 IS_L1 15 20 192.168.23.2 GE0/1
192.168.23.0/24 Direct 0 0 192.168.23.3 GE0/1
192.168.23.3/32 Direct 0 0 127.0.0.1 InLoop0
192.168.23.255/32 Direct 0 0 192.168.23.3 GE0/1
步骤二、在R1上进行IS-IS路由聚合
首先,在ISIS进程下进入IPV4地址族视图:
[r1]isis 1
[r1-isis-1]address-family ipv4 unicast
然后,在该视图下进行聚合
[r1-isis-1-ipv4]summary 10.0.0.0 24
完成上述操作后查看各路由器的路由表:
R1:
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.2/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.0/24 Direct 0 0 192.168.12.1 GE0/0
192.168.12.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.255/32 Direct 0 0 192.168.12.1 GE0/0
192.168.23.0/24 IS_L2 15 20 192.168.12.2 GE0/0
R2:
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 IS_L2 15 10 192.168.12.1 GE0/0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.0/24 Direct 0 0 192.168.12.2 GE0/0
192.168.12.2/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.255/32 Direct 0 0 192.168.12.2 GE0/0
192.168.23.0/24 Direct 0 0 192.168.23.2 GE0/1
192.168.23.2/32 Direct 0 0 127.0.0.1 InLoop0
192.168.23.255/32 Direct 0 0 192.168.23.2 GE0/1
R3:
Destinations : 12 Routes : 12
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/24 IS_L2 15 20 192.168.23.2 GE0/1
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.12.0/24 IS_L1 15 20 192.168.23.2 GE0/1
192.168.23.0/24 Direct 0 0 192.168.23.3 GE0/1
192.168.23.3/32 Direct 0 0 127.0.0.1 InLoop0
192.168.23.255/32 Direct 0 0 192.168.23.3 GE0/1
发现R1路由表没有变化,R2和R3上去往10.0.0.0、10.0.0.1和10.0.0.2的路由均已被聚合。
注意:
由于默认聚合的是level-2路由,而R1和R2之间建立的就是level-2邻接关系,所以上述实验能够在R2和R3上看到被聚合后的10.0.0.0路由。
如果在聚合命令中添加参数,指定聚合的是level-1路由:
[r1]isis 1
[r1-isis-1]address-family ipv4 unicast
[r1-isis-1-ipv4]undo summary 10.0.0.0 24
[r1-isis-1-ipv4]summary 10.0.0.0 24 level-1
则在R2和R3上不会看到聚合路由:
R2:
Destinations : 16 Routes : 16
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/32 IS_L2 15 10 192.168.12.1 GE0/0
10.0.0.1/32 IS_L2 15 10 192.168.12.1 GE0/0
10.0.0.2/32 IS_L2 15 10 192.168.12.1 GE0/0
R3:
Destinations : 14 Routes : 14
Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
10.0.0.0/32 IS_L2 15 20 192.168.23.2 GE0/1
10.0.0.1/32 IS_L2 15 20 192.168.23.2 GE0/1
10.0.0.2/32 IS_L2 15 20 192.168.23.2 GE0/1