The peer bfd valid-ttl-hops command sets a TTL value for checking the BFD session with a specified peer.
The undo peer bfd valid-ttl-hops command restores the default configuration.
The peer bfd valid-ttl-hops disable command deletes the TTL value set for checking the BFD session with a specified peer.
The undo peer bfd valid-ttl-hops disable command cancels the deletion.
By default, no TTL value is set for checking a BFD session.
Usage Scenario
To set a TTL value for checking the BFD session with a specified peer, run the peer bfd valid-ttl-hops command. This configuration allows the traffic forwarding path to be quickly adjusted if BFD detects a fault on the link between the local device and BGP peer. Specifically, the local interface used to establish the BFD session forwards only the packets with a TTL value greater than or equal to the configured TTL value. If the TTL value in a BFD packet is smaller than the configured TTL value, the interface discards this packet, the BFD session goes down, and BFD notifies BGP of this event. In this manner, BGP routes are re-converged so that the traffic forwarding path is adjusted.
Assume that the peer bfd valid-ttl-hops or peer bfd valid-ttl-hops disable command is run on the local device for a specified peer and a TTL value is set for checking the BFD session with each peer in the peer group to which the specified peer belongs (the peer groupname bfd valid-ttl-hops command is run on the local device for the peer group). In this case, the configuration for the specified peer takes precedence over the configuration for the peer group. Assume that the undo peer bfd valid-ttl-hop or undo peer bfd valid-ttl-hops disable command is run on the local device for a specified peer and a TTL value is set for checking the BFD session with each peer in the peer group to which the specified peer belongs (the peer groupname bfd valid-ttl-hops command is run on the local device for the peer group). In this case, the specified peer inherits the configuration from the peer group.Configuration Impact
If the peer bfd valid-ttl-hops command is run more than once, the latest configuration overrides the previous one.
The peer bfd valid-ttl-hops and peer bfd enable single-hop-prefer commands are mutually exclusive. The peer bfd valid-ttl-hops and peer bfd enable per-link one-arm-echo commands are mutually exclusive.Precautions
BGP can share the same BFD session with IS-IS and OSPF. When TTL check is configured for BGP, the TTL check function takes effect for the shared session. If the BFD TTL check fails, the BFD session may flap, causing all protocol sessions to flap.
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vrf2 [*HUAWEI-vpn-instance-vrf2] route-distinguisher 1:1 [*HUAWEI-vpn-instance-vrf2-af-ipv4] quit [*HUAWEI-vpn-instance-vrf2] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vrf2 [*HUAWEI-bgp-vrf2] peer 192.168.1.1 as-number 200 [*HUAWEI-bgp-vrf2] peer 192.168.1.1 bfd valid-ttl-hops 10