To associate VRF with BGP peering, use the following sample configuration:
config
router bgp bgp_name
interface interface_name
vrf vrf_name
end
NOTES:
Configuration Example
The following is an example of BGP peering configuration with no VRF association:
interface enp94s0f0.3921
bondingInterface enp216s0f0
bondingInterface enp94s0f0
neighbor 209.165.202.254 remote-as 65141 fail-over bfd
exit
interface enp94s0f1.3922
bondingInterface enp216s0f1
bondingInterface enp94s0f1
neighbor 209.165.202.254 remote-as 65141 fail-over bfd
exit
The following is an example of BGP Peering configuration with association with papn_vrf_1.
interface enp94s0f0.3923 leaf1
vrf papn_vrf_1
bondingInterface enp216s0f0
bondingInterface enp94s0f0
neighbor 209.165.202.254 remote-as 65141 fail-over bfd
exit
interface enp94s0f1.3924 leaf2
vrf papn_vrf_1
bondingInterface enp216s0f1
bondingInterface enp94s0f1
neighbor 209.165.202.254 remote-as 65141 fail-over bfd
exit
The following is an example of BGP Peering configuration with association with papn_vrf_2.
interface enp94s0f0.3925
vrf papn_vrf_2
bondingInterface enp216s0f0
bondingInterface enp94s0f0
neighbor 209.165.202.254 remote-as 65141 fail-over bfd
exit
interface enp94s0f1.3926
vrf papn_vrf_2
bondingInterface enp216s0f1
bondingInterface enp94s0f1
neighbor 209.165.202.254 remote-as 65141 fail-over bfd
exit
Verifying VRF Configuration for BGP Peering
This section describes how to verify VRF configuration for BGP peering
To view the VRF information, use the show vrf-info command.
Following is a sample output of the show vrf-info command.
GATEWAY TABLE
NAME GATEWAY IPV6 DEVICE LINK DEVICE ID STATE POD NAME
----------------------------------------------------------------------------------------------------------------------------------------------------------
npapn-vrf22 102.1.16.174 bd2.npv22.766 2527 true bgpspeaker-pod-0
npapn-vrf78 102.1.18.142 bd2.npv78.822 2588 true bgpspeaker-pod-0
npapn-vrf96 102.1.19.46 bd2.npv96.840 2608 true bgpspeaker-pod-0
npapn-vrf10 102.1.16.78 bd2.npv10.754 2502 true bgpspeaker-pod-0
npapn-vrf47 102.1.17.134 bd2.npv47.791 2554 true bgpspeaker-pod-0
npapn-vrf53 102.1.17.182 bd2.npv53.797 2561 true bgpspeaker-pod-0
npapn-vrf69 102.1.18.70 bd2.npv69.813 2578 true bgpspeaker-pod-0
To view the VRF route information, use the show vrf-route-info command.
Following is a sample output of the show vrf-route-info command.
-----bgpspeaker-pod-0 ----
Vrf TableId Route
npapn-vrf109 2512 default via 102.1.19.150 dev bd2.npv109.853 proto 217 metric 217
npapn-vrf109 2512 broadcast 102.1.19.144 dev bd2.npv109.853 proto kernel scope link src 102.1.19.147
npapn-vrf109 2512 102.1.19.144/29 dev bd2.npv109.853 proto kernel scope link src 102.1.19.147
npapn-vrf109 2512 local 102.1.19.147 dev bd2.npv109.853 proto kernel scope host src 102.1.19.147
npapn-vrf109 2512 broadcast 102.1.19.151 dev bd2.npv109.853 proto kernel scope link src 102.1.19.147
npapn-vrf109 2512 anycast fe80:: dev bd2.npv109.853 proto kernel
npapn-vrf109 2512 local fe80::42a6:b7ff:fe48:5520 dev bd2.npv109.853 proto kernel
npapn-vrf109 2512 fe80::/64 dev bd2.npv109.853 proto kernel metric 256
npapn-vrf109 2512 ff00::/8 dev bd2.npv109.853 proto 3 metric 256
Vrf TableId Route
npapn-vrf82 2593 default via 102.1.18.174 dev bd2.npv82.826 proto 217 metric 217
npapn-vrf82 2593 broadcast 102.1.18.168 dev bd2.npv82.826 proto kernel scope link src 102.1.18.171
npapn-vrf82 2593 102.1.18.168/29 dev bd2.npv82.826 proto kernel scope link src 102.1.18.171
npapn-vrf82 2593 local 102.1.18.171 dev bd2.npv82.826 proto kernel scope host src 102.1.18.171
npapn-vrf82 2593 broadcast 102.1.18.175 dev bd2.npv82.826 proto kernel scope link src 102.1.18.171
npapn-vrf82 2593 anycast fe80:: dev bd2.npv82.826 proto kernel
npapn-vrf82 2593 local fe80::42a6:b7ff:fe48:5520 dev bd2.npv82.826 proto kernel
npapn-vrf82 2593 fe80::/64 dev bd2.npv82.826 proto kernel metric 256
npapn-vrf82 2593 ff00::/8 dev bd2.npv82.826 proto 3 metric 256
-----bgpspeaker-pod-1 ----
Vrf TableId Route
npapn-vrf109 2512 default via 102.1.19.150 dev bd2.npv109.853 proto 217 metric 217
npapn-vrf109 2512 broadcast 102.1.19.144 dev bd2.npv109.853 proto kernel scope link src 102.1.19.147
npapn-vrf109 2512 102.1.19.144/29 dev bd2.npv109.853 proto kernel scope link src 102.1.19.147
npapn-vrf109 2512 local 102.1.19.147 dev bd2.npv109.853 proto kernel scope host src 102.1.19.147
npapn-vrf109 2512 broadcast 102.1.19.151 dev bd2.npv109.853 proto kernel scope link src 102.1.19.147
npapn-vrf109 2512 anycast fe80:: dev bd2.npv109.853 proto kernel
npapn-vrf109 2512 local fe80::42a6:b7ff:fe48:5520 dev bd2.npv109.853 proto kernel
npapn-vrf109 2512 fe80::/64 dev bd2.npv109.853 proto kernel metric 256
npapn-vrf109 2512 ff00::/8 dev bd2.npv109.853 proto 3 metric 256
Vrf TableId Route
npapn-vrf82 2593 default via 102.1.18.174 dev bd2.npv82.826 proto 217 metric 217
npapn-vrf82 2593 broadcast 102.1.18.168 dev bd2.npv82.826 proto kernel scope link src 102.1.18.171
npapn-vrf82 2593 102.1.18.168/29 dev bd2.npv82.826 proto kernel scope link src 102.1.18.171
npapn-vrf82 2593 local 102.1.18.171 dev bd2.npv82.826 proto kernel scope host src 102.1.18.171
npapn-vrf82 2593 broadcast 102.1.18.175 dev bd2.npv82.826 proto kernel scope link src 102.1.18.171
npapn-vrf82 2593 anycast fe80:: dev bd2.npv82.826 proto kernel
npapn-vrf82 2593 local fe80::42a6:b7ff:fe48:5520 dev bd2.npv82.826 proto kernel
npapn-vrf82 2593 fe80::/64 dev bd2.npv82.826 proto kernel metric 256
npapn-vrf82 2593 ff00::/8 dev bd2.npv82.826 proto 3 metric 25