示例:为 IS-IS 配置 BFD
此示例介绍如何配置双向转发检测 (BFD) 协议以检测 IS-IS 网络中的故障。
QFX10000 系列交换机上的 ISIS for IPV6 不支持 BFD。
要求
开始之前,在两台路由器上配置 IS-IS。有关所需 IS-IS 配置的信息,请参阅 示例:配置 IS-IS 。
我们在 CLI 快速配置部分中提供了 IS-IS 配置,但未在分步介绍中介绍 IS-IS 配置。
此示例使用以下硬件和软件组件:
-
Junos OS 7.3 或更高版本
-
使用 Junos OS 22.4 版进行更新和重新验证
-
-
M Series、MX 系列和 T Series 路由器
概述
此示例显示了两个相互连接的路由器。每个路由器上都配置了一个环路接口。两台路由器上都配置了 IS-IS 和 BFD 协议。
配置
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,然后将命令复制并粘贴到层 [edit] 级的 CLI 中。
路由器 R1
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.1/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 10.0.255.1/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0255.0001.00 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection version automatic set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection minimum-interval 200 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection minimum-receive-interval 100 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection multiplier 2 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection no-adaptation set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection transmit-interval minimum-interval 100 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection transmit-interval threshold 300 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection detection-time threshold 500 set protocols isis interface lo0.0
路由器 R2
set interfaces ge-0/0/0 unit 0 family inet address 10.0.0.2/30 set interfaces ge-0/0/0 unit 0 family iso set interfaces lo0 unit 0 family inet address 10.0.255.2/32 set interfaces lo0 unit 0 family iso address 49.0001.0010.0255.0002.00 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection version automatic set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection minimum-interval 200 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection minimum-receive-interval 100 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection multiplier 2 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection no-adaptation set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection transmit-interval minimum-interval 100 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection transmit-interval threshold 300 set protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection detection-time threshold 500 set protocols isis interface lo0.0
程序
分步过程
下面的示例要求您在各个配置层级中进行导航。有关 CLI 导航的信息,请参阅 在配置模式下使用 CLI 编辑器。
要简单地为 IS-IS 配置 BFD,只需使用 minimum-interval 语句。当您使用该语句时, bfd-liveness-detection BFD 协议会为所有其他配置语句选择默认参数,而不指定任何参数。
您可以随时更改参数,而无需停止或重新启动现有会话。BFD 会自动调整到新的参数值。但是,在值与每个 BFD 对等方重新同步之前,不会对 BFD 参数进行更改。
要在路由器 R1 和 R2 上为 IS-IS 配置 BFD:
我们仅显示 R1 的步骤。
-
配置检测时间适配阈值,该阈值必须大于乘数乘以最小间隔。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set detection-time threshold 500
-
配置故障检测的最小传输和接收间隔。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set minimum-interval 200
-
仅配置故障检测的最小接收间隔。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set minimum-receive-interval 100
-
禁用 BFD 适配。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set no-adaptation
-
配置传输间隔阈值,该阈值必须大于最小传输间隔。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set transmit-interval threshold 300
-
配置故障检测的最小传输间隔。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set transmit-interval minimum-interval 100
-
配置乘数,即导致始发接口声明关闭的邻接方未接收的发送消息数据包数。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set multiplier 2
-
配置用于检测的 BFD 版本。
默认设置为自动检测版本。
[edit protocols isis interface ge-0/0/0.0 family inet bfd-liveness-detection] user@R1# set version automatic
结果
在配置模式下,发出 show protocols isis interface 命令以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明以更正配置。
user@R1# show protocols isis interface ge-0/0/0.0 family inet
bfd-liveness-detection {
version automatic;
minimum-interval 200;
minimum-receive-interval 100;
multiplier 2;
no-adaptation;
transmit-interval {
minimum-interval 100;
threshold 300;
}
detection-time {
threshold 500;
}
}
验证
确认配置工作正常。
验证路由器 R1 和 R2 之间的连接
目的
确保路由器 R1 和 R2 可以相互连接。
行动
根据网络拓扑对另一台路由器执行 Ping 命令,以检查两台路由器之间的连接。
user@R1> ping 10.0.0.2 count 2 PING 10.0.0.2 (10.0.0.2): 56 data bytes 64 bytes from 10.0.0.2: icmp_seq=0 ttl=64 time=2.148 ms 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.923 ms --- 10.0.0.2 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 1.923/2.035/2.148/0.113 ms
意义
路由器 R1 和 R2 能够相互 ping 通。
验证是否配置了 IS-IS
目的
确保 IS-IS 实例在两个路由器上运行。
行动
使用语 show isis database 句检查 IS-IS 实例是否在两个路由器(R1 和 R2)上运行。
user@R1> show isis database IS-IS level 1 link-state database: LSP ID Sequence Checksum Lifetime Attributes R1.00-00 0x1b 0xa2d5 552 L1 L2 R1.02-00 0x2b 0x8da3 545 L1 L2 R2.00-00 0x1a 0x628d 543 L1 L2 3 LSPs IS-IS level 2 link-state database: LSP ID Sequence Checksum Lifetime Attributes R1.00-00 0x1e 0xb9ba 552 L1 L2 R1.02-00 0x2b 0x8da3 545 L1 L2 R2.00-00 0x1d 0x877e 543 L1 L2 3 LSPs
意义
在两个路由器 R1 和 R2 上都配置了 IS-IS。
验证是否配置了 BFD
目的
确保 BFD 实例在两个路由器 R1 和 R2 上运行。
行动
show bfd session detail使用语句检查路由器上是否正在运行 BFD 实例。
user@R1> show bfd session detail
Detect Transmit
Address State Interface Time Interval Multiplier
10.0.0.2 Up ge-0/0/0.0 0.200 0.100 2
Client ISIS L1, TX interval 0.100, RX interval 0.100
Client ISIS L2, TX interval 0.100, RX interval 0.100
Session up time 00:02:41, previous down time 00:00:09
Local diagnostic None, remote diagnostic None
Remote state Up, version 1
Session type: Single hop BFD
1 sessions, 2 clients
Cumulative transmit rate 10.0 pps, cumulative receive rate 10.0 pps
意义
在路由器 R1 和 R2 上配置了 BFD,用于检测 IS-IS 网络中的故障。
