Inter-AS MPLS VPN Option-C.2 over Segment Routing (SR-MPLS): BGP-LU & 3-Label Forwarding Deep Dive

With Segment Routing (SR-MPLS) rapidly replacing legacy LDP in modern service provider backbones, inter-domain MPLS VPN deployments need a clean way to bridge two pure-SR autonomous systems. In this hands-on lab guide, we build an Inter-AS MPLS L3VPN Option-C.2 network over a pure IS-IS SR underlay—with zero LDP anywhere in the topology.

Since classic LDP-based Option-C tutorials are widely available, this walkthrough focuses on what actually changes with Segment Routing: how the three-label stack (SR Node-SID + BGP-LU + VPNv4 service label) is signaled across the AS boundary and forwarded hop by hop.

Lab Topology & Inter-AS Architecture

Inter-AS MPLS VPN Option-C.2 topology over pure IS-IS Segment Routing (AS 65000 and AS 65001) with ASBR BGP-LU and multihop eBGP VPNv4 between Route Reflectors
Figure 1: Inter-AS Option-C.2 lab topology spanning AS 65000 and AS 65001 over pure IS-IS SR-MPLS underlays.

In this topology, AS 65000 and AS 65001 are two independent autonomous systems, with R3/R5 and R6/R8 acting as their respective ASBRs. Both domains run pure IS-IS Segment Routing (SR-MPLS) as the transport underlay—no LDP is configured on any router.

On the control plane, R1 and R10 act as PE routers peering via iBGP VPNv4 with their local Route Reflectors (RR-AS65000 and RR-AS65001). The two RRs maintain a multihop eBGP VPNv4 session with next-hop-unchanged and apply an inbound Route Target (RT) extended-community rewrite so each domain’s PEs can import remote VPNv4 prefixes seamlessly.

If you want to compare this against a traditional LDP-based Option-C setup, refer to Cisco’s official reference: Configure Inter-AS Option C MPLS VPN With Cisco IOS and Cisco IOS-XR.

Why BGP Labeled-Unicast (BGP-LU) Is Mandatory in Pure SR Domains

In a traditional LDP network, an ASBR can redistribute remote PE loopbacks learned via BGP into the local IGP, and LDP automatically allocates transport labels for those redistributed prefixes. Segment Routing does not dynamically allocate labels for redistributed routes—SR labels derive strictly from configured SRGB ranges and Prefix-SID indices.

Therefore, we use BGP Labeled-Unicast (BGP-LU, RFC 8277) to advertise remote PE loopbacks along with an intermediate transport label across the ASBRs and into each domain (ASBR → RR → PE), ensuring end-to-end MPLS reachability for both remote PEs and Route Reflectors.

Pre-Configuration Verification (SR Label Table & Intra-AS VPNv4)

Before configuring the inter-AS control plane, verify the IS-IS Segment Routing label table and the intra-AS PE-to-RR VPNv4 session on the AS 65000 Route Reflector (Cisco IOS-XR):

RP/0/RP0/CPU0:XTC-PCE-AS65000#show isis segment-routing label table // Verify IS-IS Segment Routing label table
Wed Jun 30 13:05:24.264 UTC

IS-IS 1 IS Label Table
Label         Prefix                   Interface
----------    ----------------         ---------
16001         10.0.0.1/32
16002         10.0.0.2/32
16003         10.0.0.3/32
16004         10.0.0.4/32
16005         10.0.0.5/32
16101         10.0.1.1/32              Loopback0

RP/0/RP0/CPU0:XTC-PCE-AS65000#show bgp vpnv4 unicast summary // Verify RR-to-PE VPNv4 iBGP peering
{..snip..}
Neighbor        Spk    AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down  St/PfxRcd
10.0.0.1          0 65000     225     197        3    0    0 02:40:16          1

Step 1: Configure BGP Labeled-Unicast Between ASBRs

Next, configure BGP-LU on the ASBRs (shown below on R3; apply symmetric configuration to R5 as well as R6/R8 in AS 65001). Notice that the outbound route-map set-label selectively allocates an MPLS label for our local PE loopback (10.0.0.1/32) while advertising the RR loopback without unnecessary label allocation:

R3#show run | sec router bgp
router bgp 65000
 bgp router-id 10.0.0.3
 bgp log-neighbor-changes
 neighbor 10.0.1.1 remote-as 65000 // iBGP peering with local Route Reflector
 neighbor 10.0.1.1 update-source Loopback0
 neighbor 10.10.36.6 remote-as 65001 // eBGP peering with remote ASBR (R6)
 !
 address-family ipv4
  network 10.0.0.1 mask 255.255.255.255
  network 10.0.1.1 mask 255.255.255.255
  neighbor 10.0.1.1 activate
  neighbor 10.0.1.1 next-hop-self // Rewrite next-hop to self when advertising BGP-LU routes to RR
  neighbor 10.0.1.1 prefix-list foreign_prefixes out // Advertise only remote-AS prefixes to RR (optional hygiene)
  neighbor 10.0.1.1 send-label // Enable IPv4 labeled-unicast NLRI toward RR
  neighbor 10.10.36.6 activate
  neighbor 10.10.36.6 route-map set-label out // Allocate MPLS label specifically for local PE loopback
  neighbor 10.10.36.6 send-label // Enable IPv4 labeled-unicast NLRI toward peer ASBR
 exit-address-family

R3#show ip prefix-list
ip prefix-list foreign_prefixes: 2 entries
   seq 5 permit 10.0.0.10/32 // Match remote PE loopback
   seq 10 permit 10.0.1.2/32 // Match remote RR loopback
ip prefix-list set-label: 1 entries
   seq 5 permit 10.0.0.1/32 // Only local PE loopback requires an MPLS label across ASBRs

R3#show route-map set-label
route-map set-label, permit, sequence 100
  Match clauses:
    ip address prefix-lists: set-label
  Set clauses:
    mpls label // Allocate MPLS label for matched PE loopback
  Policy routing matches: 0 packets, 0 bytes
route-map set-label, permit, sequence 200
  Match clauses:
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes

Design Note on Route Reflection: The RR does not need to reflect BGP-LU routes from one ASBR back to another ASBR—only down to the PEs. Simply leave route-reflector-client disabled on the ASBR neighbors; by standard RFC 4456 rules, a Route Reflector never reflects routes between non-clients, while still reflecting non-client (ASBR) routes to client (PE) peers.

Step 2: Configure the IOS-XR Route Reflector & Multihop eBGP VPNv4

Once both domains exchange PE and RR loopback reachability via BGP-LU, establish the multihop eBGP VPNv4 session directly between RR-AS65000 and RR-AS65001, preserving the original PE next-hop and rewriting the inbound Route Target extended community:

// Route Reflector configuration in AS 65000 (IOS-XR)

RP/0/RP0/CPU0:XTC-PCE-AS65000#show run router bgp
Wed Jun 30 15:03:10.852 UTC
router bgp 65000
 bgp router-id 10.0.1.1
 address-family ipv4 unicast // Enable IPv4 unicast AF globally
 !
 address-family vpnv4 unicast // Enable VPNv4 unicast AF globally
 !
 neighbor 10.0.0.1
  remote-as 65000
  update-source Loopback0
  address-family ipv4 labeled-unicast // Advertise BGP-LU labels learned from ASBRs down to PE
   route-reflector-client // Reflect non-client (ASBR) BGP-LU paths to client (PE)
  !
  address-family vpnv4 unicast // Carry L3VPN VPNv4 prefixes to/from PE
   route-policy pass in // Optional for iBGP, kept explicit by convention
   route-reflector-client
   route-policy pass out
  !
 !
 neighbor 10.0.0.3
  remote-as 65000
  update-source Loopback0
  address-family ipv4 labeled-unicast // Receive BGP-LU prefixes from ASBR R3 (non-client)
  !
 !
 neighbor 10.0.0.5
  remote-as 65000
  update-source Loopback0
  address-family ipv4 labeled-unicast // Receive BGP-LU prefixes from ASBR R5 (non-client)
  !
 !
 neighbor 10.0.1.2 // Multihop eBGP VPNv4 peering with remote RR in AS 65001
  remote-as 65001
  ebgp-multihop 255 // Required because default eBGP TTL is 1
  update-source Loopback0
  address-family vpnv4 unicast
   route-policy rt_rewrite in // Rewrite inbound RT 65001:100 -> 65000:100 for local VRF import
   route-policy pass out // Mandatory explicit outbound policy on IOS-XR eBGP peers
   next-hop-unchanged // Preserve remote PE loopback (10.0.0.10) as BGP next-hop
  !
 !
!

RP/0/RP0/CPU0:XTC-PCE-AS65000# show rpl
Wed Jun 30 15:03:15.127 UTC
route-policy pass
  pass
end-policy
!
route-policy rt_rewrite
  if extcommunity rt matches-within (65001:100) then
    set extcommunity rt (65000:100)
    pass
  else
    pass
  endif
end-policy // Simple inter-AS Route Target translation policy
!

Step 3: Verify Recursive Label Resolution on PE R1

After mirroring the RR configuration in AS 65001, inspect the three-step recursive resolution on ingress PE R1—from VPNv4 service route → BGP-LU remote PE loopback → IS-IS SR local ASBR Node-SID:

R1# show bgp vpnv4 unicast vrf client 192.168.1.0/24 // 1. Inspect imported VPNv4 prefix
BGP routing table entry for 10.0.0.1:100:192.168.1.0/24, version 12
Paths: (1 available, best #1, table client)
  Flag: 0x100
  Not advertised to any peer
  Refresh Epoch 1
  65001, imported path from 10.0.0.10:100:192.168.1.0/24 (global)
    10.0.0.10 (metric 25) (via default) from 10.0.1.1 (10.0.1.1)
      Origin IGP, localpref 100, valid, internal, best
      Extended Community: RT:65000:100   // Rewritten RT from RR-AS65000
      mpls labels in/out nolabel/19   // Inner VPN service label = 19
      rx pathid: 0, tx pathid: 0x0
      Updated on Jun 30 2021 10:59:35 UTC

R1# show ip route 10.0.0.10 // 2. Resolve remote PE next-hop via BGP-LU
Routing entry for 10.0.0.10/32
  Known via "bgp 65000", distance 200, metric 25
  Tag 65001, type internal
  Last update from 10.0.0.5 04:24:48 ago
  Routing Descriptor Blocks:
  * 10.0.0.5, from 10.0.1.1, 04:24:48 ago // Next-hop is local ASBR R5
      opaque_ptr 0x7F5D8B19ED28
      Route metric is 25, traffic share count is 1
      AS Hops 1
      Route tag 65001
      MPLS label: 18 // Middle transport label learned via BGP-LU = 18

R1#show ip route 10.0.0.5 // 3. Resolve local ASBR via IS-IS Segment Routing
Routing entry for 10.0.0.5/32
  Known via "isis", distance 115, metric 25, type level-2
  Redistributing via isis 1
  Last update from 10.10.14.4 on GigabitEthernet6, 2d18h ago
 SR Incoming Label: 16005
  Routing Descriptor Blocks:
  * 10.10.14.4, from 10.0.0.5, 2d18h ago, via GigabitEthernet6, prefer-non-rib-labels, merge-labels
      Route metric is 25, traffic share count is 1
      MPLS label: 16005 // Outer SR Node-SID for R5 = 16005
      MPLS Flags: NSF

With all three label layers cleanly resolved in the RIB/LFIB, run a VRF traceroute from R1 to inspect the exact MPLS label stack on the wire:

R1#traceroute vrf client 192.168.1.2 source 192.168.0.1
Type escape sequence to abort.
Tracing the route to 192.168.1.2
VRF info: (vrf in name/id, vrf out name/id)
  1 10.10.14.4 [MPLS: Labels 16005/18/19 Exp 0] 20 msec 5 msec 6 msec
  2 10.10.45.5 [MPLS: Labels 18/19 Exp 0] 14 msec 4 msec 7 msec
  3 10.10.58.8 [MPLS: Labels 16010/19 Exp 0] 5 msec 4 msec 6 msec
  4 10.10.89.9 [MPLS: Labels 16010/19 Exp 0] 6 msec 5 msec 4 msec
  5 192.168.1.1 11 msec 3 msec 3 msec
  6 192.168.1.2 4 msec 4 msec 4 msec

Data-Plane Walkthrough: 3-Label Stack (16005 / 18 / 19)

Hop-by-hop SR-MPLS Option-C.2 3-label forwarding flow: R1 pushes 16005/18/19, R4 PHP pops 16005, ASBR R5 swaps 18 to 16010, R9 PHP pops 16010, and PE R10 pops VPN label 19
Figure 2: End-to-end 3-label stack push, penultimate hop popping (PHP), and inter-AS BGP-LU label swap from Client-A to Client-B.

1. Ingress Label Stack Construction on PE R1

  • Bottom (Service) Label — 19: Allocated by egress PE R10 via VPNv4 for prefix 192.168.1.0/24;
  • Middle (BGP-LU) Label — 18: Learned from RR-AS65000 (originally allocated by ASBR R5) to reach BGP next-hop 10.0.0.10/32;
  • Top (SR Transport) Label — 16005: IS-IS Segment Routing Node-SID for local ASBR R5 (10.0.0.5/32).

R1 therefore imposes the complete 3-label stack 16005 | 18 | 19 onto the IPv4 payload.

2. Hop-by-Hop Forwarding Across Both Autonomous Systems

  • AS 65000 Core (R1 → R4 → R5): Transit P router R4 switches on outer SR Node-SID 16005 and performs Penultimate Hop Popping (PHP), forwarding the packet with 18 | 19 to ASBR R5;
  • Inter-AS Boundary (ASBR R5 → R8): R5 looks up incoming BGP-LU label 18 in its LFIB, finds the next-hop is peer ASBR R8, and swaps 18 → 16010 (the AS 65001 Node-SID for R10 advertised over eBGP-LU), transmitting 16010 | 19 across the AS boundary;
  • AS 65001 Core (R8 → R9 → R10): R8 forwards on SR Node-SID 16010 toward R10, and penultimate hop R9 executes PHP to pop 16010 before delivering 19 to R10;
  • Egress PE (R10 → Client-B): R10 pops VPN service label 19, performs a VRF client IPv4/ARP lookup, and hands the native packet to Client-B.

End-to-End Verification from the Customer Edge (MTR)

Finally, confirm clean end-to-end connectivity with zero packet loss from Client-A to Client-B (192.168.1.2):

root@Client-A:~# mtr 192.168.1.2 --report -n
Start: 2021-06-30T16:17:10+0000
HOST: localhost                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 192.168.0.1                0.0%    10    0.9   1.2   0.5   5.5   1.5
  2.|-- 10.10.14.4                 0.0%    10    6.7  11.7   6.7  16.7   3.5
  3.|-- 10.10.45.5                 0.0%    10    6.8   7.6   4.5  16.8   3.6
  4.|-- 10.10.58.8                 0.0%    10    5.9   7.7   4.9  12.9   2.5
  5.|-- 10.10.89.9                 0.0%    10    3.9   7.1   3.6  12.3   2.9
  6.|-- 192.168.1.1                0.0%    10   10.4   9.0   4.6  13.0   3.0
  7.|-- 192.168.1.2                0.0%    10    6.2   6.0   3.6   9.7   2.1

Our pure SR-MPLS Inter-AS VPN Option-C.2 lab is up and verified end to end.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.