拓扑如下图所示:
备注:R1-R5运行IS-IS
IS-IS路由器类型说明
1.Level-1路由器:只能和L1.L1-2的路由器建立邻居关系,维护L1的LSDB,L1路由器形成的邻居关系被称为L1的区域。
2.Level-2路由器:只能和L2,L1-2的路由器建立邻居关系(同区域or不同区域都可以)
3.Level-1-2的路由器:用于连接L1和L2的路由器,类似OSPF中的ABR,L1-2的路由器用来连接L1.L2区域。华为默认为L1-2路由器。
区域类型
1.骨干区域:L2邻居关系形成的逻辑上的区域为骨干区域,被称为L2区域。骨干区域要保证连续性,保证和非骨干区域相连。
2.非骨干区域:L1的邻居关系形成的L1区域是非骨干区域。
具体配置:
R5:
[R5]isis 1
[R5-isis-1]is-level level-1 //将路由器isis等级设置L1
[R5-isis-1]network-entity 49.0002.0050.0500.5005.00 //宣告IP地址
[R5-isis-1]quit
[R5]interface GigabitEthernet0/0/0
[R5-GigabitEthernet0/0/0]ip address 45.0.0.2 255.255.255.252
[R5-GigabitEthernet0/0/0]isis enable 1 //开启isis
[R5-GigabitEthernet0/0/0]quit
[R5]interface LoopBack0
[R5-LoopBack0]ip address 5.5.5.5 255.255.255.255
[R5-LoopBack0]isis enable 1
[R5-LoopBack0]quit
[R5]interface LoopBack1
[R5-LoopBack1]ip address 202.0.0.1 255.255.255.0
[R5-LoopBack1]isis enable 1
[R5-LoopBack1]quit
[R5]interface LoopBack2
[R5-LoopBack2]ip address 202.0.1.1 255.255.255.0
[R5-LoopBack2]isis enable 1
[R5-LoopBack2]quit
R4:
[R4]isis 1
[R4-isis-1]network-entity 49.0002.0040.0400.4004.00 //宣告IP地址
[R4-isis-1]quit
[R4]interface GigabitEthernet0/0/0
[R4-GigabitEthernet0/0/0]ip address 45.0.0.1 255.255.255.252
[R4-GigabitEthernet0/0/0]isis enable 1
[R4-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1
[R4-GigabitEthernet0/0/1]ip address 34.0.0.2 255.255.255.252
[R4-GigabitEthernet0/0/1]isis enable 1
[R4-GigabitEthernet0/0/1]interface LoopBack0
[R4-LoopBack0]ip address 4.4.4.4 255.255.255.255
[R4-LoopBack0]isis enable 1
R3:
[R3]isis 1
[R3-isis-1]network-entity 49.0000.0030.0300.3003.00 //宣告IP地址
[R3-isis-1]quit
[R3]interface GigabitEthernet0/0/0
[R3-GigabitEthernet0/0/0]ip address 23.0.0.2 255.255.255.252
[R3-GigabitEthernet0/0/0]isis enable 1
[R3-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1
[R3-GigabitEthernet0/0/1]ip address 34.0.0.1 255.255.255.252
[R3-GigabitEthernet0/0/1]isis enable 1
[R3-GigabitEthernet0/0/1]interface LoopBack0
[R3-LoopBack0]ip address 3.3.3.3 255.255.255.255
[R3-LoopBack0]isis enable 1
R2:
[R2]isis 1
[R2-isis-1]network-entity 49.0001.0020.0200.2002.00 //宣告IP地址
[R2-isis-1]quit
[R2]interface GigabitEthernet0/0/0
[R2-GigabitEthernet0/0/0]ip address 23.0.0.1 255.255.255.252
[R2-GigabitEthernet0/0/0]isis enable 1
[R2-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1
[R2-GigabitEthernet0/0/1]ip address 12.0.0.2 255.255.255.252
[R2-GigabitEthernet0/0/1]isis enable 1
[R2-GigabitEthernet0/0/1]interface LoopBack0
[R2-LoopBack0]ip address 2.2.2.2 255.255.255.255
[R2-LoopBack0]isis enable 1
R1:
[R1]isis 1
[R1-isis-1]network-entity 49.0001.0010.0100.1001.00 //宣告IP地址
[R1-isis-1]quit
[R1-GigabitEthernet0/0/0]interface GigabitEthernet0/0/1
[R1-GigabitEthernet0/0/1]ip address 12.0.0.1 255.255.255.252
[R1-GigabitEthernet0/0/1]isis enable 1
[R1-GigabitEthernet0/0/1]interface LoopBack0
[R1-LoopBack0]ip address 1.1.1.1 255.255.255.255
[R1-LoopBack0]isis enable 1
此时查看路由信息,会发现R1学习不到isis中的路由网段,且R5也学习不到本区域外的网段。这是因为R1是L1,只能学习区域内的路由,其他区域的isis路由信息学习不到。此时可以通过配置路由泄露来解决,具体配置如下:
[R2]isis 1
[R2-isis-1]import-route isis level-2 into level-1 //将isisL2的信息泄露成L1的信息
[R4]isis 1
[R4-isis-1]import-route isis level-2 into level-1