示例:配置多层 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 多级别逐步 说明部分介绍了设备 R5 上的步骤。
此示例具有以下特征:
-
设备 R5 充当 1 级/级别 2 路由器,用于将包含设备 R6 和设备 R7 的第 2 级骨干区域 49.0001 和级别 1 区域 49.0002 互连。
-
系统 ID 基于设备的 IPv4 lo0 地址。
-
丢失任何单个接口不会完全中断 IS-IS 操作。
-
所有路由器的 IPv4 lo0 地址均可通过 IS-IS 访问。
-
设备 R3 和设备 S1 之间的链路在第 49.0001 区域显示为区域内路由。此接口上无法建立 IS-IS 邻接。这可以通过在设备 R3 的接口上配置
passive
到设备 S1 的语句来实现。 -
级别 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.0192.0168.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 协议家族的所有接口上的 IS-IS 区域(在
[edit interfaces interface-name unit logical-unit-number]
层次结构级别),都启用了 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 protocols
命令以确认show interfaces
您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
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 中所示。