6 mins read

BGP – Inter-AS Option B

1. Intro

BGP Option B is an Inter-AS MPLS L3VPN method in which the ASBRs exchange VPNv4/VPNv6 routes directly using MP-eBGP. It provides better scalability than Option A because the ASBRs do not maintain per-customer VRFs.

Find next the our Test Topology :

Inter-AS Option B

Our aim is to advertise the 192.45.6.1/32 prefix all the way to R7.

2. Basic Config

The configuration is straightforward, we have BGP with address family inet-vpn unicast (AFI 1, SAFI 128). Additionally we need to activate mpls on the interface between R4 and R5.

We also need to remember that configuring Cust-A routing instance VRF on R4 and R5 is not needed.

3. BGP l3vpn table

Interesting to highlight that on R4 is receiving the prefix from R1, even if we don’t have any VRF configured on R4.

Typically, R4 should not have any prefix from R1 in the bgp.l3vpn table. By default, R4 will receive that prefix from R1, but it should discard it, because there is no matching Route Target import configured on R4 (no VRF configured on R4).

But, configuring an eBGP session with inet-vpn address family will override this behavior.

To demonstrate this, we will deactivate the Option B BGP session, and we will see the default in action, no more routes in the bgp.l3vpn table.

4. Next hop self

When we check the prefix on R7, we see that the next hop is Router 5. By default, when the prefix is passing from eBGP to iBGP it should not change the next hop. But in our case this happened automatically, without any configuration.

This is just something specific for inet-vpn address family. The next hop is changed automatically, and this helps the Option B forwarding plane to function correctly:

  • R7 to R5 is forwarded using whatever mpls protocol is configured on that MPLS domain (it can be LDP, RSVP or SR)
  • R5 to R4 is using the Service label for forwarding

But there is a problem, we can see this prefix in the Cust-RED table instead of Cust-A table. We will fix this in the next section.

5. Route Targets

Our prefix should end up in Cust-A table, but this is not happening because the Route Targets are not matching between the two MPLS domains.

Similar to what we did for BGP Option A, we will apply a routing policy that will delete community target:64512:456 and add the correct one target:64512:444.


External Resources:

Leave a Reply