Description

A single-hop BFD session in Junos OS runs in distributed mode by default. The exceptions are OSPFv3 BFD and PIMv6 BFD. They run in centralized mode.

In this article discusses another exception for IPv6 single-hop BFD.  If a user wants BFD for IPv6 static route to run in distributed mode, use global IPv6 address for next hop.

Solution

Suppose two routers enable IPv6 on a single Ethernet link.

One router has an interface configured as follows:

[edit]
falcon@smudger# show interfaces
ge-0/1/0 {
    unit 0 {
        family inet {
            address 192.168.1.1/24;
        }
        family inet6 {
            address abcd::1/64;
        }
    }
}


 
[edit]
falcon@smudger# run show interfaces ge-0/1/0.0 extensive | match "Protocol inet|Destination"
    Protocol inet, MTU: 1500
        Destination: 192.168.1/24, Local: 192.168.1.1, Broadcast: 192.168.1.255, Generation: 234
    Protocol inet6, MTU: 1500
        Destination: abcd::/64, Local: abcd::1
        Destination: fe80::/64, Local: fe80::224:dcff:fe9b:2052


While the other router has the following configuration:

[edit]
falcon@duke# show interfaces
ge-1/1/1 {
    unit 0 {
        family inet {
            address 192.168.1.2/24;
        }
        family inet6 {
            address abcd::2/64;
        }
    }
}

[edit]
falcon@duke# run show interfaces ge-1/1/1.0 extensive | match "Protocol inet|Destination"
    Protocol inet, MTU: 1500
        Destination: 192.168.1/24, Local: 192.168.1.2, Broadcast: 192.168.1.255, Generation: 239
    Protocol inet6, MTU: 1500
        Destination: abcd::/64, Local: abcd::2
        Destination: fe80::/64, Local: fe80::224:dcff:fe9b:19d
 

These two routers can see each other:

[edit]
falcon@duke# run show ipv6 neighbors
IPv6 Address                 Linklayer Address  State       Exp Rtr Secure Interface
abcd::2                      00:24:dc:9b:01:9d  stale       136 yes no      ge-0/1/0.0
fe80::224:dcff:fe9b:19d       00:24:dc:9b:01:9d  stale       151 yes no      ge-0/1/0.0

[edit]
falcon@smudger# run show ipv6 neighbors
IPv6 Address                 Linklayer Address  State       Exp Rtr Secure Interface
abcd::1                      00:24:dc:9b:20:52  stale       211 yes no      ge-1/1/1.0
fe80::224:dcff:fe9b:2052      00:24:dc:9b:20:52  stale       203 yes no      ge-1/1/1.0
 

If IPv6 static route has link-local address as next hop and BFD is configured for it:

[edit]
falcon@smudger# show routing-options
rib inet6.0 {
    static {
        route abc::1/128 {
            qualified-next-hop fe80::224:dcff:fe9b:19d {
                interface ge-0/1/0.0;
                bfd-liveness-detection {
                    minimum-interval 500;
                }
            }
        }
    }
}

[edit]
falcon@duke# show routing-options
rib inet6.0 {
    static {
        route def::1/128 {
            qualified-next-hop fe80::224:dcff:fe9b:2052 {
                interface ge-1/1/1.0;
                bfd-liveness-detection {
                    minimum-interval 500;
                }
            }
        }
    }
}


BFD for IPv6 static route is single-hop but it is running in centralized mode.

[edit]
falcon@smudger# run show ppm adjacencies protocol bfd detail

Protocol: BFD, Hold time: 1500, IFL-index: 321
Distributed: FALSE
BFD discriminator: 21 , BFD routing table index: 0
HadExpired: FALSE, Expired-Count: 0, Largest-Interval: 506, Last Rx Interval: 426, Num Packets: 73, Absorbed Packets: 67, Rx Packet: 20 C0 03 18 00 00 00 23 00 00 00 15 00 07 A1 20 00 07 A1 20 00 00 00 00

Adjacencies: 1, Remote adjacencies: 0


[edit]
falcon@smudger# run show bfd session extensive
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
fe80::224:dcff:fe9b:19d   Up        ge-0/1/0.0     1.500     0.500        3
 Client Static, TX interval 0.500, RX interval 0.500
 Session up time 00:01:29
 Local diagnostic None, remote diagnostic None
 Remote state Up, version 1
 Session type: Single hop BFD
 Min async interval 0.500, min slow interval 1.000
 Adaptive async TX interval 0.500, RX interval 0.500
 Local min TX interval 0.500, minimum RX interval 0.500, multiplier 3
 Remote min TX interval 0.500, min RX interval 0.500, multiplier 3
  Local discriminator 21 , remote discriminator 35
 Echo mode disabled/inactive Session ID: 0x18e

1 sessions, 1 clients
Cumulative transmit rate 2.0 pps, cumulative receive rate 2.0 pps


 

If you want BFD for IPv6 static route to run in distributed mode, use global IPv6 address for next hop.

[edit]
falcon@smudger# show routing-options
rib inet6.0 {
    static {
        route abc::1/128 {
            next-hop abcd::2 ;
            bfd-liveness-detection {
                minimum-interval 500;
            }
        }
    }
}


[edit]
falcon@smudger# run show ppm adjacencies protocol bfd detail

Protocol: BFD, Hold time: 1500, IFL-index: 321
Distributed: TRUE
BFD discriminator: 22 , BFD routing table index: 0
Num Packets: 4, Absorbed Packets: 0, Rx Packet: 20 C8 03 18 00 00 00 24 00 00 00 16 00 07 A1 20 00 07 A1 20 00 00 00 00
Distribution handle: 109, Distribution address: fpc0

Adjacencies: 1, Remote adjacencies: 1

[edit]
falcon@smudger# run show bfd session extensive
                                                  Detect   Transmit
Address                  State     Interface      Time     Interval  Multiplier
abcd::2                  Up        ge-0/1/0.0     1.500     0.500        3
  Client Static , TX interval 0.500, RX interval 0.500
 Session up time 00:00:24
 Local diagnostic None, remote diagnostic None
 Remote state Up, version 1
 Session type: Single hop BFD
 Min async interval 0.500, min slow interval 1.000
 Adaptive async TX interval 0.500, RX interval 0.500
 Local min TX interval 0.500, minimum RX interval 0.500, multiplier 3
 Remote min TX interval 0.500, min RX interval 0.500, multiplier 3
  Local discriminator 22 , remote discriminator 36
 Echo mode disabled/inactive
 Remote is control-plane independent
  Session ID: 0x18f

1 sessions, 1 clients
Cumulative transmit rate 2.0 pps, cumulative receive rate 2.0 pps