1.目的

(1)在路由器上启动 IS-IS 路由进程

(2)启用参与路由协议的接口

(3)L1 和 L2 路由的区别

(4)配置 L1 或 L2 路由器

(5)配置电路类型

(6)配置区域间路由汇总

(7)通告默认路由

(8)配置 IS-IS 认证

(9)查看和调试多区域 IS-IS 路由协议相关信息

2.拓扑

无类路由协议的好处(路由协议中的集成服务协议)(1)

IS-IS 区域的划分是基于路由器的,也就是说一个路由器只能属于一个区域,而 OSPF区域的划分是基于链路的

3.步骤

(1)步骤 1:配置路由器 R1

R1(config)# 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)# interface Loopback0

R1(config-if)# ip address 1.1.1.1 255.255.255.0

R1(config-if)# ip router isis

R1(config)# interface Serial0/0/0

R1(config-if)# ip address 192.168.12.1 255.255.255.0

R1(config-if)# ip router isis

R1(config-if)# isis password neighbor level-1 //启用 level 1 邻居认证

R1(config-if)# no shutdown

(2)步骤 2:配置路由器 R2

R2(config)# 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)# interface Serial0/0/0

R2(config-if)# ip address 192.168.12.2 255.255.255.0

R2(config-if)# clockrate 128000

R2(config-if)# ip router isis

R2(config-if)# isis password neighbor level-1

R2(config-if)# no shutdown

R2(config)# interface Serial0/0/1

R2(config-if)# ip address 192.168.23.2 255.255.255.0

R2(config-if)# ip router isis

R2(config-if)# clockrate 128000

R2(config-if)# no shutdown

(3)步骤 3:配置路由器 R3

R3(config)# 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)# interface Serial0/0/0

R3(config-if)# ip address 192.168.34.3 255.255.255.0

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)# no shutdown

R3(config)# interface Serial0/0/1

R3(config-if)# ip address 192.168.23.3 255.255.255.0

R3(config-if)# ip router isis

R3(config-if)# no shutdown

(4)步骤 4:配置路由器 R4

R4(config)# 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)# interface Loopback0

R4(config-if)# ip address 4.4.0.4 255.255.255.0

R4(config-if)# ip router isis

R4(config)# interface Loopback1

R4(config-if)# ip address 4.4.1.4 255.255.255.0

R4(config-if)# ip router isis

R4(config)# interface Loopback2

R4(config-if)# ip address 4.4.2.4 255.255.255.0

R4(config-if)# ip router isis

R4(config)# interface Loopback3

R4(config-if)# ip address 4.4.3.4 255.255.255.0

R4(config-if)# ip router isis

R4(config-if)# interface Serial0/0/0

R4(config-if)# ip address 192.168.34.4 255.255.255.0

R4(config-if)# ip router isis

R4(config-if)# isis circuit-type level-2-only

R4(config-if)# isis password neighborpassword level-2

R4(config-if)#no shutdown

no shutdown

【技术要点】

IS-IS 的认证只限于明文口令,Cisco 的 IOS 支持 3 个级别的认证:

(1)邻居认证:相互连接的路由器接口必须配置相同的口令,同时必须为 L1 和 L2 类

型的邻居关系配置各自的认证,L1 邻居认证的密码和 L2 邻居认证的密码可以不同。邻居认

证通过命令“ isis password”配置。本实验中 R1 和 R2 之间的串行链路启用 Level-1 的邻

居认证,而 R3 和 R4 之间的串行链路启用 Level-2 的邻居认证;

(2)区域认证:区域内的每台路由器必须执行认证,并且必须使用相同的口令。区域

认证通过命令“ area-password”配置。本实验中区域“49.0001”启用区域认证;

(3)域认证:域内的每一个 L2 和 L1/L2 类型的路由器必须执行认证,并且必须使用相

同的口令。域认证通过命令“ domain-password”配置。本实验中 R2、R3 和 R4 都配置域认

证,因为路由器 R1 是 L1 路由器,所以不用配置域认证。

4.实验调试

(1) show isis database

R1# show isis database

IS-IS Level-1 Link State Database:

LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL

R1.00-00 * 0x0000003B 0x1F72 659 0/0/0

R2.00-00 0x00000039 0x9DEE 658 1/0/0

R2# show isis database

IS-IS Level-1 Link State Database:

LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL

R1.00-00 0x00000008 0x8161 993 1/0/0

R2.00-00 * 0x00000007 0x02BC 902 1/0/0

IS-IS Level-2 Link State Database:

LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL

R1.00-00 0x00000009 0xE455 1120 0/0/0

R2.00-00 * 0x00000006 0xFFFD 903 0/0/0

R3.00-00 0x00000009 0xE9C4 1039 0/0/0

R4.00-00 0x0000000B 0xC040 1110 0/0/0

R3# show isis database

IS-IS Level-2 Link State Database:

LSPID LSP Seq Num LSP Checksum LSP Holdtime ATT/P/OL

R2.00-00 0x0000003B 0xC0D2 1036 0/0/0

R3.00-00 * 0x00000044 0x0FE3 1043 0/0/0

R4.00-00 0x00000046 0xEC58 1041 0/0/0

以上输出表明:

① R1 路由器为 L1 路由器,只维护 L1 的链路状态数据库;

② R2 路由器为 L1/L2 路由器,同时为 L1 和 L2 维护单独的链路状态数据库,也表明所

在区域有另一台路由器 R1;

③ R3 和 R4 路由器为 L2 路由器,只维护 L2 的链路状态数据库。

(2) show ip route

R1#show ip route isis

i L1 192.168.23.0/24 [115/20] via 192.168.12.2, Serial0/0/0

i*L1 0.0.0.0/0 [115/10] via 192.168.12.2, Serial0/0/0

show ip route isis

i L1 192.168.23.0/24 [115/20] via 192.168.12.2, Serial0/0/0

i*L1 0.0.0.0/0 [115/10] via 192.168.12.2, Serial0/0/0

R2# show ip route isis

1.0.0.0/24 is subnetted, 1 subnets

i L1 1.1.1.0 [115/20] via 192.168.12.1, Serial0/0/0

4.0.0.0/22 is subnetted, 1 subnets

i L2 4.4.0.0 [115/30] via 192.168.23.3, Serial0/0/1

i L2 192.168.34.0/24 [115/20] via 192.168.23.3, Serial0/0/1

i L2 4.4.0.0 [115/30] via 192.168.23.3, Serial0/0/1

i L2 192.168.34.0/24 [115/20] via 192.168.23.3, Serial0/0/1

R3# show ip route isis

i L2 192.168.12.0/24 [115/20] via 192.168.23.2, Serial0/0/1

1.0.0.0/24 is subnetted, 1 subnets

i L2 1.1.1.0 [115/30] via 192.168.23.2, Serial0/0/1

4.0.0.0/22 is subnetted, 1 subnets

i L2 4.4.0.0 [115/20] via 192.168.34.4, Serial0/0/0

i*L2 0.0.0.0/0 [115/10] via 192.168.23.2, Serial0/0/1

R4# show ip route isis

i L2 192.168.12.0/24 [115/30] via 192.168.34.3, Serial0/0/0

1.0.0.0/24 is subnetted, 1 subnets

i L2 1.1.1.0 [115/40] via 192.168.34.3, Serial0/0/0

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, Serial0/0/0

i*L2 0.0.0.0/0 [115/20] via 192.168.34.3, Serial0/0/0

以上输出表明:

① 由于 R1 为 L1 路由器,所以只有“ i L1”的路由和一条到最近的 L1/L2 路由器的默

认路由“ i*L1”;

② 由于 R1 和 R2 在一个区域,所以 R2 既有“ i L1”的路由,又有“ i L2”的路由;

③ R3 和 R4 都是 L2 路由器,所以只有“ i L2”的路由;

④ R3 和 R4 都收到一条由 R2 注入的默认路由“ i*L2”;

⑤ R2 和 R3 都收到 R4 的汇总路由,同时 R4 的路由表自动生成一条“ i su”的路由条

目,主要是为了避免路由环路。

(3) show clns interface

R3#show clns interface s0/0/0

Serial0/0/0 is up, line protocol is up

Checksums enabled, MTU 1500, Encapsulation HDLC

ERPDUs enabled, min. interval 10 msec.

CLNS fast switching enabled

CLNS SSE switching disabled

DEC compatibility mode OFF for this interface

Next ESH/ISH in 12 seconds

Routing Protocol: IS-IS

Circuit Type: level-2

......

Circuit Type: level-2

......

以上输出可以看到接口的电路类型为“ level-2”

以下是华为数通路由交换方向完整技术分享,欢迎对华为网络技术感兴趣的小伙伴们订阅。

【可在专栏中进行查看订阅】

华为新版HCIA数通路由交换

华为新版HCIP数通路由交换

华为新版HCIE数通路由交换

,