Inter-AS Option A connects an L3VPN across two providers by making each provider’s ASBR a PE that treats the other ASBR as a CE. For each customer, each ASBR has a VRF, with an interface and an eBGP session to the other ASBR in that VRF. Routes and packets cross between the ASBRs as plain IP. This allows each provider to keep its own RDs and RTs.
CustC has three sites in AS 64530: Core1 behind A-PE2 in SP-A, and Core2 and Core3 behind B-PE1 and B-PE2 in SP-B. In the L3VPN post, Core1’s BGP sessions to A-PE2 came up with 0 prefixes received, since I didn’t have an interconnect between the two providers. In this stage, A-ASBR and B-ASBR get a CustC VRF and run the first BGP sessions between SP-A and SP-B. At the end of the stage, Core1’s traceroute to Core2’s loopback looks as below:
CustC-Core1#traceroute 10.30.0.2 source lo0 probe 1
Type escape sequence to abort.
Tracing the route to 10.30.0.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.12.1 2 msec
2 10.1.1.33 [MPLS: Labels 1407/1815 Exp 0] 3 msec
3 10.255.0.5 [MPLS: Label 1815 Exp 0] 4 msec
4 10.255.0.6 3 msec
5 10.2.1.41 [MPLS: Labels 16500/24013 Exp 0] 27 msec
6 10.2.1.2 [MPLS: Labels 16500/24013 Exp 0] 6 msec
7 10.2.1.26 [MPLS: Label 24013 Exp 0] 53 msec
8 10.2.12.2 15 msec
Topology file: topology.clab.yml · Addressing: ipam.md · Stage configs, 2 nodes (A-ASBR, B-ASBR): stage_configs/lab03-s3-interas-opta/
The VRF on Each ASBR
A-ASBR’s VRF CustC uses the same scheme as the CustC PEs in SP-A: the RD is the router’s Loopback0 address followed by :30, and the RT is the AS number followed by :30:
vrf definition CustC
rd 10.1.0.8:30
address-family ipv4
route-target export 64501:30
route-target import 64501:30
exit-address-family
address-family ipv6
route-target export 64501:30
route-target import 64501:30
exit-address-family
B-ASBR’s VRF has the RD 10.2.0.8:30 and SP-B’s RT, 64502:30. With these RTs, each ASBR imports its own provider’s CustC routes from the route reflector. A-ASBR has Core1’s loopback from A-RR, 10.1.0.7:
A-ASBR#show bgp vpnv4 unicast vrf CustC 10.30.0.1/32
BGP routing table entry for 10.1.0.8:30:10.30.0.1/32, version 7
Paths: (1 available, best #1, table CustC)
Advertised to update-groups:
2
Refresh Epoch 1
64530, imported path from 10.1.0.6:30:10.30.0.1/32 (global)
10.1.0.6 (metric 3) (via default) from 10.1.0.7 (10.1.0.7)
Origin IGP, metric 0, localpref 100, valid, internal, best
Extended Community: RT:64501:30
Originator: 10.1.0.6, Cluster list: 10.1.0.7
mpls labels in/out nolabel/1616
rx pathid: 0, tx pathid: 0x0
The Link Between the ASBRs
On both ASBRs, Gi4 is the interface to the other ASBR. CustC uses a dot1Q sub-interface on it, Gi4.30, in VRF CustC:
interface GigabitEthernet4
description to B-ASBR (Inter-AS)
no ip address
negotiation auto
cdp enable
no mop enabled
no mop sysid
service instance 4094 ethernet
encapsulation dot1q 4094
!
!
interface GigabitEthernet4.30
encapsulation dot1Q 30
vrf forwarding CustC
ip address 10.255.0.5 255.255.255.252
ipv6 address 2001:DB8:FF:30::1/64
B-ASBR has a similar configuration, with 10.255.0.6 and 2001:DB8:FF:30::2 on Gi4.30.
The CSR1000v routers in my lab run as virtual machines, and Gi4 is a virtio virtual NIC, as A-ASBR shows below:
A-ASBR#show platform software vnic-if interface-mapping
-------------------------------------------------------------
Interface Name Driver Name Mac Addr
-------------------------------------------------------------
GigabitEthernet4 net_virtio 0c00.14d7.7903
GigabitEthernet3 net_virtio 0c00.81c9.1302
GigabitEthernet2 net_virtio 0c00.50ef.e701
GigabitEthernet1 net_virtio c000.0100.cafe
-------------------------------------------------------------
The virtual NIC drops a tagged frame unless the router has registered that VLAN with it, or has put the NIC into promiscuous mode. Without this, traffic from sub-interface Gi4.30 will never reach the other side of the link.
An EVC service instance on Gi4 makes IOS-XE switch the virtual NIC into promiscuous mode, and Gi4.30 then receives its frames. VLAN 4094 configured under the service instance carries no traffic in the lab. Basically, any unused VLAN would work in this case.
eBGP Between the ASBRs
The eBGP sessions are in the VRF address families, one for IPv4 and one for IPv6:
router bgp 64501
address-family ipv4 vrf CustC
neighbor 10.255.0.6 remote-as 64502
neighbor 10.255.0.6 activate
exit-address-family
address-family ipv6 vrf CustC
neighbor 2001:DB8:FF:30::2 remote-as 64502
neighbor 2001:DB8:FF:30::2 activate
exit-address-family
The full files are A-ASBR.ios and B-ASBR.ios.
B-ASBR peers with 10.255.0.5 and 2001:DB8:FF:30::1 in AS 64501. On A-ASBR, both sessions have 2 prefixes received, Core2’s and Core3’s loopbacks:
A-ASBR#show bgp vpnv4 unicast vrf CustC sum
BGP router identifier 10.1.0.8, local AS number 64501
BGP table version is 11, main routing table version 11
3 network entries using 768 bytes of memory
3 path entries using 408 bytes of memory
11/8 BGP path/bestpath attribute entries using 3256 bytes of memory
2 BGP rrinfo entries using 80 bytes of memory
3 BGP AS-PATH entries using 88 bytes of memory
9 BGP extended community entries using 504 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 5104 total bytes of memory
BGP activity 16/0 prefixes, 16/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.255.0.6 4 64502 581 584 11 0 0 08:48:18 2
A-ASBR#show bgp vpnv6 unicast vrf CustC sum
BGP router identifier 10.1.0.8, local AS number 64501
BGP table version is 7, main routing table version 7
3 network entries using 840 bytes of memory
3 path entries using 468 bytes of memory
6/4 BGP path/bestpath attribute entries using 1776 bytes of memory
2 BGP rrinfo entries using 80 bytes of memory
3 BGP AS-PATH entries using 88 bytes of memory
9 BGP extended community entries using 504 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 3756 total bytes of memory
BGP activity 16/0 prefixes, 16/0 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:DB8:FF:30::2
4 64502 5 5 7 0 0 00:00:13 2
Core2’s Route into SP-A
A-ASBR exports Core2’s loopback, learned from B-ASBR, into SP-A with its own RD, 10.1.0.8:30, and SP-A’s RT, 64501:30:
A-ASBR#show bgp vpnv4 unicast vrf CustC 10.30.0.2/32
BGP routing table entry for 10.1.0.8:30:10.30.0.2/32, version 9
Paths: (1 available, best #1, table CustC)
Advertised to update-groups:
3
Refresh Epoch 1
64502 64530
10.255.0.6 (via vrf CustC) from 10.255.0.6 (10.2.0.8)
Origin IGP, localpref 100, valid, external, best
Extended Community: RT:64501:30
mpls labels in/out 1815/nolabel
rx pathid: 0, tx pathid: 0x0
mpls labels in/out 1815/nolabel: A-ASBR allocates label 1815 for the route, and the route has no outgoing label, since B-ASBR advertises it without a label. A-PE2 imports the route from 10.1.0.8:30, with next hop 10.1.0.8 and label 1815:
A-PE2#show bgp vpnv4 unicast vrf CustC 10.30.0.2/32
BGP routing table entry for 10.1.0.6:30:10.30.0.2/32, version 12
Paths: (1 available, best #1, table CustC)
Advertised to update-groups:
1
Refresh Epoch 1
64502 64530, imported path from 10.1.0.8:30:10.30.0.2/32 (global)
10.1.0.8 (metric 3) (via default) from 10.1.0.7 (10.1.0.7)
Origin IGP, metric 0, localpref 100, valid, internal, best
Extended Community: RT:64501:30
Originator: 10.1.0.8, Cluster list: 10.1.0.7
mpls labels in/out nolabel/1815
rx pathid: 0, tx pathid: 0x0
BGP as-override on A-PE2
A-PE2’s routes for Core2’s and Core3’s loopbacks have the AS path 64502 64530, and Core1, in AS 64530, rejects a route whose AS path contains its own AS. A-PE2 has as-override on both Core1 neighbours, configured in the L3VPN stage: it replaces 64530 with 64501 in the routes A-PE2 sends to Core1. Core1’s IPv4 and IPv6 BGP tables have Core2’s and Core3’s loopbacks with the AS path 64501 64502 64501:
CustC-Core1#show bgp ipv4 unicast
BGP table version is 4, local router ID is 10.30.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 10.30.0.1/32 0.0.0.0 0 32768 i
*> 10.30.0.2/32 10.1.12.1 0 64501 64502 64501 i
*> 10.30.0.3/32 10.1.12.1 0 64501 64502 64501 i
CustC-Core1#show bgp ipv6 unicast
BGP table version is 5, local router ID is 10.30.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 2001:DB8:30::1/128
:: 0 32768 i
*> 2001:DB8:30::2/128
2001:DB8:1:24::1
0 64501 64502 64501 i
*> 2001:DB8:30::3/128
2001:DB8:1:24::1
0 64501 64502 64501 i
A-PE2’s advertised-routes still shows the path before the override, 64502 64530:
A-PE2#show bgp vpnv4 unicast vrf CustC neigh 10.1.12.2 advertised-routes
BGP table version is 16, local router ID is 10.1.0.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
t secondary path, L long-lived-stale,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 10.1.0.6:30 (default for vrf CustC)
*>i 10.30.0.2/32 10.1.0.8 0 100 0 64502 64530 i
*>i 10.30.0.3/32 10.1.0.8 0 100 0 64502 64530 i
Total number of prefixes 2
The Other Direction
B-ASBR exports Core1’s loopback into SP-B with RT 64502:30, and B-PE1 imports it from B-RR with label 18:
RP/0/RP0/CPU0:B-PE1#show bgp vpnv4 unicast vrf CustC 10.30.0.1/32
Thu Jul 16 13:48:57.113 UTC
BGP routing table entry for 10.30.0.1/32, Route Distinguisher: 10.2.0.5:30
Versions:
Process bRIB/RIB SendTblVer
Speaker 24 24
Last Modified: Jul 16 05:44:34.182 for 08:04:23
Paths: (1 available, best #1)
Not advertised to any peer
Path #1: Received by speaker 0
Not advertised to any peer
64501 64530
10.2.0.8 (metric 30) from 10.2.0.7 (10.2.0.8)
Received Label 18
Origin IGP, metric 0, localpref 100, valid, internal, best, group-best, import-candidate, imported
Received Path ID 0, Local Path ID 1, version 24
Extended community: RT:64502:30
Originator: 10.2.0.8, Cluster list: 10.2.0.7
Source AFI: VPNv4 Unicast, Source VRF: default, Source Route Distinguisher: 10.2.0.8:30
B-PE1 and B-PE2 have had as-override toward Core2 and Core3 since the L3VPN stage. Core1 pings Core2, and Core2 and Core3 ping Core1:
CustC-Core1#ping 10.30.0.2 source lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.30.0.2, timeout is 2 seconds:
Packet sent with a source address of 10.30.0.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/6 ms
CustC-Core2#ping 10.30.0.1 source lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.30.0.1, timeout is 2 seconds:
Packet sent with a source address of 10.30.0.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/6/10 ms
CustC-Core3#ping 10.30.0.1 so lo0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.30.0.1, timeout is 2 seconds:
Packet sent with a source address of 10.30.0.3
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/4/7 ms
Forwarding
A-ASBR has no outgoing label for Core2’s loopback, in CEF and in the MPLS forwarding entry for its label 1815:
A-ASBR#show ip cef vrf CustC 10.30.0.2
10.30.0.2/32
nexthop 10.255.0.6 GigabitEthernet4.30
A-ASBR#show mpls forwarding | i 10.30.0.2
1815 No Label 10.30.0.2/32[V] 0 Gi4.30 10.255.0.6
CustC-Core1#traceroute 10.30.0.2 source lo0 probe 1
Type escape sequence to abort.
Tracing the route to 10.30.0.2
VRF info: (vrf in name/id, vrf out name/id)
1 10.1.12.1 2 msec
2 10.1.1.33 [MPLS: Labels 1407/1815 Exp 0] 3 msec
3 10.255.0.5 [MPLS: Label 1815 Exp 0] 4 msec
4 10.255.0.6 3 msec
5 10.2.1.41 [MPLS: Labels 16500/24013 Exp 0] 27 msec
6 10.2.1.2 [MPLS: Labels 16500/24013 Exp 0] 6 msec
7 10.2.1.26 [MPLS: Label 24013 Exp 0] 53 msec
8 10.2.12.2 15 msec
In Core1’s traceroute above:
- Hop 1, A-PE2, receives a plain IP packet from Core1, looks up 10.30.0.2 in VRF CustC and sends it to A-P4 with two labels.
- Hop 2, A-P4, receives 1407 for the LSP to A-ASBR’s loopback, 10.1.0.8, and 1815 under it.
- Hop 3, A-ASBR, receives only 1815, because A-P4 removed the outer label. A-ASBR’s forwarding entry for 1815 sends the packet out Gi4.30 to B-ASBR, without a label.
- Hop 4, B-ASBR, receives a packet without a label. B-ASBR adds two SP-B labels: 16500, B-PE1’s prefix-SID, and 24013, the label B-PE1 advertised for Core2’s loopback.
- Hop 5, B-P1, receives 16500 and 24013 under it.
- Hop 6, B-P2, receives the same two labels and removes 16500 before sending the packet to B-PE1.
- Hop 7, B-PE1, receives only 24013 and sends the packet to Core2.
- Hop 8, Core2, receives a plain IP packet.

What’s Next
The next post connects CustA’s sites in SP-A and SP-B over the same link between the ASBRs, with Inter-AS Option B on a second sub-interface, Gi4.255.
Leave a Reply