示例:配置多级 IS-IS 拓扑以控制区域间泛洪
此示例说明如何配置多级 IS-IS 拓扑。
要求
配置此示例之前,不需要除设备初始化之外的特殊配置。
概述
与 OSPF 一样,IS-IS 协议支持将路由域划分为多个区域,其级别可控制区域间泛洪。使用多个级别可以提高协议的可扩展性,因为级别 2(骨干)链路状态 PDU 通常不会泛洪到级别 1 区域。
IS-IS 2 级区域类似于 OSPF 骨干区域 (0),而 1 级区域的运作方式与 OSPF 完全剩余区域非常相似,因为默认路由通常用于到达层间和 AS 外部路由。
与 OSPF 不同,IS-IS 区域边界发生在路由器之间,因此给定的路由设备始终完全包含在特定区域内。共享一个公共区域号的路由器之间可以形成 1 级邻接,而 2 级邻接可以在可能共享也可能不共享一个区号的路由器之间形成。
图 1 显示了此示例中使用的拓扑。
CLI 快速配置显示了图 1 中所有设备的配置。#configuration69__isis-multi-level-step-by-step 部分介绍了设备 R5 上的步骤。
此示例具有以下特征:
-
设备 R5 用作 1 级/2 级路由器,用于互连包含设备 R6 和设备 R7 的 2 级主干区域 49.0001 和包含设备 R7 的 1 级区域 49.0002。
-
系统 ID 基于设备的 IPv4 lo0 地址。
-
丢失任何一个接口都不会完全中断 IS-IS作。
-
所有路由器的 IPv4 lo0 地址均可通过 IS-IS 访问。
-
设备 R3 和设备 S1 之间的链路在区域 49.0001 中显示为区域内路由。无法在此接口上建立 IS-IS 邻接。这是通过在设备 R3 与设备 S1 的接口上配置
passive语句来实现的。 -
第 2 级设备的环路地址不会显示在第 1 级区域中。
-
每个设备配对只有一个邻接。
拓扑学
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit] 级的 CLI 中。
设备 R3
set interfaces fe-1/2/0 unit 0 description to-R4
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.17/30
set interfaces fe-1/2/0 unit 0 family iso
set interfaces fe-1/2/1 unit 0 description to-R5
set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.21/30
set interfaces fe-1/2/1 unit 0 family iso
set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.41/30
set interfaces fe-1/2/2 unit 0 description to-S1
set interfaces lo0 unit 0 family inet address 192.168.0.3/32
set interfaces lo0 unit 0 family iso address 49.0001.1921.6800.0003.00
set protocols isis interface fe-1/2/0.0 level 1 disable
set protocols isis interface fe-1/2/1.0 level 1 disable
set protocols isis interface lo0.0 level 1 disable
set protocols isis interface fe-1/2/2.0 passive
设备 R4
set interfaces fe-1/2/0 unit 0 description to-R3
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.18/30
set interfaces fe-1/2/0 unit 0 family iso
set interfaces fe-1/2/1 unit 0 description to-R5
set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.25/30
set interfaces fe-1/2/1 unit 0 family iso
set interfaces lo0 unit 0 family inet address 192.168.0.4/32
set interfaces lo0 unit 0 family iso address 49.0001.0192.0168.0004.00
set protocols isis interface fe-1/2/0.0 level 1 disable
set protocols isis interface fe-1/2/1.0 level 1 disable
set protocols isis interface lo0.0 level 1 disable
设备 R5
set interfaces fe-1/2/0 unit 0 description to-R3
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.22/30
set interfaces fe-1/2/0 unit 0 family iso
set interfaces fe-1/2/1 unit 0 description to-R4
set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.26/30
set interfaces fe-1/2/1 unit 0 family iso
set interfaces fe-1/2/2 unit 0 description to-R6
set interfaces fe-1/2/2 unit 0 family inet address 10.0.0.29/30
set interfaces fe-1/2/2 unit 0 family iso
set interfaces fe-1/2/3 unit 0 description to-R7
set interfaces fe-1/2/3 unit 0 family inet address 10.0.0.38/30
set interfaces fe-1/2/3 unit 0 family iso
set interfaces lo0 unit 0 family inet address 192.168.0.5/32
set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0005.00
set protocols isis interface fe-1/2/0.0 level 1 disable
set protocols isis interface fe-1/2/1.0 level 1 disable
set protocols isis interface fe-1/2/2.0 level 2 disable
set protocols isis interface fe-1/2/3.0 level 2 disable
set protocols isis interface lo0.0 level 1 disable
设备 R6
set interfaces fe-1/2/0 unit 0 description to-R5
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.30/30
set interfaces fe-1/2/0 unit 0 family iso
set interfaces fe-1/2/1 unit 0 description to-R7
set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.33/30
set interfaces fe-1/2/1 unit 0 family iso
set interfaces lo0 unit 0 family inet address 192.168.0.6/32
set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0006.00
set protocols isis interface fe-1/2/0.0 level 2 disable
set protocols isis interface fe-1/2/1.0 level 2 disable
set protocols isis interface lo0.0 level 2 disable
设备 R7
set interfaces fe-1/2/0 unit 0 description to-R6
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.34/30
set interfaces fe-1/2/0 unit 0 family iso
set interfaces fe-1/2/1 unit 0 description to-R5
set interfaces fe-1/2/1 unit 0 family inet address 10.0.0.37/30
set interfaces fe-1/2/1 unit 0 family iso
set interfaces lo0 unit 0 family inet address 192.168.0.7/32
set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0007.00
set protocols isis interface fe-1/2/0.0 level 2 disable
set protocols isis interface fe-1/2/1.0 level 2 disable
set protocols isis interface lo0.0 level 2 disable
设备 S1
set interfaces fe-1/2/0 unit 0 family inet address 10.0.0.42/30
set interfaces fe-1/2/0 unit 0 description to-R3
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置多级 IS-IS:
-
配置网络接口。
通过在每个接口上包含 ISO 地址族,在接口上启用 IS-IS。
[edit interfaces] user@R5# set fe-1/2/0 unit 0 description to-R3 user@R5# set fe-1/2/0 unit 0 family inet address 10.0.0.22/30 user@R5# set fe-1/2/0 unit 0 family iso user@R5# set fe-1/2/1 unit 0 description to-R4 user@R5# set fe-1/2/1 unit 0 family inet address 10.0.0.26/30 user@R5# set fe-1/2/1 unit 0 family iso user@R5# set fe-1/2/2 unit 0 description to-R6 user@R5# set fe-1/2/2 unit 0 family inet address 10.0.0.29/30 user@R5# set fe-1/2/2 unit 0 family iso user@R5# set fe-1/2/3 unit 0 description to-R7 user@R5# set fe-1/2/3 unit 0 family inet address 10.0.0.38/30 user@R5# set fe-1/2/3 unit 0 family iso -
配置两个环路接口地址。
一个地址用于 IPv4。
另一个用于 IS-IS 区域 49.0002,以便设备 R5 可以与区域 49.0002 中的其他 1 级设备形成邻接。即使设备 R5 的 NET 将自己标识为属于第 1 级区域 49.0002,其环路接口也没有配置为 1 级接口。这样做会导致通往设备 R5 环路的路由注入到级别 1 区域。
[edit interfaces lo0 unit 0] user@R5# set family inet address 192.168.0.5/32 user@R5# set family iso address 49.0002.0192.0168.0005.00 -
基于每个接口指定 IS-IS 级别。
设备 R5 在每个链路上都与同一层级的其他路由设备相邻。
默认情况下,在启用了 ISO 协议家族的所有接口上(在
[edit interfaces interface-name unit logical-unit-number]层次结构级别)上,为 IS-IS 区域启用 IS-IS。要在接口上的任何特定级别禁用 IS-IS,请包含语disable句。设备 R5 的环路接口配置为仅运行级别 2。如果在 lo0.0 上启用了第 1 级作,则设备 R5 会将其环路地址包含在其第 1 级链路状态 PDU 中,这对于本示例而言是不正确的,因为在此示例中,第 2 级设备的环路地址不应出现在第 1 级区域中。
与 OSPF 不同,您必须在
[edit protocols isis]层次结构级别显式列出路由器的 lo0 接口,因为此接口是路由器 NET 的来源,因此必须配置为 IS-IS 接口。在 IS-IS 中,lo0 接口默认以被动模式运行,这是理想模式,因为虚拟接口上永远不会发生邻接形成。[edit protocols isis] user@R5# set interface fe-1/2/0.0 level 1 disable user@R5# set interface fe-1/2/1.0 level 1 disable user@R5# set interface fe-1/2/2.0 level 2 disable user@R5# set interface fe-1/2/3.0 level 2 disable user@R5# set interface lo0.0 level 1 disable
结果
在配置模式下,输入 show interfaces 和 show protocols 命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@R5# show interfaces
fe-1/2/0 {
unit 0{
description to-R3;
family inet {
address 10.0.0.22/30;
}
family iso;
}
}
fe-1/2/1 {
unit 0 {
description to-R4;
family inet {
address 10.0.0.26/30;
}
family iso;
}
}
fe-1/2/2 {
unit 0 {
description to-R6;
family inet {
address 10.0.0.29/30;
}
family iso;
}
}
fe-1/2/3 {
unit 0 {
description to-R7;
family inet {
address 10.0.0.38/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.5/32;
}
family iso {
address 49.0002.0192.0168.0005.00;
}
}
}
user@R5# show protocols
isis {
interface fe-1/2/0.0 {
level 1 disable;
}
interface fe-1/2/1.0 {
level 1 disable;
}
interface fe-1/2/2.0 {
level 2 disable;
}
interface fe-1/2/3.0 {
level 2 disable;
}
interface lo0.0 {
level 1 disable;
}
}
如果完成设备配置,请从配置模式输入 commit 。
验证
确认配置工作正常。
检查接口与区域的关联
目的
请确保按预期配置接口与区域的关联。
行动
在作模式下,输入 show isis interface 命令。
user@R5> show isis interface IS-IS interface database: Interface L CirID Level 1 DR Level 2 DR L1/L2 Metric lo0.0 3 0x1 Disabled Passive 0/0 fe-1/2/0.0 2 0x3 Disabled R5.03 10/10 fe-1/2/1.0 2 0x2 Disabled R5.02 10/10 fe-1/2/2.0 1 0x1 R6.02 Disabled 10/10 fe-1/2/3.0 1 0x4 R5.04 Disabled 10/10
意义
输出显示设备 R5 的接口已正确配置为 ISO 系列,并且接口已置于正确的级别。
您还可以看到,设备 R5 已在其支持广播的 IS-IS 接口上选择自身作为指定中间系统 (DIS)。
验证 IS-IS 邻接
目的
验证设备 R5 与其 IS-IS 邻接方之间是否已形成预期的邻接。
行动
在作模式下,输入 show isis adjacency detail 命令。
user@R5> show isis adjacency detail R3 Interface: fe-1/2/0.0, Level: 2, State: Up, Expires in 25 secs Priority: 64, Up/Down transitions: 1, Last transition: 03:19:31 ago Circuit type: 2, Speaks: IP, IPv6, MAC address: 0:5:85:8f:c8:bc Topologies: Unicast Restart capable: Yes, Adjacency advertisement: Advertise LAN id: R5.03, IP addresses: 10.0.0.21 R4 Interface: fe-1/2/1.0, Level: 2, State: Up, Expires in 24 secs Priority: 64, Up/Down transitions: 1, Last transition: 03:19:36 ago Circuit type: 2, Speaks: IP, IPv6, MAC address: 0:5:85:8f:c8:bc Topologies: Unicast Restart capable: Yes, Adjacency advertisement: Advertise LAN id: R5.02, IP addresses: 10.0.0.25 R6 Interface: fe-1/2/2.0, Level: 1, State: Up, Expires in 6 secs Priority: 64, Up/Down transitions: 1, Last transition: 03:20:24 ago Circuit type: 1, Speaks: IP, IPv6, MAC address: 0:5:85:8f:c8:bd Topologies: Unicast Restart capable: Yes, Adjacency advertisement: Advertise LAN id: R6.02, IP addresses: 10.0.0.30 R7 Interface: fe-1/2/3.0, Level: 1, State: Up, Expires in 21 secs Priority: 64, Up/Down transitions: 1, Last transition: 03:19:29 ago Circuit type: 1, Speaks: IP, IPv6, MAC address: 0:5:85:8f:c8:bc Topologies: Unicast Restart capable: Yes, Adjacency advertisement: Advertise LAN id: R5.04, IP addresses: 10.0.0.37
意义
这些结果确认设备 R5 有两个 2 级邻接和两个 1 级邻接。
检查 IS-IS 数据库
目的
由于设备 R5 是连接了 1 级/2 级 (L1/L2) 的路由器,因此请检查与区域 49.0002 关联的 1 级链路状态数据库,以确认来自骨干路由器的环路地址未播发到级别 1 区域。
行动
在作模式下,输入 show isis database detail 命令。
user@R5> show isis database detail IS-IS level 1 link-state database: R5.00-00 Sequence: 0x19, Checksum: 0x7488, Lifetime: 727 secs IS neighbor: R5.04 Metric: 10 IS neighbor: R6.02 Metric: 10 IP prefix: 10.0.0.28/30 Metric: 10 Internal Up IP prefix: 10.0.0.36/30 Metric: 10 Internal Up R5.04-00 Sequence: 0x14, Checksum: 0x2668, Lifetime: 821 secs IS neighbor: R5.00 Metric: 0 IS neighbor: R7.00 Metric: 0 R6.00-00 Sequence: 0x17, Checksum: 0xa65, Lifetime: 774 secs IS neighbor: R6.02 Metric: 10 IS neighbor: R7.02 Metric: 10 IP prefix: 10.0.0.28/30 Metric: 10 Internal Up IP prefix: 10.0.0.32/30 Metric: 10 Internal Up IP prefix: 192.168.0.6/32 Metric: 0 Internal Up R6.02-00 Sequence: 0x13, Checksum: 0xd1c0, Lifetime: 908 secs IS neighbor: R5.00 Metric: 0 IS neighbor: R6.00 Metric: 0 R7.00-00 Sequence: 0x17, Checksum: 0xe39, Lifetime: 775 secs IS neighbor: R5.04 Metric: 10 IS neighbor: R7.02 Metric: 10 IP prefix: 10.0.0.32/30 Metric: 10 Internal Up IP prefix: 10.0.0.36/30 Metric: 10 Internal Up IP prefix: 192.168.0.7/32 Metric: 0 Internal Up R7.02-00 Sequence: 0x13, Checksum: 0x404d, Lifetime: 966 secs IS neighbor: R6.00 Metric: 0 IS neighbor: R7.00 Metric: 0 IS-IS level 2 link-state database: R3.00-00 Sequence: 0x17, Checksum: 0x5f84, Lifetime: 1085 secs IS neighbor: R4.02 Metric: 10 IS neighbor: R5.03 Metric: 10 IP prefix: 10.0.0.16/30 Metric: 10 Internal Up IP prefix: 10.0.0.20/30 Metric: 10 Internal Up IP prefix: 10.0.0.40/30 Metric: 10 Internal Up IP prefix: 192.168.0.3/32 Metric: 0 Internal Up R4.00-00 Sequence: 0x17, Checksum: 0xab3a, Lifetime: 949 secs IS neighbor: R4.02 Metric: 10 IS neighbor: R5.02 Metric: 10 IP prefix: 10.0.0.16/30 Metric: 10 Internal Up IP prefix: 10.0.0.24/30 Metric: 10 Internal Up IP prefix: 192.168.0.4/32 Metric: 0 Internal Up R4.02-00 Sequence: 0x14, Checksum: 0xf2a8, Lifetime: 1022 secs IS neighbor: R3.00 Metric: 0 IS neighbor: R4.00 Metric: 0 R5.00-00 Sequence: 0x1f, Checksum: 0x20d7, Lifetime: 821 secs IS neighbor: R5.02 Metric: 10 IS neighbor: R5.03 Metric: 10 IP prefix: 10.0.0.20/30 Metric: 10 Internal Up IP prefix: 10.0.0.24/30 Metric: 10 Internal Up IP prefix: 10.0.0.28/30 Metric: 10 Internal Up IP prefix: 10.0.0.32/30 Metric: 20 Internal Up IP prefix: 10.0.0.36/30 Metric: 10 Internal Up IP prefix: 192.168.0.5/32 Metric: 0 Internal Up IP prefix: 192.168.0.6/32 Metric: 10 Internal Up IP prefix: 192.168.0.7/32 Metric: 10 Internal Up R5.02-00 Sequence: 0x14, Checksum: 0x6135, Lifetime: 977 secs IS neighbor: R4.00 Metric: 0 IS neighbor: R5.00 Metric: 0 R5.03-00 Sequence: 0x14, Checksum: 0x1483, Lifetime: 1091 secs IS neighbor: R3.00 Metric: 0 IS neighbor: R5.00 Metric: 0
意义
此显示表示设备 R5 的环路接口已正确配置为仅运行第 2 级。如果在 lo0.0 上启用了第 1 级作,设备 R5 就会在其第 1 级链路状态 PDU 中包含其环路地址。
您还可以看到,设备 R5 具有从其相邻邻接方接收的 2 级链路状态 PDU。
与 OSPF 完全剩余区域一样,默认情况下,没有主干(级别 2)或外部前缀泄漏到级别 1 区域。但是,第 1 级前缀会向上泄露到 IS-IS 主干网中,如设备 R5 的第 2 级链路状态 PDU 所示。