BFD with VRF Configuration
This chapter shows using BFD with user defined VRF for OSPFv2 and OSPFv3.
Topology
BFD user-defined VRF
RTR1
#configure terminal | Enter configure mode. |
(config)#ip vrf vrf10 | Create VRF instance with VRF10 and enter into VRF mode |
(config-vrf)#exit | Exit from VRF mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#interface xe53/1 | Enter interface mode |
(config-if)#ip vrf forwarding vrf10 | Enable VRF forwarding on interface |
(config-if)#ip address 11.11.11.0/31 | Assign IPv4 address in /31 mask. |
(config-if)#ipv6 address 1000::1/64 | Assign IPv6 address in /64 mask. |
(config-if)#ipv6 router ospf area 0 tag vrf10 | Tag OSPFv3 instance on interface with VRF10 for area 0 |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ospf 65535 vrf10 | Enter into OSPF VRF configuration mode |
(config-router)#router-id 1.1.1.1 | Assign router ID 1.1.1.1 for OSPF process 65535 |
(config-router)#bfd all-interfaces | Enable BFD for all-interface into OSPF |
(config-router)#network 11.11.11.0/31 area 0 | Enable routing for network 11.11.11.0/31 in area 0 |
(config-router)#exit | Exit from OSPF VRF configuration mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ipv6 vrf ospf vrf10 | Enter into IPv6 OSPF VRF configuration mode |
(config-router)#router-id 2.2.2.2 | Assign router-id 2.2.2.2 for IPv6 OSPF process |
(config-router)#bfd all-interfaces | Enable BFD for all-interface into OSPF |
(config-router)#exit | Exit from IPv6 OSPF VRF configuration mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
Switch
#configure terminal | Enter configure mode. |
(config)#bridge 32 protocol rstp vlan-bridge | Create a RSTP VLAN aware bridge with bridge-id 32 |
(config)#vlan 100 bridge 32 | Create VLAN 100 and map it to bridge 32 |
(config)#vlan 200 bridge 32 | Create VLAN 200 and map it to bridge 32 |
(config)#interface xe53/1 | Enter interface mode |
(config-if)#switchport | Make it port as L2 interface |
(config-if)#bridge-group 32 | Configure bridge group to l2 interface |
(config-if)#switchport mode trunk | Set the layer 2 interface as trunk interface |
(config-if)#switchport trunk allowed vlan all | Allow all VLAN to trunk interface |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#interface xe27 | Enter interface mode |
(config-if)#switchport | Make it port as L2 interface |
(config-if)#bridge-group 32 | Configure bridge group to l2 interface |
(config-if)#switchport mode trunk | Set the layer 2 interface as trunk interface |
(config-if)#switchport trunk allowed vlan all | Allow all VLAN to trunk interface |
(config-if)#exit | Exit interface mode. |
(config)#interface xe37 | Enter interface mode |
(config-if)#switchport | Make it port as L2 interface |
(config-if)#bridge-group 32 | Configure bridge group to l2 interface |
(config-if)#switchport mode trunk | Set the layer 2 interface as trunk interface |
(config-if)#switchport trunk allowed vlan all | Allow all VLAN to trunk interface |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#interface xe41 | Enter interface mode |
(config-if)#switchport | Make it port as L2 interface |
(config-if)# bridge-group 32 spanning-tree disable | Configure bridge group to l2 interface with spanning-tree disable |
(config-if)#switchport mode trunk | Allow all VLAN to trunk interface |
(config-if)#switchport trunk allowed vlan all | Map the VLAN 200 to access interface |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
RTR2
#configure terminal | Enter configure mode. |
(config)#ip vrf vrf10 | Create VRF instance with VRF10 and enter into vrf mode |
(config-vrf)#exit | Exit from VRF mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#interface xe9/1 | Enter interface mode |
(config-if)#ip vrf forwarding vrf10 | Enable VRF forwarding on interface |
(config-if)#ip address 11.11.11.1/31 | Assign IPv4 address in /31 mask. |
(config-if)#ipv6 address 1000::2/64 | Assign IPv6 address in /64 mask. |
(config-if)#ipv6 router ospf area 0 tag vrf10 | Tag OSPFv3 instance on interface with VRF10 for area 0 |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ospf 65535 vrf10 | Enter into OSPF VRF configuration mode |
(config-router)#router-id 3.3.3.3 | Assign router ID 3.3.3.3 for OSPF process 65535 |
(config-router)#bfd all-interfaces | Enable BFD for all-interface into OSPF |
(config-router)#network 11.11.11.0/31 area 0 | Enable routing for network 11.11.11.0/31 in area 0 |
(config-router)#exit | Exit from OSPF VRF configuration mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#router ipv6 vrf ospf vrf10 | Enter into IPv6 OSPF VRF configuration mode |
(config-router)#router-id 4.4.4.4 | Assign router-id 4.4.4.4 for IPv6 OSPF process |
(config-router)#bfd all-interfaces | Enable BFD for all-interface into OSPF |
(config-router)#exit | Exit from IPv6 OSPF VRF configuration mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
Validation
RTR1
#show ip ospf neighbor
Total number of full neighbors: 1
OSPF process 65535 VRF(vrf10):
Neighbor ID Pri State Dead Time Address Interface Instance ID
3.3.3.3 1 Full/Backup 00:00:32 11.11.11.1 xe15 0
#sh bfd session vrf vrf10
BFD process for VRF: vrf10
=====================================================================================
Sess-Idx Remote-Disc Lower-Layer Sess-Type Sess-State UP-Time Interface Down-Reason Remote-Addr
256 256 IPv6 Single-Hop Up 00:26:26 xe15 NA fe80::eac5:7aff:fe64:4a1d/128
1 1 IPv4 Single-Hop Up 00:19:05 xe15 NA 11.11.11.1/32
Number of Sessions: 2
#sh bfd session vrf vrf10 detail
BFD process for VRF: vrf10
====================================================================================
Session Interface Index : 10016 Interface name :xe15
Session Index : 256
Lower Layer : IPv6 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 256 Local Address : fe80::eac5:7aff:fe78:711d/128
Remote Discriminator : 256 Remote Address : fe80::eac5:7aff:fe64:4a1d/128
Local Port : 49153 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : n/a Pkt Out : n/a
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000007256 IPv6 Pkt Out : 00000000000000007256
UP Count : 1 UPTIME : 00:26:28
Protocol Client Info:
OSPF6-> Client ID: 5 Flags: 4
----------------------------------------------------------
Session Interface Index : 10016 Interface name :xe15
Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 11.11.11.0/32
Remote Discriminator : 1 Remote Address : 11.11.11.1/32
Local Port : 49154 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : n/a Pkt Out : n/a
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 1 UPTIME : 00:19:07
Protocol Client Info:
OSPF-> Client ID: 4 Flags: 4
----------------------------------------------------------
Number of Sessions: 2
RTR3
#sh ip ospf neighbor
Total number of full neighbors: 1
OSPF process 65535 VRF(vrf10):
Neighbor ID Pri State Dead Time Address Interface Instance ID
1.1.1.1 1 Full/DR 00:00:31 11.11.11.0 xe10 0
#sh ipv6 ospf neighbor
Total number of full neighbors: 1
OSPFv3 Process (vrf10)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/DR 00:00:28 xe10 0
#sh bfd session vrf vrf10
BFD process for VRF: vrf10
=====================================================================================
Sess-Idx Remote-Disc Lower-Layer Sess-Type Sess-State UP-Time Interface Down-Reason Remote-Addr
1 1 IPv4 Single-Hop Up 00:20:44 xe10 NA 11.11.11.0/32
256 256 IPv6 Single-Hop Up 00:28:05 xe10 NA fe80::eac5:7aff:fe78:711d/128
Number of Sessions: 2
#sh bfd session vrf vrf10 detail
BFD process for VRF: vrf10
====================================================================================
Session Interface Index : 10011 Interface name :xe10
Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 11.11.11.1/32
Remote Discriminator : 1 Remote Address : 11.11.11.0/32
Local Port : 49152 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : n/a Pkt Out : n/a
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 2 UPTIME : 00:20:46
Protocol Client Info:
OSPF-> Client ID: 4 Flags: 4
----------------------------------------------------------
Session Interface Index : 10011 Interface name :xe10
Session Index : 256
Lower Layer : IPv6 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 256 Local Address : fe80::eac5:7aff:fe64:4a1d/128
Remote Discriminator : 256 Remote Address : fe80::eac5:7aff:fe78:711d/128
Local Port : 49153 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : n/a Pkt Out : n/a
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000007707 IPv6 Pkt Out : 00000000000000007718
UP Count : 1 UPTIME : 00:28:07
Protocol Client Info:
OSPF6-> Client ID: 5 Flags: 4
----------------------------------------------------------
Number of Sessions: 2
BFD Over Static Routing IPv4 and IPv6
RTR1
#configure terminal | Enter configure mode. |
(config)#ip vrf vrf10 | Create VRF instance with VRF10 and enter into VRF mode |
(config-vrf)#exit | Exit from VRF mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#ip bfd vrf vrf10 static all-interfaces | Enable global IPv4 BFD config for user defined VRF interfaces |
(config)#ipv6 bfd vrf vrf10 static all-interfaces | Enable global IPv6 BFD config for user defined VRF interfaces |
(config)#interface xe53/1 | Enter interface mode |
(config-if)#ip vrf forwarding vrf10 | Enable VRF forwarding on interface |
(config-if)#ip address 11.11.11.0/31 | Assign IPv4 address in /31 mask. |
(config-if)#ipv6 address 1000::1/64 | Assign IPv6 address in /64 mask. |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#ip route vrf vrf10 200.200.200.200/32 11.11.11.1 xe53/1 | Create IPv4 VRF static route for static BFD session |
(config)#ipv6 route vrf vrf10 2000::/64 1000::2 xe53/1 | Create IPv6 VRF static route for static BFD session |
(config)#exit | Exit from configuration mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
RTR2
#configure terminal | Enter configure mode. |
(config)#ip vrf vrf10 | Create VRF instance with VRF10 and enter into VRF mode |
(config-vrf)#exit | Exit from VRF mode |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#ip bfd vrf vrf10 static all-interfaces | Enable global IPv4 BFD config for user defined VRF interfaces |
(config)#ipv6 bfd vrf vrf10 static all-interfaces | Enable global IPv6 BFD config for user defined VRF interfaces |
(config)#interface xe9/1 | Enter interface mode for xe9/1 |
(config-if)#ip vrf forwarding vrf10 | Enable VRF forwarding on interface |
(config-if)#ip address 11.11.11.1/31 | Assign IPv4 address in /31 mask. |
(config-if)#ipv6 address 1000::2/64 | Assign IPv6 address in /64 mask. |
(config-if)#exit | Exit interface mode. |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)# ip route vrf vrf10 100.100.100.100/32 11.11.11.0 xe9/1 | Create IPv4 VRF static route for static BFD session |
(config)# ipv6 route vrf vrf10 3000::2/64 1000::1 xe9/1 | Create IPv6 VRF static route for static BFD session |
(config)#commit | Commit the candidate configuration to the running configuration. |
(config)#exit | Exit from configuration mode |
Validation
RTR1
#show bfd session vrf vrf10
BFD process for VRF: vrf10 ========================================================================================
Sess-Idx Remote-Disc Lower-Layer Sess-Type Sess-State UP-Time Interface Down-Reason Remote-Addr
3 4 IPv4 Single-Hop Up 00:14:13 xe53/ 1 NA 11.11.11.1/32 4 5 IPv6 Single-Hop Up 00:13:24 xe53/ 1 NA 1000::2/128 Number of Sessions: 2
R1#show bfd session vrf vrf10 detail
BFD process for VRF: vrf10
=====================================================================================
Session Interface Index : 4 Interface name :xe53/1
Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 11.11.11.0/32
Remote Discriminator : 1 Remote Address : 11.11.11.1/32
Local Port : 49152 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000001184 Pkt Out : 00000000000000001184
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 1 UPTIME : 00:00:21
Protocol Client Info:
OSPF-> Client ID: 4 Flags: 4
----------------------------------------------------------
Session Interface Index : 4 Interface name :xe53/1
Session Index : 2
Lower Layer : IPv6 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 2 Local Address : fe80::5054:ff:fed0:e0c1/128
Remote Discriminator : 2 Remote Address : fe80::5054:ff:fe3d:af2b/128
Local Port : 49153 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000000 Pkt Out : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000001158 IPv6 Pkt Out : 00000000000000001163
UP Count : 1 UPTIME : 00:00:14
Protocol Client Info:
OSPF6-> Client ID: 5 Flags: 4
----------------------------------------------------------
Number of Sessions: 2
R1#show bfd
BFD ID: 00 Start Time:Tue Mar 19 13:31:08 2019
BFD Admin State: UP
Number of Sessions: 2
Slow Timer: 2000 Image type: MONOLITHIC
Echo Mode: Disabled BFD Notifications disabled
Next Session Discriminator: 3
RTR2
#show bfd session vrf vrf10
BFD process for VRF: vrf10 =====================================================================================
Sess-Idx Remote-Disc Lower-Layer Sess-Type Sess-State UP-Time Interface Down-Reason Remote-Addr
4 3 IPv4 Single-Hop Up 00:15:39 xe9/1 NA 11.11.11.0/32 5 4 IPv6 Single-Hop Up 00:14:50 xe9/1 NA 1000::1/128
Number of Sessions: 2
R2#show bfd session vrf vrf10 detail
BFD process for VRF: vrf10
=====================================================================================
Session Interface Index : 3 Interface name :xe9/1
Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 11.11.11.1/32
Remote Discriminator : 1 Remote Address : 11.11.11.0/32
Local Port : 49152 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000001661 Pkt Out : 00000000000000001665
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 1 UPTIME : 00:00:53
Protocol Client Info:
OSPF-> Client ID: 4 Flags: 4
----------------------------------------------------------
Session Interface Index : 3 Interface name :xe9/1
Session Index : 2
Lower Layer : IPv6 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 2 Local Address : fe80::5054:ff:fe3d:af2b/128
Remote Discriminator : 2 Remote Address : fe80::5054:ff:fed0:e0c1/128
Local Port : 49153 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000000 Pkt Out : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000001642 IPv6 Pkt Out : 00000000000000001636
UP Count : 1 UPTIME : 00:00:56
Protocol Client Info:
OSPF6-> Client ID: 5 Flags: 4
----------------------------------------------------------
Number of Sessions: 2