步骤一:配置路由器R1
R1(config-if)#router isis
R1(config-router)#net 49.0001.1111.1111.1111.00
R1(config-router)#is-type level-1 将R1配置成L1路由器
R1(config-router)#area-password area 启用区域认证
R1(config-router)#int lo 0
R1(config-if)#ip router isis
R1(config-if)#int s2/1
R1(config-if)#ip router isis
R1(config-if)#isis password nei level-1 启用LEVEL-1邻居认证
步骤二:配置路由器R2
R2(config-if)#router isis
R2(config-router)#net 49.0001.2222.2222.2222.00
R2(config-router)#default-information originate 向IS-IS区域注入默认路由
R2(config-router)#area-password area
R2(config-router)#domain-password domain 启用区域认证
R2(config-router)#int s2/1
R2(config-if)#clockrate 128000
R2(config-if)#ip router isis
R2(config-if)#isis password nei level-1
R2(config-if)#int s2/2
R2(config-if)#ip router isis
R2(config-if)#clockrate 128000
步骤三:配置路由器R3
R3(config-if)#router isis
R3(config-router)#net 49.0002.3333.3333.3333.00
R3(config-router)#is-type level-2-only 将R3配置成L2路由器
R3(config-router)#domain-password domain
R3(config-router)#int s2/2
R3(config-if)#ip router isis
R3(config-if)#isis circuit-type level-2-only 配置接口类型电路
R3(config-if)#isis password neighborpassword level-2 启用LEVEL-2邻居认证
R3(config-if)#clockrate 128000
R3(config-if)#int s2/1
R3(config-if)#ip router isis
步骤四:配置路由器R4
R4(config-if)#router isis
R4(config-router)#net 49.0003.4444.4444.4444.00
R4(config-router)#summary-address 4.4.0.0 255.255.252.0 配置区域间路由汇总
R4(config-router)#is-type level-2-only
R4(config-router)#domain-password domain
R4(config-router)#int lo 0
R4(config-if)#ip router isis
R4(config-if)#int lo 1
R4(config-if)#ip router isis
R4(config-if)#int lo 2
R4(config-if)#ip router isis
R4(config-if)#int lo 3
R4(config-if)#ip router isis
R4(config-if)#int s2/1
R4(config-if)#ip router isis
R4(config-if)#isis circuit-type level-2-only
R4(config-if)#isis password neighborpassword level-2
实验调试
R1(config-if)#do sh isis database
IS-IS Level-1 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R1.00-00 * 0×00000008 0xA574 788 0/0/0
R2.00-00 0x0000000A 0x3AD6 762 1/0/0
R2(config-if)#do sh isis database
IS-IS Level-1 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R1.00-00 0×00000008 0xA574 733 0/0/0
R2.00-00 * 0x0000000A 0x3AD6 711 1/0/0
IS-IS Level-2 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R2.00-00 * 0x0000000B 0×3193 837 0/0/0
R3.00-00 0x0000000E 0x543D 647 0/0/0
R4.00-00 0×00000009 0xCB2A 639 0/0/0
R3(config-if)#do sh isis database
IS-IS Level-2 Link State Database:
LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL
R2.00-00 0x0000000B 0×3193 715 0/0/0
R3.00-00 * 0x0000000E 0x543D 529 0/0/0
R4.00-00 0×00000009 0xCB2A 521 0/0/0
以上输出表明
R1路由器为L1路由器,只维护L1的链路状态数据库
R2路由器为L1/L2路由器,同时为维护单独的链路状态数据库,也表明所在区域有另一台路由器R1
R3和R4路由器为L2路由器,只维护L2链路状态数据库。
以上输出表明
R1(config-if)#do sh ip route isis
i L1 192.168.23.0/24 [115/20] via 192.168.12.2, Serial2/1
i*L1 0.0.0.0/0 [115/10] via 192.168.12.2, Serial2/1
R3(config-if)#do sh ip route isis
i L2 192.168.12.0/24 [115/20] via 192.168.23.2, Serial2/1
1.0.0.0/24 is subnetted, 1 subnets
i L2 1.1.1.0 [115/30] via 192.168.23.2, Serial2/1
4.0.0.0/22 is subnetted, 1 subnets
i L2 4.4.0.0 [115/20] via 192.168.34.4, Serial2/2
i*L2 0.0.0.0/0 [115/10] via 192.168.23.2, Serial2/1
R4#sh ip route isis
i L2 192.168.12.0/24 [115/30] via 192.168.34.3, Serial2/1
1.0.0.0/24 is subnetted, 1 subnets
i L2 1.1.1.0 [115/40] via 192.168.34.3, Serial2/1
4.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
i su 4.4.0.0/22 [115/10] via 0.0.0.0, Null0
i L2 192.168.23.0/24 [115/20] via 192.168.34.3, Serial2/1
i*L2 0.0.0.0/0 [115/10] via 192.168.34.3, Serial2/1
由于R1为L1路由器,所以只哟“I L1”的路由和一条最近的L1/L2的路由器的默认路由“I*L1”
由于R1和R2再一个区域,所以R2既有”IL1”的路由,又有“IL2”的路由
R3和R4都是L2路由器,所以只有iL2的路由
R3和R4都收到一条由R2注入的默认路由“i*L2”
R2和R3都收到R4的汇总路由,同时R4的路由表自动生成一条“I su”的路由条目,主要是为了避免路由环路
R3(config-if)#do sh ip route isis
i L2 192.168.12.0/24 [115/20] via 192.168.23.2, Serial2/1
1.0.0.0/24 is subnetted, 1 subnets
i L2 1.1.1.0 [115/30] via 192.168.23.2, Serial2/1
4.0.0.0/22 is subnetted, 1 subnets
i L2 4.4.0.0 [115/20] via 192.168.34.4, Serial2/2
R3(config-if)#do sh clns int
FastEthernet0/0 is administratively down, line protocol is down
CLNS protocol processing disabled
Serial2/0 is administratively down, line protocol is down
CLNS protocol processing disabled
Serial2/1 is up, line protocol is up
Checksums enabled, MTU 1500, Encapsulation HDLC
ERPDUs enabled, min. interval 10 msec.
CLNS fast switching disabled
CLNS SSE switching disabled
DEC compatibility mode OFF for this interface
Next ESH/ISH in 23 seconds
Routing Protocol: IS-IS
Circuit Type: level-2
Interface number 0×0, local circuit ID 0×100
Neighbor System-ID: R2
Level-2 Metric: 10, Priority: 64, Circuit ID: R3.00
Level-2 IPv6 Metric: 10
Number of active level-2 adjacencies: 1
Next IS-IS Hello in 7 seconds
if state UP
Serial2/2 is up, line protocol is up
Checksums enabled, MTU 1500, Encapsulation HDLC
ERPDUs enabled, min. interval 10 msec.