BFD Monitoring
Bidirectional Forwarding Detection (BFD) protocol is used for Faster Network Failure Detection along with BGP. Whenever connectivity between BGP peering fails with cluster (NF), failover is triggered to minimize traffic failure impact.
config
router bgp as
bfd interval interval min_rx min_rx multiplier multiplier
loopbackPort loopbackPort loopbackBFDPort loopbackBFDPort
interface interface_id
(BGP on non-bonded interface <-- loopbackEth)
bondingInterface bondingInterface
(leaf6-nic)
bondingInterface bondingInterface
(leaf6-nic)
neighbor neighbor_ip_address remote-as remote_as fail-over fail_over_type
exit
interface interface_id
(BGP on non-bonded interface <-- loopbackEth)
bondingInterface bondingInterface
(leaf7-nic)
bondingInterface bondingInterface
(leaf7-nic)
neighbor bondingInterface remote-as remote_as fail-over fail_over_type
exit
policy-name policy_name
as-path-set as_path_set
gateWay gateWay_address
interface interface_id_source
ip-prefix ip_prefix_value
isStaticRoute false | true
mask-range mask_range
modifySourceIp false | true
exit
exit
NOTES:
-
bgp as —Specify the Autonomous System (AS) path set.
-
bfd —Specify BFD configuration.
-
interval interval —Specify BFD interval in milliseconds.
-
min_rx min_rx —Specify BFD minimum RX in milliseconds.
-
multiplier multiplier —Specify BFD interval multiplier.
-
-
interface interface_id —Specify BGP local interface.
-
bondingInterface bondingInterface —Specify linked bonding interface.
-
neighbor neighbor_ip_address —Specify IP address of neighbor.
-
fail-over fail_over_type —Specify failover type.
-
remote-as remote_as —Specify Autonomous System (AS) number of BGP neighbor.
-
-
-
learnDefaultRoute —Learn default route and add it in kernel space
-
loopbackBFDPort loopbackBFDPort —Specify BFD local port.
-
loopbackPort loopbackPort —Specify BGP local port.
-
policy-name policy_name —Specify policy name.
-
as-path-set as_path_set —Specify Autonomous System (AS) path set.
-
gateWay gateWay_address —Specify gateway address.
-
interface interface_id_source —Specify interface to set as source IP.
-
ip-prefix ip_prefix_value —Specify IP prefix value.
-
isStaticRoute false | true —Specify whether to add static route in kernel space. Default value is false.
-
mask-range mask_range —Specify mask range.
-
modifySourceIp false | true —Modify source IP of the incoming route. Default value is false.
true: This option is used for non-UDP related VIPs. Source IP of the given interface is used as Source IP while sending out packets from cnSGW-CSMF.
false: This option is used for all UDP related VIPs. VIP is used as Source IP while sending out packets from cnSGW-CSMF.
-
Example
Following are configuration examples:
router bgp 65000
bfd interval 250000 min_rx 250000 multiplier 3
loopbackPort 179 loopbackBFDPort 3784
interface ens160 (BGP on non-bonded interface <-- loopbackEth)
bondingInterface enp216s0f0 (leaf6-nic)
bondingInterface enp216s0f1 (leaf6-nic)
neighbor leaf6-ip remote-as 60000 fail-over bfd
exit
interface ens192 (BGP on non-bonded interface <-- loopbackEth)
bondingInterface enp94s0f1 (leaf7-nic)
bondingInterface enp94s0f0 (leaf7-nic)
neighbor leaf7-ip remote-as 60000 fail-over bfd
exit
policy-name allow-all ip-prefix 209.165.201.30/0 mask-range 0...32
exit
BGP router configuration with BFD
show running-config router
router bgp 65142
learnDefaultRoute false
bfd interval 250000 min_rx 250000 multiplier 3
interface enp94s0f0.3921
bondingInterface enp216s0f0
bondingInterface enp94s0f0
neighbor 209.165.201.24 remote-as 65141 fail-over bfd
exit
interface enp94s0f1.3922
bondingInterface enp216s0f1
bondingInterface enp94s0f1
neighbor 209.165.202.24 remote-as 65141 fail-over bfd
Show BFD status of neighbor
show bfd-neigbor
status-details
----- bgpspeaker-pod-1----
Peer Status
209.165.202.142 STATE_DOWN
----- bgpspeaker-pod-2----
Peer Status
209.165.202.142 STATE_UP
policy-name allow-n11 ip-prefix 209.165.200.225/54 mask-range 25..32 interface bd1.n11.2271 modifySourceIp true isStaticRoute true gateWay 209.165.201.14
In the above example, modifySourceIp is set to true.
-
AMF subnet: 209.165.200.225/54
N11 Svc Bonded Physical Interface: bd1.n11.2271 (IP address - 209.165.201.23)
N11 Svc Bonded VxLAN Anycast GW: 209.165.201.14
N11 VIP Address: 209.165.201.7
-
cnSGW-CSMF Outbound Packet (will have source IP as 209.165.201.23)
Inbound Packet to cnSGW-CSMF (will have destination IP as 209.165.201.7)
policy-name allow-n4-1 ip-prefix 209.165.201.17/41 mask-range 24..32 interface bd2.n4.2274 gateWay 209.165.201.17
In the above example, modifySourceIp is set to false (default).
-
UPF N4 Interface IP: 209.165.201.17/41
N4 Svc Bonded Physical Interface: bd2.n4.2274 (IP address - 209.165.201.23)
N4 Svc Bonded VxLAN Anycast GW: 209.165.201.17
N4 VIP Address: 209.165.201.14
-
cnSGW-CSMF Outbound Packet (will have source IP as 209.165.201.14)
Inbound Packet to cnSGW-CSMF (will have destination IP as 209.165.201.14)