示例:配置 IS-IS
此示例说明如何在简单的双设备网络拓扑中配置 IS-IS。
我们的内容测试团队已经验证并更新了此示例。
要求
配置此示例之前,不需要除设备初始化之外的特殊配置。
概述
在此示例中,您将在单个 IS-IS 区域中配置两个设备,设备 R1 和设备 R2。
要启用 IS-IS 路由,您必须:
-
通过在接口上包含
family iso address net-address语句,在其中一个设备接口(最好是 lo0 接口)上配置 NET 地址(也称为系统 ID 或 NSAP 地址)。 -
通过在接口上包含
family iso语句,在支持 IS-IS 协议的所有接口上配置 ISO 家族。 -
通过在协议配置中包含语
interface interface-name句,将设备接口播发至 IS-IS。 -
(仅限保安设备)通过在安全转发选项配置中包含语
family mode packet-based句来启用 IS-IS 流量的转发。注意:低于 19.2R1-S2 的 Junos 版本(包括 19.2R1-S2)支持 ISIS PDU 交换,但未在
[edit security forwarding-options family iso]下显式为 ISIS 设置数据包模式。在较新的版本中,需要此设置才能使 ISIS 正常运行。将 SRX 设备升级到高于 19.2R1-S2 的 Junos 版本时,必须为 ISIS 配置数据包模式,否则不会形成邻接。
图 1 显示了此示例中使用的拓扑。
配置
程序
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit] 级的 CLI 中。
设备 R1
set security forwarding-options family iso mode packet-based set interfaces ge-0/0/0 unit 0 description "To R2" set interfaces ge-0/0/0 unit 0 family inet address 10.100.12.1/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.1/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0001.00 set protocols isis interface ge-0/0/0.0 set protocols isis interface lo0.0
设备 R2
set security forwarding-options family iso mode packet-based set interfaces ge-0/0/0 unit 0 description "To R1" set interfaces ge-0/0/0 unit 0 family inet address 10.100.12.2/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 192.168.0.2/32 set interfaces lo0 unit 0 family iso address 49.0002.0192.0168.0002.00 set protocols isis interface ge-0/0/0.0 set protocols isis interface lo0.0
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置 IS-IS:
-
(仅限保安设备)启用 IS-IS 流量的转发,以克服丢弃 IS-IS 流量的默认行为。
[edit security] user@R1# set forwarding-options family iso mode packet-based
-
配置设备接口,并在接口上启用 ISO 家族。
[edit interfaces] user@R1# set ge-0/0/0 unit 0 description "To R2" user@R1# set ge-0/0/0 unit 0 family inet address 10.100.12.1/30 user@R1# set ge-0/0/0 unit 0 family iso
-
配置环路接口并设置 NET 地址。
[edit interfaces] user@R1# set lo0 unit 0 family inet address 192.168.0.1/32 user@R1# set lo0 unit 0 family iso address 49.0002.0192.0168.0001.00
-
为设备接口启用 IS-IS。
[edit protocols] user@R1# set isis interface ge-0/0/0.0 user@R1# set isis interface lo0.0
结果
在配置模式下,输入 show 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@R1# show
security {
forwarding-options {
family iso {
mode packet-based;
}
}
}
interfaces {
ge-0/0/0 {
unit 0 {
description "To R2";
family inet {
address 10.100.12.1/30;
}
family iso;
}
}
lo0 {
unit 0 {
family inet {
address 192.168.0.1/32;
}
family iso {
address 49.0002.0192.0168.0001.00;
}
}
}
}
protocols {
isis {
interface ge-0/0/0.0;
interface lo0.0;
}
}
如果完成设备配置,请从配置模式输入 commit 。
验证
确认配置工作正常。
验证 IS-IS 邻接和接口
目的
验证 IS-IS 邻接是否已建立,以及 IS-IS 接口是否包含在协议配置中。
行动
在作模式下,输入 show isis adjacency 和 show isis interface 命令。
user@R1> show isis adjacency Interface System L State Hold (secs) SNPA ge-0/0/0.0 R2 1 Up 7 56:4:1e:0:5f:58 ge-0/0/0.0 R2 2 Up 7 56:4:1e:0:5f:58
user@R1> show isis interface IS-IS interface database: Interface L CirID Level 1 DR Level 2 DR L1/L2 Metric ge-0/0/0.0 3 0x1 R2.02 R2.02 10/10 lo0.0 3 0x1 Passive Passive 0/0
意义
设备 R1 已与设备 R2 建立邻接关系, State 如输出字段所示,为 Up。
设备 R1 接口在 IS-IS 中播发,设备 R2 作为负责发送链路状态通告的指定路由器。两台设备均启用了 1 级和 2 级 IS-IS,如 L 3 输出字段所示。
验证端到端连接
目的
通过 ping 设备的环路地址来验证设备的可访问性。
行动
在作模式下,输入 ping 192.168.0.1 source 192.168.0.2 count 100 rapid 命令。
user@R1> ping 192.168.0.1 source 192.168.0.2 count 100 rapid PING 192.168.0.2 (192.168.0.2): 56 data bytes !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --- 192.168.0.2 ping statistics --- 100 packets transmitted, 100 packets received, 0% packet loss round-trip min/avg/max/stddev = 1.807/2.425/6.447/0.553 ms
意义
这些设备可以成功地对彼此的环路地址执行 ping 命令。