使用 BFD 配置 DHCP 本地服务器客户端连接检测
您可以为 DHCP 用户 IP 会话或 DHCP 客户端 IP 会话配置带有双向转发检测(BFD)的活动检测,以检查 DHCP 本地服务器客户端的连接。客户端必须在指定的一段时间内响应活动检测请求。如果在这段时间内没有收到响应,不能进行多次连续尝试,则活动检测检查将失败,并实施失败操作。
您还可以为 DHCP 中继配置 DHCP 活动检测。
要为 DHCP 本地服务器配置活动检测:
- 指定要配置活动检测。
对于 DHCP 全局配置:
[edit system services dhcp-local-server]user@host# edit liveness-detection对于 DHCP 组配置:
[edit system services dhcp-local-server group group-name]user@host# edit liveness-detection
注意 DHCPv6 配置还支持活动检测。要配置 DHCPv6 活动检测,请在liveness-detection[edit system services dhcp-local-server dhcpv6]或[edit system services dhcp-local-server dhcpv6 group group-name]层次结构级别上包括语句和任何后续配置语句。
- 指定要配置活动检测方法。
- 指定希望 DHCP 使用的活动检测方法。
注意 在早于 Junos OS Release 17.4 R1 的版本中,对于所有平台上的活动检测都支持的唯一方法是 BFD。
从 Junos OS Release 17.4 R1 开始,除了 BFD 活动检测之外,还支持在 MX 系列路由器上为 DHCPv6 和 ND 数据包使用 ARP 数据包(对于第2层活动检测)。两个活动检测方法互相排斥。有关配置 ARP 和 ND 第2层活动检测的信息,请参阅使用 ARP 和邻居发现数据包的 DHCP 活动检测。
- 根据需要配置活动检测方法。
请参阅示例:Example: Configuring Group Liveness Detection with BFD for DHCP Local Server Clients配置组活动检测,举例说明如何使用 BFD 为 dhcp 本地服务器活动检测配置 DHCPv4 组。
- 配置在发生活动检测故障时路由器采取的操作。
对于 DHCP 全局配置:
[edit system services dhcp-local-server liveness-detection]user@host# edit failure-action action对于 DHCP 组配置:
[edit system services dhcp-local-server group group-name liveness-detection]user@host# edit failure-action action