MPLS - Disabling IPv4 address family in BGP for VPNv4
When deploying MPLS in a Layer 3 VPN scenario, where VPNv4 is being used, by default the BGP configuration will enable the exchange of both VPNv4 routes as well as IPv4 unicast routes as well. There is no need to exchange IPv4 unicast routes, so such exchanges can be disabled.
This can be achieved by entering the IPv4 address-family configuration mode of the BGP configuration and disabling the BGP neighbor.
Take a look at the following MPLS topology:
PE1 and PE2 have been configured as iBGP peers. Let's say we want to disable the exchange of IPv4 unicast routes between PE1 and PE2. This can be achieved like so:
PE1(config)#router bgp 234 PE1(config-router)#address-family ipv4 PE1(config-router-af)#no neighbor 4.4.4.4 activate
PE2(config)#router bgp 234 PE2(config-router)#address-family ipv4 PE2(config-router-af)#no neighbor 2.2.2.2 activate
Note that in this case, the neighbor command has been removed only from the IPv4 address family. The neighbor command still exists in the main configuration section of the router bgp 234
configuration. Take a look at the full BGP configuration of PE1:
PE1#show run | section bgp router bgp 234 bgp log-neighbor-changes neighbor 4.4.4.4 remote-as 234 neighbor 4.4.4.4 update-source Loopback0 ! address-family ipv4 no neighbor 4.4.4.4 activate exit-address-family ! address-family vpnv4 neighbor 4.4.4.4 activate neighbor 4.4.4.4 send-community extended exit-address-family
With this BGP configuration, we will use IPv4 to establish the neighbor adjacency but we won’t exchange IPv4 prefixes. The only thing we will exchange are VPNv4 routes.
Links
https://forum.networklessons.com/t/mpls-layer-3-vpn-pe-ce-ospf/1291/78?u=lagapidis
https://networklessons.com/mpls/mpls-layer-3-vpn-configuration