Example: Intra-AS Option B IPv4 VPNs

You can use the show ip bgp vpn all field in-label and show ip bgp vpn all field out-label commands in the context of each VPN element to display the in label and out label associated with the route at that point. Suppose that CE 1 advertises a route to prefix 10.10.10.11/32 to its external BGP peer PE 1 (10.2.2.2) in VRF A. PE 1 associates the label 16 with this route; an extended update message sent to internal MP-BGP peer ASBR 2 carries this information as a labeled VPN-IPv4 prefix (label 16, RD 100:0, IPv4 prefix 10.10.10.11/32).

host1:pe1#show ip bgp vpn all field in-label
Prefix             In-label 
10.10.10.11/32     16 

On PE 1, no out label is associated with the IPv4 prefix 10.10.10.11/32.

host1:pe1#show ip bgp vpn all field out-label 
Prefix             Out-label 
10.10.10.11/32     none     

ASBR 2 receives the labeled VPN-IPv4 prefix and generates a new label, 44, to associate with this VPN-IPv4 prefix instead of label 16 when it sends the prefix to ASBR 3.

host1:asbr2#show ip bgp vpn all field out-label
Prefix             Out-label 
10.10.10.11/32     16 
host1:asbr2#show ip bgp vpn all field in-label
Prefix             In-label 
10.10.10.11/32     44       

ASBR 2 receives MPLS frames with label 44 (the in label) from ASBR 3 and sends MPLS frames with label 16 (the out label) to PE 1.

The inter-AS next hop shows label 44 as the label advertised to inter-AS peer ASBR 3. Label 44 was generated for the indirect next hop PE router/label pair, 10.2.2.2 (PE 1) and 16. Indirect next hop 1.1.1.1 is for the MP-IBGP peering between PE 1 (loopback address 1.1.1.1) and ASBR 2. Indirect next hop 10.5.5.5 is ASBR 3.

host1:asbr2#show ip bgp vpn all next-hops
Indirect next-hop 1.1.1.1
  Resolution in IP route table of VR 
       IP indirect next-hop index 10
       Reachable (metric 3)
       Number of direct next-hops is 1
              Direct next-hop ATM6/1.20 (10.20.20.1)
  Resolution in IP tunnel-route table of VR 
       MPLS indirect next-hop index 29
       Reachable (metric 3)
       Number of direct next-hops is 1
              Direct next-hop: MPLS next-hop 23
  Reference count is 1
Indirect next-hop 10.5.5.5
   Resolution in IP route table of VR 
       IP indirect next-hop index 5
       Reachable (metric 0)
       Number of direct next-hops is 1
              Direct next-hop ATM6/0.21 (10.5.5.5)
  Resolution in IP tunnel-route table of VR 
       MPLS indirect next-hop index 14
       Reachable (metric 0)
       Number of direct next-hops is 1
              Direct next-hop ATM6/0.21.mpls
  Reference count is 3
host1:asbr2#show mpls next-hop 23
MPLS next-hop: 23, label 33 on ATM6/1.20, nbr 10.20.20.1
  Sent:
    0 packets
    0 bytes
    0 errors
    0 discards
host1:asbr2#show mpls next-hop 29
MPLS next-hop: 29, resolved by MPLS next-hop 23, peer 1.1.1.1
  MPLS next-hop: 23, label 33 on ATM6/1.20, nbr 10.20.20.1
  Statistics collection is disabled
host1:asbr2#show mpls forwarding brief
.... 
44       bgp      swap to 16, push 34 on ATM6/1.20, nbr 10.20.20.1 
host1:asbr2#show mpls forwarding label 44
In label: 44
  Label space: platform label space
  Owner: bgp
  Spoof check: router ASBR2
  Action: 
    MPLS next-hop: 30, label 43, resolved by MPLS next-hop 29
      MPLS next-hop: 29, resolved by MPLS next-hop 23, peer 1.1.1.1
        MPLS next-hop: 23, label 34 on ATM6/1.20, nbr 10.20.20.1
  Statistics:
    0 in pkts
    0 in Octets
    0 in errors
    0 in discard pkts

ASBR 3 in turn generates a new label, 50, to advertise with the VPN-IPv4 prefix to its internal MP-BGP peer inside its autonomous system, AS 35. Indirect next hop 4.4.4.4 is for the MP-IBGP peering between PE 4 (loopback address 4.4.4.4) and ASBR 3. Indirect next hop 10.5.5.50 is ASBR 2.

host1:asbr3#show ip bgp vpn all field out-label
Prefix             Out-label 
10.10.10.11/32     44 
host1:asbr3#show ip bgp vpn all field in-label
Prefix             In-label 
10.10.10.11/32     50        
host1:asbr3#show ip bgp vpn all next-hops
Indirect next-hop 4.4.4.4
  Resolution in IP route table of VR 
       IP indirect next-hop index 11
       Reachable (metric 3)
       Number of direct next-hops is 1
              Direct next-hop ATM4/0.33 (33.33.33.2)
  Resolution in IP tunnel-route table of VR 
       MPLS indirect next-hop index 28
       Reachable (metric 3)
       Number of direct next-hops is 1
              Direct next-hop: MPLS next-hop 22
  Reference count is 1
Indirect next-hop 10.5.5.50
  Resolution in IP route table of VR 
       IP indirect next-hop index 4
       Reachable (metric 0)
       Number of direct next-hops is 1
              Direct next-hop ATM6/1.21 (10.5.5.50)
  Resolution in IP tunnel-route table of VR 
       MPLS indirect next-hop index 11
       Reachable (metric 0)
       Number of direct next-hops is 1
              Direct next-hop ATM6/1.21.mpls
  Reference count is 3
host1:asbr3#show mpls forwarding brief
...
50       bgp      swap to 44,  on ATM6/1.21  

In turn, ASBR 3 receives MPLS frames with label 50 (the in label) from PE 4 and sends MPLS frames with label 44 (the out label) to ASBR 2.

PE 4 receives the VPN-IPv4 prefix with label 50:

host1:pe4#show ip bgp vpn all field out-label
Prefix             Out-label 
10.10.10.11/32     50        

On PE 4, no in label is associated with the IPv4 prefix 10.10.10.11/32.

host1:pe4#show ip bgp vpn all field in-label 
Prefix             In-label 
10.10.10.11/32     none     

The labels that are generated to be sent to the inter-AS BGP peers are generated for each next-hop PE router/received label tuple. Scaling is improved when all routes advertised from a given VRF have the same label; this is the default E Series router behavior. You can disable this behavior by issuing the ip mpls forwarding-mode label-switched command for the VRF.

Related Documentation