Hi, community
Today, Let's continue to explain OPTION B in inter-AS VPN. I'll try to make it easier to understand. If you have any good comments, please let me know.
Inter-AS VPN classification
OPTION B(single-hop EBGP): The ASBRs at both ends establish MP-EBGP peer relationships to transmit VPN routes.

Principles
As shown in the preceding figure, the difference between OPTION B and OPTION A lies in that the common routing protocol running between two ASBRs is replaced with MP-EBGP. As you can see, the topology of OPTION B and OPTION A is the same because inter-AS VPN uses different solutions in the same networking. OPTION B solves the problem that OPTION A occupies too many labels. However, OPTION B also has its disadvantages.
Route advertisement

Route advertisement is a unidirectional process. The route advertisement process is divided into three parts.
① Routes between CEs and PEs;
② Route advertisement between PEs and ASBRs;
③ Route advertisement between ASBRs.
Take the direction from CE-1 to CE-2 as an example.
Before routes are forwarded, devices in both ASs have distributed labels to neighbors using LDP. For example, PE-1 distributes label 100 to ASBR-1 through LDP, and ASBR-2 distributes label 200 to PE-2. Because the labels between ASBR-1 and ASBR-2 are carried through BGP, they do not need to run LDP.
1. When CE-1 searches for the route to the destination address of CE-2, it finds that the next hop is PE-1. The forwards the route to PE-1 based on the routing table.
2. After receiving the route, PE-1 adds an RD to the IPv4 route based on its VRF table and converts the IPv4 route to a VPNv4 route.
3. When forwarding routes to ASBR-1, PE-1 sends the MPLS label and RT value to ASBR-1 through a BGP Update packet.
4. After receiving the route from PE-1, ASBR advertises the route to ASBR-2 through MP-EBGP. In addition, the changes the next hop of the route to itself. Because EBGP runs between ASBR-1 and ASBR-2, ASBR-1 redistributes labels.
5. After receiving the route from ASBR-1, ASBR-2 advertises the route to PE-2 through MP-IBGP. When changing the next hop to itself, ASBR-2 also changes a new label.
6. After receiving the routes advertised by ASBR-2, PE-2 matches the RT value first. After the RT value matches the RT value, PE-2 removes the private network label. Converts VPNv4 routes to IPv4 routes and sends the routes to CE-2 based on the routing table.
Packet forwarding

1. CE-2 needs to forward the packet to the destination address 10.1.1.0 and forward the packet to PE-2 based on the routing table.
2. After receiving the packet from CE-2, PE-2 adds a VPN label to the IPv4 packet based on the VRF configured on the interface. Then, according to the next hop in the routing table, the tunnel ID is not 0. Then, the VPN label is encapsulated with a public network label, that is, the LDP label. The forwards the packet to ASBR-2.
3. After the packet reaches ASBR-2, the packet has only one private network label. The ASBR-S searches for the next hop based on the private network label, replace the private network label and forwards the private network label along the path. Because LDP is not running between ASBR-1 and ASBR-2, ASBR-2 does not encapsulate public network labels. Instead, ASBR-2 uses private network labels to forward packets.
4. After receiving the private label from ASBR-2, ASBR-1 searches for the next hop based on the forwarding table. After finding that the next hop is PE-1, it replaces the private network label and adds the public network label allocated by LDP to forward the packet.
5. After the packet is forwarded to PE-1, PE-1 receives only the packet with one private network label based on the penultimate hop popping principle. After receiving the packet, PE-1 searches for the destination address based on the VRF entry and removes the private network label.
6. PE-1 forwards the packet to CE-1 based on the public network routing table.
We’re looking forward to having you as a member!


