示例:为网络配置 BFD IS-IS
此示例介绍如何配置双向转发检测 (BFD) 协议以检测网络IS-IS故障。
对于交换机上的 IPV6,ISIS 不支持 BFD QFX10000 BFD。
要求
开始之前,在两个IS-IS配置路由。请参阅 示例:配置IS-IS, 了解所需的IS-IS配置。
此示例使用以下硬件和软件组件:
Junos OS 7.3 或更高版本
M Series、MX 系列和 T Series 路由器
概述
此示例显示了彼此连接的两台路由器。在每个路由器上配置了环路接口。IS-IS路由器上配置策略和 BFD 协议。
配置
CLI快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以匹配网络配置,然后将命令复制并粘贴到 层次结构级别的 CLI 中 [edit]
。
路由器 R1
set protocols isis interface so-0/0/0 bfd-liveness-detection detection-time threshold 5 set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-interval 2 set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-receive-interval 1 set protocols isis interface so-0/0/0 bfd-liveness-detection no-adaptation set protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval threshold 3 set protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval minimum-interval 1 set protocols isis interface so-0/0/0 bfd-liveness-detection multiplier 2 set protocols isis interface so-0/0/0 bfd-liveness-detection version automatic
路由器 R2
set protocols isis interface so-0/0/0 bfd-liveness-detection detection-time threshold 6 set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-interval 3 set protocols isis interface so-0/0/0 bfd-liveness-detection minimum-receive-interval 1 set protocols isis interface so-0/0/0 bfd-liveness-detection no-adaptation set protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval threshold 4 set protocols isis interface so-0/0/0 bfd-liveness-detection transmit-interval minimum-interval 1 set protocols isis interface so-0/0/0 bfd-liveness-detection multiplier 2 set protocols isis interface so-0/0/0 bfd-liveness-detection version automatic
程序
逐步过程
以下示例要求您在配置层次结构中导航各个级别。有关导航应用程序CLI,请参阅 在CLI 模式下使用 CLI编辑器。
要简单配置 BFD IS-IS,只需 minimum-interval
语句。使用 语句时,BFD 协议会为所有其他配置语句选择默认参数, bfd-liveness-detection
而不指定任何参数。
您随时都可以更改参数,而无需停止或重新启动现有会话。BFD 自动调整到新的参数值。但是,BFD 参数不会更改,直到值与每个 BFD 对等方重新同步。
要配置路由器 R1 和 R2 IS-IS BFD:
为设备启用 BFD 故障IS-IS。
[edit protocols isis] user@R1# set interface so-0/0/0 bfd-liveness-detection
[edit protocols isis] user@R2# set interface so-0/0/0 bfd-liveness-detection
配置检测时间改编的阈值,其必须大于乘法器数乘以最小间隔。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set detection-time threshold 5
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set detection-time threshold 6
配置最小传输和接收间隔以检测故障。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set minimum-interval 2
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set minimum-interval 3
仅配置故障检测的最小接收间隔时间。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set minimum-receive-interval 1
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set minimum-receive-interval 1
禁用 BFD 适配。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set no-adaptation
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set no-adaptation
配置传输间隔的阈值,其必须大于最小传输间隔。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set transmit-interval threshold 3
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set transmit-interval threshold 4
配置故障检测的最小传输间隔时间。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set transmit-interval minimum-interval 1
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set transmit-interval minimum-interval 1
配置乘法器编号,即由邻接方未接收的 hello 数据包数,它会使发起接口声明为关闭。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set multiplier 2
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set multiplier 2
配置用于检测的 BFD 版本。
默认设置是自动检测版本。
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R1# set version automatic
[edit protocols isis interface so-0/0/0 bfd-liveness-detection] user@R2# set version automatic
结果
在配置模式下,发出 命令以确认您的 show protocols isis interface
配置。如果输出未显示预期的配置,请重复此示例中的说明,以更正配置。
user@R1# show protocols isis interface so-0/0/0 bfd-liveness-detection { version automatic; minimum-interval 2; minimum-receive-interval 1; multiplier 2; no-adaptation; transmit-interval { minimum-interval 1; threshold 3; } detection-time { threshold 5; } } ...
user@R2# show protocols isis interface so-0/0/0 bfd-liveness-detection { version automatic; minimum-interval 3; minimum-receive-interval 1; multiplier 2; no-adaptation; transmit-interval { minimum-interval 1; threshold 4; } detection-time { threshold 6; } } ...
验证
确认配置工作正常。
验证路由器 R1 和 R2 之间的连接
目的
确保路由器 R1 和 R2 相互连接。
行动
按网络拓扑对另一个路由器使用 Ping 命令检查两个路由器之间的连接。
user@R1> ping 10.0.0.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=1.367 ms 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.662 ms 64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=1.291 ms ^C --- 10.0.0.2 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 1.291/1.440/1.662/0.160 ms
user@R2> ping 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=1.287 ms 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.310 ms 64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.289 ms ^C --- 10.0.0.1 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 1.287/1.295/1.310/0.010 ms
意义
路由器 R1 和 R2 相互连接。
验证IS-IS是否已配置
目的
确保两个IS-IS实例均运行。
行动
使用 show isis database
语句检查 R1 和 R2 IS-IS路由器上是否运行该实例。
user@R1> show isis database IS-IS level 1 link-state database: LSP ID Sequence Checksum Lifetime Attributes R1.00-00 0x4a571 0x30c5 1195 L1 L2 R2.00-00 0x4a586 0x4b7e 1195 L1 L2 R2.02-00 0x330ca1 0x3492 1196 L1 L2 3 LSPs IS-IS level 2 link-state database: LSP ID Sequence Checksum Lifetime Attributes R1.00-00 0x4a856 0x5db0 1194 L1 L2 R2.00-00 0x4a89d 0x149b 1194 L1 L2 R2.02-00 0x1fb2ff 0xd302 1194 L1 L2 3 LSPs
user@R2> show isis database IS-IS level 1 link-state database: LSP ID Sequence Checksum Lifetime Attributes R1.00-00 0x4b707 0xcc80 1195 L1 L2 R2.00-00 0x4b71b 0xeb37 1198 L1 L2 R2.02-00 0x33c2ce 0xb52d 1198 L1 L2 3 LSPs IS-IS level 2 link-state database: LSP ID Sequence Checksum Lifetime Attributes R1.00-00 0x4b9f2 0xee70 1192 L1 L2 R2.00-00 0x4ba41 0x9862 1197 L1 L2 R2.02-00 0x3 0x6242 1198 L1 L2 3 LSPs
意义
IS-IS在路由器 R1 和 R2 上配置。
验证是否已配置 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 so-0/0/0 2.000 1.000 2 Client ISIS R2, TX interval 0.001, RX interval 0.001 Client ISIS R1, TX interval 0.001, RX interval 0.001 Session down time 00:00:00, previous up time 00:00:15 Local diagnostic NbrSignal, remote diagnostic NbrSignal Remote state AdminDown, version 1 Router 3, routing table index 17 1 sessions, 2 clients Cumulative transmit rate 1.0 pps, cumulative receive rate 1.0 pps
user@R2> show bfd session detail Detect Transmit Address State Interface Time Interval Multiplier 10.0.0.1 Up so-0/0/0 2.000 1.000 2 Client ISIS R2, TX interval 0.001, RX interval 0.001 Session down time 00:00:00, previous up time 00:00:05 Local diagnostic NbrSignal, remote diagnostic NbrSignal Remote state AdminDown, version 1 Router 2, routing table index 15 1 sessions, 1 clients Cumulative transmit rate 1.0 pps, cumulative receive rate 1.0 pps
意义
在路由器 R1 和 R2 上配置 BFD,以检测网络IS-IS故障。