19. Configuring IS-IS Multi Area and Summary Route

1、掌握基本的IS-IS路由协议配置。 
2、理解L1/L2类型路由。 
3、掌握IS-IS区域汇总的配置。
 
上图:

image.png

配置好地址等基本信息,测试互连可达,继续。

 

各路由器的IS-IS配置如下:

R1(config)#router isis xiaoyang
R1(config-router)#net 49.0001.cc02.1878.0010.00
R1(config-router)#exit
R1(config)#int lo0
R1(config-if)#ip router isis xiaoyang
R1(config-if)#isis circuit-type level-1   ------->指定此接口发送level-1报文
R1(config-if)#exit
R1(config)#int lo1                  
R1(config-if)#ip router isis xiaoyang
R1(config-if)#isis circuit-type level-1   ------->默认L1/L2路由器向所有接口发送L1和L2的报文
R1(config-if)#exit                    通过此命令可修剪掉不必要的报文
R1(config)#int s0/0
R1(config-if)#ip router isis xiaoyang
R1(config-if)#isis circuit-type level-2-only  -------->指定其只发送L2的报文 
R1(config-if)#exit

 

R2(config)#router isis xiaoyang  
R2(config-router)#net 49.0002.cc02.1878.0011.00
R2(config-router)#exit
R2(config)#int s0/0
R2(config-if)#ip router isis xiaoyang
R2(config-if)#isis circuit level-2
R2(config-if)#exit
R2(config)#int s0/1
R2(config-if)#ip router isis xiaoyang
R2(config-if)#exit

 

R3(config)#router isis xiaoyang
R3(config-router)#net 49.0002.cc02.1878.0012.00  
R3(config-router)#exit
R3(config)#int s0/0
R3(config-if)#ip router isis xiaoyang
R3(config-if)#exit
R3(config)#int s0/1            
R3(config-if)#ip router isis xiaoyang
R3(config-if)#isis circuit level-2
R3(config-if)#exit

 

R4(config)#router isis xiaoyang
R4(config-router)#net 49.0003.cc02.1878.0013.00
R4(config-router)#exit
R4(config)#int s0/0
R4(config-if)#ip router isis xiaoyang
R4(config-if)#isis circuit level-2
R4(config-if)#exit
R4(config)#int s0/1
R4(config-if)#ip router isis xiaoyang
R4(config-if)#isis circuit level-1

R4(config-if)#exit

 

R5(config)#router isis xiaoyang
R5(config-router)#net 49.0003.cc02.1878.0014.00

R5(config-router)#is-type level-1     ---------->指定路由器为LEVEL-1路由器
R5(config-router)#exit
R5(config)#int lo0
R5(config-if)#ip router isis xiaoyang
R5(config-if)#isis circuit level-1   --------->如果路由器被指定为LEVEL-1,则此命令可以省略
R5(config-if)#exit
R5(config)#int lo1
R5(config-if)#ip router isis xiaoyang
R5(config-if)#exit
R5(config)#int s0/0
R5(config-if)#ip router isis xiaoyang
R5(config-if)#exit

 

查看R2、R3、R4的邻居表,观察其多区域下的邻居关系:

R2#show isis nei

System Id      Type Interface IP Address      State Holdtime Circuit Id
R3             L1L2 Se0/1     172.16.255.6    UP    24       00   ---->与R3创建L1、L2连接
R1             L2   Se0/0     172.16.255.1    UP    26       00   ---->与R1创建L2连接

 

R3#show isis nei

System Id      Type Interface IP Address      State Holdtime Circuit Id
R4             L2   Se0/1     172.16.255.10   UP    26       00
R2             L1L2 Se0/0     172.16.255.5    UP    28       01

 

R4#show isis nei

System Id      Type Interface IP Address      State Holdtime Circuit Id
R5             L1   Se0/1     172.16.255.14   UP    25       00
R3             L2   Se0/0     172.16.255.9    UP    24       01

 

查看R1和R5路由表,观察其区别:

1#show ip route 
Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
i L2    172.16.128.0/24 [115/50] via 172.16.255.2, Serial0/0
i L2    172.16.129.0/24 [115/50] via 172.16.255.2, Serial0/0
C       172.16.255.0/30 is directly connected, Serial0/0
i L2    172.16.255.4/30 [115/20] via 172.16.255.2, Serial0/0
i L2    172.16.255.8/30 [115/30] via 172.16.255.2, Serial0/0
i L2    172.16.255.12/30 [115/40] via 172.16.255.2, Serial0/0
C       172.16.1.0/24 is directly connected, Loopback0
C       172.16.2.0/24 is directly connected, Loopback1

由于R1是L1/L2路由器,所以它能学习到L2的其它区域路由。

同时,如果查看R1链路状态数据库,会看到R1同时维护了L1和L2 数据库。

R1#show isis da

IS-IS Level-1 Link State Database:
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime      ATT/P/OL
R1.00-00            * 0x00000009   0x9EB5        549               1/0/0
IS-IS Level-2 Link State Database:
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime      ATT/P/OL
R1.00-00            * 0x0000000C   0x770B        618               0/0/0
R2.00-00              0x0000000A   0xBC10        932               0/0/0
R3.00-00              0x00000009   0x6F4E        1094              0/0/0
R4.00-00              0x0000000C   0x0CEB        930               0/0/0

 

R5#show ip route
Gateway of last resort is 172.16.255.13 to network 0.0.0.0

     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.128.0/24 is directly connected, Loopback0
C       172.16.129.0/24 is directly connected, Loopback1
C       172.16.255.12/30 is directly connected, Serial0/0
i*L1 0.0.0.0/0 [115/10] via 172.16.255.13, Serial0/0

由于R5是LEVEL-1路由器,处在49.0003内部,因此它会收到R4发送的L1类型的默认路由。这种做法有效减小了路由表的大小,增强了ISIS的稳定性,类似于OSPF中的完全末节区域。

R5#show isis da

IS-IS Level-1 Link State Database:     ---------->仅有Level-1的数据库
LSPID                 LSP Seq Num  LSP Checksum  LSP Holdtime      ATT/P/OL
R4.00-00              0x0000000D   0x384A        859               1/0/0
R5.00-00            * 0x0000000A   0x81EC        917               0/0/0

 

测试远端连通:

R5#ping 172.16.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/104/144 ms

情况正常。

 

为了列精简路由表的大小,可以汇总路由。

先查看R4的路由表:

R4#show ip route
Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
i L1    172.16.128.0/24 [115/20] via 172.16.255.14, Serial0/1
i L1    172.16.129.0/24 [115/20] via 172.16.255.14, Serial0/1
i L2    172.16.255.0/30 [115/30] via 172.16.255.9, Serial0/0
L2    172.16.255.4/30 [115/20] via 172.16.255.9, Serial0/0
C       172.16.255.8/30 is directly connected, Serial0/0
C       172.16.255.12/30 is directly connected, Serial0/1
i L2    172.16.1.0/24 [115/40] via 172.16.255.9, Serial0/0   ----->对此路由汇总
i L2    172.16.2.0/24 [115/40] via 172.16.255.9, Serial0/0   ----->对此路由汇总

在R1上:

R1(config)#router isis xiaoyang
R1(config-router)#summary-address 172.16.0.0 255.255.128.0    ---->对环回口汇总
R1(config-router)#exit

 

再看R4路由表:

R4#show ip route
Gateway of last resort is not set

     172.16.0.0/16 is variably subnetted, 7 subnets, 3 masks
i L1    172.16.128.0/24 [115/20] via 172.16.255.14, Serial0/1
i L1    172.16.129.0/24 [115/20] via 172.16.255.14, Serial0/1
i L2    172.16.255.0/30 [115/30] via 172.16.255.9, Serial0/0
i L2    172.16.255.4/30 [115/20] via 172.16.255.9, Serial0/0
C       172.16.255.8/30 is directly connected, Serial0/0
C       172.16.255.12/30 is directly connected, Serial0/1
i L2    172.16.0.0/17 [115/40] via 172.16.255.9, Serial0/0   ------>汇总效果

 

确认有效性:

R4#ping 172.16.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/85/176 ms

 

至此全部完成主题内容


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

桂ICP备19000498号-3