L3VPN Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

L3VPN Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

Configure Inter-AS Option B for L3VPN

Want to summarize with AI?

Log in

Provides step-by-step instructions to configure Inter-AS Option B for L3VPN, detailing necessary tasks to establish Layer 3 VPN connectivity between autonomous systems.


Establish L3VPN connectivity between two autonomous systems using Inter-AS Option B, ensuring correct routing, label distribution, and forwarding.

In an Inter-AS Option B deployment, multiple autonomous systems (AS) are interconnected to extend Layer 3 VPN services. The procedure requires configuring routing protocols, MPLS label distribution, BGP VPNv4/VPNv6 address families, VRFs, and validation via control-plane and data-plane verification.

Note

Although L3VPN Inter-AS Option B supports per-prefix mode, use per-next-hop-label mode because of resource limitations.

Before you begin

  • Plan the topology, including all PE, P, and ASBR devices and their interconnections.

  • Determine interface addressing, IS-IS implementation, LDP sessions, MP-BGP configuration, VRF details, route-targets, and appropriate label modes.

  • Ensure resource limitations are addressed by using per-next-hop-label mode instead of per-prefix mode when supported (due to scaling restrictions).

Follow these steps to configure and verify Inter-AS Option B for L3VPN:

Procedure

  1. Configure PE1 for Inter-AS Option B.

    Example:

    Router# configure
    Router(config)# interface Loopback0
    Router(config-if)# ipv4 address 192.168.255.2/32
    Router(config-if)# ipv6 address 50:50:50::50/128
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether25
    Router(config-if)# description interface to R4
    Router(config-if)# ipv4 address 172.16.0.1 255.240.0.0
    Router(config-if)# exit
    Router(config)# router isis access
    Router(config-isis)# is-type level-1
    Router(config-isis)# net 49.0001.0000.0000.0050.00
    Router(config-isis)# nsr
    Router(config-isis)# nsf ietf
    Router(config-isis)# log adjacency changes
    Router(config-isis)# address-family ipv4 unicast
    Router(config-isis-af)# metric-style wide
    Router(config-isis-af)# exit
    Router(config-isis)# interface Bundle-Ether25
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Loopback0
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# exit
    Router(config)# mpls ldp
    Router(config-ldp)# interface Bundle-Ether25
    Router(config-ldp-if)# exit
    Router(config-ldp)# exit
    Router(config)# vrf vrf1
    Router(config-vrf)# address-family ipv4 unicast
    Router(config-vrf-af)# import route-target 100:1
    Router(config-vrf-af)# export route-target 100:1
    Router(config-vrf-af)# exit
    Router(config-vrf)# address-family ipv6 unicast
    Router(config-vrf-af)# import route-target 100:1
    Router(config-vrf-af)# export route-target 100:1
    Router(config-vrf-af)# exit
    Router(config-vrf)# exit
    Router(config)# router bgp 65000
    Router(config-bgp)# nsr
    Router(config-bgp)# bgp router-id 192.168.255.2
    Router(config-bgp)# bgp graceful-restart
    Router(config-bgp)# address-family vpnv4 unicast
    Router(config-bgp-af)# exit
    Router(config-bgp)# address-family vpnv6 unicast
    Router(config-bgp-af)# exit
    Router(config-bgp)# neighbor 10.10.10.10
    Router(config-bgp-nbr)# remote-as 65000
    Router(config-bgp-nbr)# update-source Loopback0
    Router(config-bgp-nbr)# address-family vpnv4 unicast
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# address-family vpnv6 unicast
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# exit
    Router(config-bgp)# vrf vrf1
    Router(config-bgp-vrf)# rd 100:1
    Router(config-bgp-vrf)# bgp router-id 192.168.255.2
    Router(config-bgp-vrf)# address-family ipv4 unicast
    Router(config-bgp-vrf-af)# label mode per-vrf
    Router(config-bgp-vrf-af)# redistribute connected
    Router(config-bgp-vrf-af)# exit
    Router(config-bgp-vrf)# address-family ipv6 unicast
    Router(config-bgp-vrf-af)# label mode per-vrf
    Router(config-bgp-vrf-af)# redistribute connected
    Router(config-bgp-vrf-af)# exit
    Router(config-bgp-vrf)# neighbor 192.0.2.12
    Router(config-bgp-vrf-nbr)# remote-as 501
    Router(config-bgp-vrf-nbr)# address-family ipv4 unicast
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all in
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all out
    Router(config-bgp-vrf-nbr-af)# exit
    Router(config-bgp-vrf-nbr)# exit
    Router(config-bgp-vrf)# neighbor 150:1:1::2
    Router(config-bgp-vrf-nbr)# remote-as 501
    Router(config-bgp-vrf-nbr)# address-family ipv6 unicast
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all in
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all out
    Router(config-bgp-vrf-nbr-af)# commit
  2. Configure P1 for Inter-AS Option B.

    Example:

    Router# configure
    Router(config)# interface Loopback0
    Router(config-if)# ipv4 address 172.16.0.1 255.255.255.255
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether12
    Router(config-if)# description interface to ASBR1
    Router(config-if)# ipv4 address 10.20.1.2 255.240.0.0
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether25
    Router(config-if)# description interface to R50
    Router(config-if)# ipv4 address 192.0.2.13 255.240.0.0
    Router(config-if)# exit
    Router(config)# router isis core
    Router(config-isis)# is-type level-1
    Router(config-isis)# net 49.0001.0000.0000.0020.00
    Router(config-isis)# nsr
    Router(config-isis)# nsf ietf
    Router(config-isis)# log adjacency changes
    Router(config-isis)# address-family ipv4 unicast
    Router(config-isis-af)# metric-style wide
    Router(config-isis-af)# exit
    Router(config-isis)# interface Bundle-Ether12
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Bundle-Ether25
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Loopback0
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# exit
    Router(config)# mpls ldp
    Router(config-ldp)# nsr
    Router(config-ldp)# interface Bundle-Ether12
    Router(config-ldp-if)# exit
    Router(config-ldp)# interface Bundle-Ether25
    Router(config-ldp-if)# commit
  3. Configure ASBR1 for Inter-AS Option B.

    Example:

    Router# configure
    Router(config)# interface Loopback0
    Router(config-if)# ipv4 address 10.10.10.10 255.255.255.255
    Router(config-if)# ipv6 address 10:10:10::10/128
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether12
    Router(config-if)# description interface to 172.16.0.1
    Router(config-if)# ipv4 address 10.20.1.1 255.240.0.0
    Router(config-if)# monitor-session Test ethernet port-level
    Router(config-if-mon)# exit
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether11
    Router(config-if)# description interface to ASBR2
    Router(config-if)# ipv4 address 10.1.0.1 255.255.255.0
    Router(config-if)# exit
    Router(config)# router isis core
    Router(config-isis)# is-type level-1
    Router(config-isis)# net 49.0001.0000.0000.0010.00
    Router(config-isis)# nsr
    Router(config-isis)# nsf ietf
    Router(config-isis)# log adjacency changes
    Router(config-isis)# address-family ipv4 unicast
    Router(config-isis-af)# metric-style wide
    Router(config-isis-af)# exit
    Router(config-isis)# interface Bundle-Ether12
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Loopback0
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# exit
    Router(config)# mpls ldp
    Router(config-ldp)# nsr
    Router(config-ldp)# interface Bundle-Ether12
    Router(config-ldp-if)# exit
    Router(config-ldp)# exit
    Router(config)# router bgp 65000
    Router(config-bgp)# nsr
    Router(config-bgp)# bgp router-id 10.10.10.10
    Router(config-bgp)# bgp graceful-restart
    Router(config-bgp)# address-family vpnv4 unicast
    Router(config-bgp-af)# retain route-target all
    Router(config-bgp-af)# label mode per-nexthop-received-label
    Router(config-bgp-af)# exit
    Router(config-bgp)# address-family vpnv6 unicast
    Router(config-bgp-af)# label mode per-nexthop-received-label
    Router(config-bgp-af)# retain route-target all
    Router(config-bgp-af)# exit
    Router(config-bgp)# neighbor 10.0.0.1
    Router(config-bgp-nbr)# remote-as 65001
    Router(config-bgp-nbr)# ebgp-multihop 2
    Router(config-bgp-nbr)# update-source Loopback0
    Router(config-bgp-nbr)# address-family vpnv4 unicast
    Router(config-bgp-nbr-af)# route-policy pass-all in
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# route-policy pass-all out
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# address-family vpnv6 unicast
    Router(config-bgp-nbr-af)# route-policy pass-all in
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# route-policy pass-all out
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# exit
    Router(config-bgp)# neighbor 192.168.255.2
    Router(config-bgp-nbr)# remote-as 65000
    Router(config-bgp-nbr)# update-source Loopback0
    Router(config-bgp-nbr)# address-family vpnv4 unicast
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# next-hop-self
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# address-family vpnv6 unicast
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# next-hop-self
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# exit
    Router(config-bgp)# exit
    Router(config)# router static
    Router(config-static)# address-family ipv4 unicast
    Router(config-static-afi)# 10.0.0.1/32 Bundle-Ether11 10.1.0.2
    Router(config-static-afi)# commit
  4. Configure ASBR2 for Inter-AS Option B.

    Example:

    Router# configure
    Router(config)# interface Loopback0
    Router(config-if)# ipv4 address 10.0.0.1 255.255.255.255
    Router(config-if)# ipv6 address 1:1:1::1/128
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether12
    Router(config-if)# description interface to P2
    Router(config-if)# ipv4 address 192.0.2.14 255.240.0.0
    Router(config-if)# monitor-session Test ethernet port-level
    Router(config-if-mon)# exit
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether11
    Router(config-if)# description interface to ASBR1
    Router(config-if)# ipv4 address 10.1.0.2 255.255.255.0
    Router(config-if)# exit
    Router(config)# router isis core
    Router(config-isis)# is-type level-1
    Router(config-isis)# net 49.0001.0000.0000.0010.00
    Router(config-isis)# nsr
    Router(config-isis)# nsf ietf
    Router(config-isis)# log adjacency changes
    Router(config-isis)# address-family ipv4 unicast
    Router(config-isis-af)# metric-style wide
    Router(config-isis-af)# exit
    Router(config-isis)# interface Bundle-Ether12
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Loopback0
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# exit
    Router(config)# mpls ldp
    Router(config-ldp)# nsr
    Router(config-ldp)# interface Bundle-Ether12
    Router(config-ldp-if)# exit
    Router(config-ldp)# exit
    Router(config)# router bgp 65001
    Router(config-bgp)# nsr
    Router(config-bgp)# bgp router-id 10.0.0.1
    Router(config-bgp)# bgp graceful-restart
    Router(config-bgp)# address-family vpnv4 unicast
    Router(config-bgp-af)# label mode per-nexthop-received-label
    Router(config-bgp-af)# retain route-target all
    Router(config-bgp-af)# exit
    Router(config-bgp)# address-family vpnv6 unicast
    Router(config-bgp-af)# label mode per-nexthop-received-label
    Router(config-bgp-af)# retain route-target all
    Router(config-bgp-af)# exit
    Router(config-bgp)# neighbor 192.0.2.15
    Router(config-bgp-nbr)# remote-as 65001
    Router(config-bgp-nbr)# update-source Loopback0
    Router(config-bgp-nbr)# address-family vpnv4 unicast
    Router(config-bgp-nbr-af)# next-hop-self
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# address-family vpnv6 unicast
    Router(config-bgp-nbr-af)# next-hop-self
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# exit
    Router(config-bgp)# neighbor 10.10.10.10
    Router(config-bgp-nbr)# remote-as 65000
    Router(config-bgp-nbr)# ebgp-multihop 2
    Router(config-bgp-nbr)# update-source Loopback0
    Router(config-bgp-nbr)# address-family vpnv4 unicast
    Router(config-bgp-nbr-af)# route-policy pass-all in
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# route-policy pass-all out
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# address-family vpnv6 unicast
    Router(config-bgp-nbr-af)# route-policy pass-all in
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# route-policy pass-all out
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# exit
    Router(config-bgp)# exit
    Router(config)# router static
    Router(config-static)# address-family ipv4 unicast
    Router(config-static-afi)# 10.10.10.10/32 Bundle-Ether11 10.1.0.1
    Router(config-static-afi)# commit
  5. Configure P2 for Inter-AS Option B.

    Example:

    Router# configure
    Router(config)# interface Loopback0
    Router(config-if)# ipv4 address 192.0.2.2 255.255.255.255
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether12
    Router(config-if)# description interface towards ASBR2
    Router(config-if)# ipv4 address 192.0.2.16 255.240.0.0
    Router(config-if)# exit
    Router(config)# interface Bundle-Ether25
    Router(config-if)# description interface towards PE2
    Router(config-if)# ipv4 address ipv4 address 192.0.2.17 255.240.0.0
    Router(config-if)# exit
    Router(config)# router isis core
    Router(config-isis)# is-type level-1
    Router(config-isis)# net 49.0001.0000.0000.0020.00
    Router(config-isis)# nsr
    Router(config-isis)# nsf ietf
    Router(config-isis)# log adjacency changes
    Router(config-isis)# address-family ipv4 unicast
    Router(config-isis-af)# metric-style wide
    Router(config-isis-af)# exit
    Router(config-isis)# interface Bundle-Ether12
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Bundle-Ether25
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Loopback0
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# exit
    Router(config)# mpls ldp
    Router(config-ldp)# interface Bundle-Ether12
    Router(config-ldp-if)# exit
    Router(config-ldp)# interface Bundle-Ether25
    Router(config-ldp-if)# commit
  6. Configure PE2 for Inter-AS Option B.

    Example:

    Router(config)# router bgp 65001
    Router(config-bgp)# nsr
    Router(config-bgp)# bgp router-id 192.168.255.12
    Router(config-bgp)# bgp graceful-restart
    Router(config-bgp)# address-family vpnv4 unicast
    Router(config-bgp-af)# exit
    Router(config-bgp)# address-family vpnv6 unicast
    Router(config-bgp-af)# exit
    Router(config-bgp)# neighbor 10.0.0.1
    Router(config-bgp-nbr)# remote-as 65001
    Router(config-bgp-nbr)# update-source Loopback0
    Router(config-bgp-nbr)# address-family vpnv4 unicast
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# address-family vpnv6 unicast
    Router(config-bgp-nbr-af)# maximum-prefix 4500000 90
    Router(config-bgp-nbr-af)# exit
    Router(config-bgp-nbr)# exit
    Router(config-bgp)# vrf vrf1
    Router(config-bgp-vrf)# rd 100:1
    Router(config-bgp-vrf)# bgp router-id 192.168.255.12
    Router(config-bgp-vrf)# address-family ipv4 unicast
    Router(config-bgp-vrf-af)# label mode per-vrf
    Router(config-bgp-vrf-af)# redistribute connected
    Router(config-bgp-vrf-af)# exit
    Router(config-bgp-vrf)# address-family ipv6 unicast
    Router(config-bgp-vrf-af)# label mode per-vrf
    Router(config-bgp-vrf-af)# redistribute connected
    Router(config-bgp-vrf-af)# exit
    Router(config-bgp-vrf)# neighbor 192.0.2.12
    Router(config-bgp-vrf-nbr)# remote-as 501
    Router(config-bgp-vrf-nbr)# address-family ipv4 unicast
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all in
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all out
    Router(config-bgp-vrf-nbr-af)# exit
    Router(config-bgp-vrf-nbr)# exit
    Router(config-bgp-vrf)# neighbor 150:1:1::2
    Router(config-bgp-vrf-nbr)# remote-as 501
    Router(config-bgp-vrf-nbr)# address-family ipv6 unicast
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all in
    Router(config-bgp-vrf-nbr-af)# route-policy pass-all out
    Router(config-bgp-vrf-nbr-af)# exit
    Router(config-bgp-vrf-nbr)# exit
    Router(config-bgp-vrf)# exit
    Router(config-bgp)# exit
    Router(config-bgp)# exit
    Router(config)# interface TenGigE0/0/0/30.1
    Router(config-subif)# vrf vrf1
    Router(config-subif)# ipv4 address 172.16.0.1 255.240.0.0
    Router(config-subif)# ipv6 address 105:1:1::1/96
    Router(config-subif)# encapsulation dot1q 1
    Router(config-subif)# exit
    Router(config)# interface Loopback0
    Router(config-if)# ipv4 address 192.168.255.12 255.255.255.224
    Router(config-if)# ipv6 address 50:50:50::50/128
    Router(config-if)# exit
    Router(config)# router isis access
    Router(config-isis)# is-type level-1
    Router(config-isis)# net 49.0001.0000.0000.0050.00
    Router(config-isis)# nsr
    Router(config-isis)# nsf ietf
    Router(config-isis)# log adjacency changes
    Router(config-isis)# address-family ipv4 unicast
    Router(config-isis-af)# metric-style wide
    Router(config-isis-af)# exit
    Router(config-isis)# interface Bundle-Ether25
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# interface Loopback0
    Router(config-isis-if)# point-to-point
    Router(config-isis-if)# address-family ipv4 unicast
    Router(config-isis-if-af)# exit
    Router(config-isis-if)# exit
    Router(config-isis)# exit
    Router(config)# mpls ldp
    Router(config-ldp)# interface Bundle-Ether25
    Router(config-ldp-if)# exit
    Router(config-ldp)# exit
    Router(config)# vrf vrf1
    Router(config-vrf)# address-family ipv4 unicast
    Router(config-vrf-af)# import route-target 100:1
    Router(config-vrf-af)# export route-target 100:1
    Router(config-vrf-af)# exit
    Router(config-vrf)# address-family ipv6 unicast
    Router(config-vrf-af)# import route-target 100:1
    Router(config-vrf-af)# export route-target 100:1
    Router(config-vrf-af)# commit
  7. Review the running configuration on all devices.

    Example:

    PE1 running configuration

    interface Loopback0
     ipv4 address 192.168.255.2/32
     ipv6 address 50:50:50::50/128
    !
    interface Bundle-Ether25
     description interface to R4
     ipv4 address 172.16.0.1 255.240.0.0
     !
    !
    router isis access
     is-type level-1
     net 49.0001.0000.0000.0050.00
     nsr
     nsf ietf
     log adjacency changes
     address-family ipv4 unicast
      metric-style wide
     !
     interface Bundle-Ether25
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Loopback0
      point-to-point
      address-family ipv4 unicast
      !
     !
    !
    mpls ldp
     interface Bundle-Ether25
     !
    !
    
    vrf vrf1
     address-family ipv4 unicast
      import route-target 100:1
      !
      export route-target 100:1
      !
     !
     address-family ipv6 unicast
      import route-target 100:1
      !
      export route-target 100:1
      !
     !
    !
    router bgp 65000
     nsr
     bgp router-id 192.168.255.2
     bgp graceful-restart
     address-family vpnv4 unicast
     !
     address-family vpnv6 unicast
     !
     neighbor 10.10.10.10
      remote-as 65000
      update-source Loopback0
      address-family vpnv4 unicast
       maximum-prefix 4500000 90
      !
      address-family vpnv6 unicast
       maximum-prefix 4500000 90
      !
     !
     vrf vrf1
      rd 100:1
      bgp router-id 192.168.255.2
      address-family ipv4 unicast
       label mode per-vrf
       redistribute connected
      !
      address-family ipv6 unicast
       label mode per-vrf
       redistribute connected
      !
      neighbor 192.0.2.12
       remote-as 501
       address-family ipv4 unicast
        route-policy pass-all in
        route-policy pass-all out
       !
      !
      neighbor 150:1:1::2
       remote-as 501
       address-family ipv6 unicast
        route-policy pass-all in
        route-policy pass-all out
       !
      !
     !

    P1 running configuration

    interface Loopback0
     ipv4 address 172.16.0.1 255.255.255.255
    !
    interface Bundle-Ether12
     description interface to ASBR1
     ipv4 address 10.20.1.2 255.240.0.0
    !
    interface Bundle-Ether25
     description interface to R50
     ipv4 address 192.0.2.13 255.240.0.0
    !
    router isis core
     is-type level-1
     net 49.0001.0000.0000.0020.00
     nsr
     nsf ietf
     log adjacency changes
     address-family ipv4 unicast
      metric-style wide
     !
     interface Bundle-Ether12
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Bundle-Ether25
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Loopback0
      point-to-point
      address-family ipv4 unicast
      !
     !
    !
    
    mpls ldp
     nsr
     interface Bundle-Ether12
     !
     interface Bundle-Ether25
     !
    !

    ASBR1 running configuration

    interface Loopback0
     ipv4 address 10.10.10.10 255.255.255.255
     ipv6 address 10:10:10::10/128
    !
    interface Bundle-Ether12
     description interface to 172.16.0.1
     ipv4 address 10.20.1.1 255.240.0.0
     monitor-session Test ethernet port-level
     !
    !
    interface Bundle-Ether11
     description interface to ASBR2
     ipv4 address 10.1.0.1 255.255.255.0
    !
    router isis core
     is-type level-1
     net 49.0001.0000.0000.0010.00
     nsr
     nsf ietf
     log adjacency changes
     address-family ipv4 unicast
      metric-style wide
     !
     interface Bundle-Ether12
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Loopback0
      point-to-point
      address-family ipv4 unicast
      !
     !
    !
    
    mpls ldp
     nsr
     interface Bundle-Ether12
     !
    !
    
    router bgp 65000
     nsr
     bgp router-id 10.10.10.10
     bgp graceful-restart
     address-family vpnv4 unicast
      label mode per-nexthop-received-label
      retain route-target all
     !
      address-family vpnv6 unicast
       label mode per-nexthop-received-label
       retain route-target all
     !
     neighbor 10.0.0.1
      remote-as 65001
      ebgp-multihop 2
      update-source Loopback0
      address-family vpnv4 unicast
       route-policy pass-all in
       maximum-prefix 4500000 90
       route-policy pass-all out
      !
      address-family vpnv6 unicast
       route-policy pass-all in
       maximum-prefix 4500000 90
       route-policy pass-all out
      !
     !
      neighbor 192.168.255.2
      remote-as 65000
      update-source Loopback0
      address-family vpnv4 unicast
       maximum-prefix 4500000 90
       next-hop-self
      !
      address-family vpnv6 unicast
       maximum-prefix 4500000 90
       next-hop-self
      !
     !
    !
    router static
     address-family ipv4 unicast
      10.0.0.1/32 Bundle-Ether11 10.1.0.2
     !
    !

    ASBR2 running configuration

    interface Loopback0
     ipv4 address 10.0.0.1 255.255.255.255
     ipv6 address 1:1:1::1/128
    !
    interface Bundle-Ether12
     description interface to P2
     ipv4 address 192.0.2.14 255.240.0.0
    !
    interface Bundle-Ether11
     description interface to ASBR1
     ipv4 address 10.1.0.2 255.255.255.0
    !
    router isis core
     is-type level-1
     net 49.0001.0000.0000.0001.00
     nsr
     distribute link-state
     nsf ietf
     log adjacency changes
     address-family ipv4 unicast
      metric-style wide
     !
     interface Bundle-Ether12
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Loopback0
      point-to-point
      address-family ipv4 unicast
      !
     !
    !
    mpls ldp
     interface Bundle-Ether12
     !
    !
    
    router bgp 65001
     nsr
     bgp router-id 10.0.0.1
     bgp graceful-restart
     address-family ipv4 unicast
     !
     address-family vpnv4 unicast
      label mode per-nexthop-received-label
      retain route-target all
     !
     address-family vpnv6 unicast
      label mode per-nexthop-received-label
      retain route-target all
     !
     neighbor 192.0.2.15
      remote-as 65001
      update-source Loopback0
      address-family vpnv4 unicast
       next-hop-self
      !
      address-family vpnv6 unicast
       next-hop-self
      !
     !
      neighbor 10.10.10.10
      remote-as 65000
      ebgp-multihop 2
      update-source Loopback0
      address-family vpnv4 unicast
       route-policy pass-all in
       maximum-prefix 4500000 90
       route-policy pass-all out
      !
      address-family vpnv6 unicast
       route-policy pass-all in
       maximum-prefix 4500000 90
       route-policy pass-all out
      !
     !
    
    router static
     address-family ipv4 unicast
      10.10.10.10/32 Bundle-Ether11 10.1.0.1
     !

    P2 running configuration

    interface Loopback0
     ipv4 address 192.0.2.2 255.255.255.255
    !
    interface Bundle-Ether12
     description interface towards ASBR2
     ipv4 address 192.0.2.16 255.240.0.0
    !
    interface Bundle-Ether25
     description interface towards PE2
     ipv4 address 192.0.2.17 255.240.0.0
    !
    
    router isis core
     is-type level-1
     net 49.0001.0000.0000.0002.00
     nsr
     nsf ietf
     log adjacency changes
     address-family ipv4 unicast
      metric-style wide
     !
     interface Bundle-Ether12
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Bundle-Ether25
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Loopback0
      point-to-point
      address-family ipv4 unicast
      !
     !
    !
    
    mpls ldp
     interface Bundle-Ether12
     !
     interface Bundle-Ether25
     !
    !

    PE2 running configuration

    router bgp 65001
     nsr
     bgp router-id 192.168.255.12
     bgp graceful-restart
     address-family vpnv4 unicast
     !
     address-family vpnv6 unicast
     !
     neighbor 10.0.0.1
      remote-as 65001
      update-source Loopback0
      address-family vpnv4 unicast
       maximum-prefix 4500000 90
      !
      address-family vpnv6 unicast
       maximum-prefix 4500000 90
      !
     !
     vrf vrf1
      rd 100:1
      bgp router-id 192.168.255.12
      address-family ipv4 unicast
       label mode per-vrf
       redistribute connected
      !
      address-family ipv6 unicast
       label mode per-vrf
       redistribute connected
      !
      neighbor 192.0.2.11
       remote-as 501
       address-family ipv4 unicast
        route-policy pass-all in
        route-policy pass-all out
       !
      !
      neighbor 105:1:1::2
       remote-as 501
       address-family ipv6 unicast
        route-policy pass-all in
        route-policy pass-all out
       !
      !
     !
    
    interface TenGigE0/0/0/30.1
     vrf vrf1
     ipv4 address 192.0.2.18 255.240.0.0
     ipv6 address 105:1:1::1/96
     encapsulation dot1q 1
    !
    
    interface Loopback0
     ipv4 address 192.0.2.15 255.255.255.255
     ipv6 address 5:5:5::5/128
    !
    
    router isis access
     is-type level-1
     net 49.0001.0000.0000.0005.00
     nsr
     nsf ietf
     log adjacency changes
     address-family ipv4 unicast
      metric-style wide
     !
     interface Bundle-Ether25
      point-to-point
      address-family ipv4 unicast
      !
     !
     interface Loopback0
      point-to-point
      address-family ipv4 unicast
      !
     !
    !
    
    mpls ldp
     interface Bundle-Ether25
     !
    !
    
    vrf vrf1
     address-family ipv4 unicast
      import route-target
       100:1
      !
      export route-target
       100:1
      !
     !
     address-family ipv6 unicast
      import route-target
       100:1
      !
      export route-target
       100:1
  8. Verify route, label, and forwarding state across the topology.

    Example:

    Verification on PE1.

    L3VPN route 192.0.2.10/24 is learned through iBGP from ASBR1 on PE1 over address family VPNv4 unicast.

    Router-PE1# show route vrf vrf1
    Sun Jun  6 23:08:38.433 UTC
    
    Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2
           ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
           U - per-user static route, o - ODR, L - local, G  - DAGR, l - LISP
           A - access/subscriber, a - Application route
           M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
    
    Gateway of last resort is not set
    
    B    192.0.2.19/24 [200/0] via 10.10.10.10 (nexthop in vrf default), 00:04:43
    C    192.0.2.20/24 is directly connected, 01:14:27, TenGigE0/0/0/22/0.1
    L    192.0.2.21/32 is directly connected, 01:14:27, TenGigE0/0/0/22/0.1
    B    192.0.2.10/24 [200/0] via 10.10.10.10 (nexthop in vrf default), 00:00:08
    B    192.0.2.22/24 [200/0] via 10.10.10.10 (nexthop in vrf default), 00:00:08

    The following output shows that you can reach 192.0.2.10/24 using a VPN label of 24521. The next hop for the VPNv4 prefix decides the transport label as well as the label switched path.

    Router-PE1# show bgp vpnv4 unicast rd 100:1 192.0.2.10/24
    Sun Jun  6 23:12:12.140 UTC
    BGP routing table entry for 192.0.2.10/24, Route Distinguisher: 100:1
    Versions:
      Process           bRIB/RIB  SendTblVer
      Speaker               2844        2844
    Last Modified: Jun  6 23:08:30.194 for 00:03:42
    Paths: (1 available, best #1)
      Not advertised to any peer
      Path #1: Received by speaker 0
      Not advertised to any peer
      200 501
        10.10.10.10 (metric 30) from 10.10.10.10 (10.10.10.10)
          Received Label 24521
          Origin IGP, localpref 100, valid, internal, best, group-best, import-candidate, imported
          Received Path ID 0, Local Path ID 1, version 2844
          Extended community: RT:100:1
          Source AFI: VPNv4 Unicast, Source VRF: vrf1, Source Route Distinguisher: 100:1
    
    Router-PE1# show cef vrf vrf1 192.0.2.10
    Mon Jun  7 02:07:39.841 UTC
    192.0.2.10/24, version 513583, internal 0x5000001 0x30 (ptr 0xa3f8bac8) [1], 0x0 (0x0), 0x208 (0x8f505928)
     Updated Jun  7 01:50:33.710
     Prefix Len 24, traffic index 0, precedence n/a, priority 3
      gateway array (0x8f2d20e8) reference count 252, flags 0x2038, source rib (7), 0 backups
                    [1 type 1 flags 0x48441 (0x8ad86708) ext 0x0 (0x0)]
      LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
      gateway array update type-time 1 Jun  6 23:20:45.951
     LDI Update time Jun  6 23:20:45.951
       via 10.10.10.10/32, 5 dependencies, recursive [flags 0x6000]
        path-idx 0 NHID 0x0 [0xa25ff9d8 0x0]
        recursion-via-/32
        next hop VRF - 'default', table - 0xe0000000
        next hop 10.10.10.10/32 via 24003/0/21
         next hop 192.0.2.13/32 BE25         labels imposed {24004 24521}
    
        Load distribution: 0 (refcount 1)
    
        Hash  OK  Interface                 Address
        0     Y   recursive                 24003/0

    The following output shows the transport label information to reach 192.0.2.10/24.

    Router-PE1# show mpls forwarding prefix 10.10.10.10/32
    Mon Jun  7 02:06:40.845 UTC
    Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
    Label  Label       or ID              Interface                    Switched
    ------ ----------- ------------------ ------------ --------------- ------------
    24003  24004       10.10.10.10/32     BE25         192.0.2.13       141107
    -------------------------------------------------------------------------------
    
    Router:PE1# show cef vrf vrf1 192.0.2.10
    Mon Jun  7 02:07:39.841 UTC
    192.0.2.10/24, version 513583, internal 0x5000001 0x30 (ptr 0xa3f8bac8) [1], 0x0 (0x0), 0x208 (0x8f505928)
     Updated Jun  7 01:50:33.710
     Prefix Len 24, traffic index 0, precedence n/a, priority 3
      gateway array (0x8f2d20e8) reference count 252, flags 0x2038, source rib (7), 0 backups
                    [1 type 1 flags 0x48441 (0x8ad86708) ext 0x0 (0x0)]
      LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
      gateway array update type-time 1 Jun  6 23:20:45.951
     LDI Update time Jun  6 23:20:45.951
       via 10.10.10.10/32, 5 dependencies, recursive [flags 0x6000]
        path-idx 0 NHID 0x0 [0xa25ff9d8 0x0]
        recursion-via-/32
        next hop VRF - 'default', table - 0xe0000000
        next hop 10.10.10.10/32 via 24003/0/21
         next hop 192.0.2.13/32 BE25         labels imposed {24004 24521}
    
        Load distribution: 0 (refcount 1)
    
        Hash  OK  Interface                 Address
        0     Y   recursive                 24003/0

    Verification on P1.

    P1 performs a PHP operation for transport label and exposes the VPN label before forwarding the traffic to next-hop 10.10.10.10.

    Router-P1# show mpls forwarding prefix 10.10.10.10/32
    Mon Jun  7 02:34:55.293 UTC
    Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
    Label  Label       or ID              Interface                    Switched
    ------ ----------- ------------------ ------------ --------------- ------------
    24004  Pop         10.10.10.10/32     BE12         10.20.1.1       28804
    -------------------------------------------------------------------------------

    Verification on ASBR1.

    ASBR1 learns the remote route 192.0.2.10/24 from ASBR2 through address-family VPNv4 unicast. The next hop is the ASBR2 loopback0.

    After receiving this update, it is advertised to the local PE1 through iBGP address-family VPNv4 unicast. The next-hop-self configuration is used on ASBR1 since it is reachable through IGP from PE1, so the next hop is changed to itself. The traffic arrives from PE1 with a label 24521 and is swapped with label 25516 before forwarding it to ASBR2.

    Router-ASBR1# show bgp vpnv4 unicast rd 100:1 192.0.2.10
    Sun Jun  6 19:28:09.018 EDT
    BGP routing table entry for 192.0.2.10/24, Route Distinguisher: 100:1
    Versions:
      Process           bRIB/RIB  SendTblVer
      Speaker            1002022     1002022
        Local Label: 24521
    
    Paths: (1 available, best #1)
      Advertised to update-groups (with more than one peer):
        0.3
      Path #1: Received by speaker 0
      Advertised to update-groups (with more than one peer):
        0.3
      200 501
        10.0.0.1 from 10.0.0.1 (10.0.0.1)
          Received Label 25516
          Origin IGP, localpref 100, valid, external, best, group-best, import-candidate, not-in-vrf
          Received Path ID 0, Local Path ID 1, version 1002022
          Extended community: RT:100:1
    
    
    Router-ASBR1# show bgp vpnv4 unicast rd 100:1 advertised neighbor 192.168.255.2 summary
    
    Network            Next Hop        From            AS Path
    Route Distinguisher: 100:1
    192.0.2.19/24       10.10.10.10     10.0.0.1         200?
    192.0.2.10/24       10.10.10.10     10.0.0.1         200 501i
    192.0.2.22/24       10.10.10.10     10.0.0.1         200 501i
    
    Processed 3 prefixes, 3 paths
    
    
    Router-ASBR1# show mpls forwarding labels 24521
    Sun Jun  6 23:05:49.323 EDT
    Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
    Label  Label       or ID              Interface                    Switched
    ------ ----------- ------------------ ------------ --------------- ------------
    24521  25516  100:1:192.0.2.10/24               10.1.0.1         0
    -------------------------------------------------------------------------------

    Verification on ASBR2.

    The prefix 192.0.2.10/24 is received through iBGP address-family VPNv4 unicast from PE2 with a label of 24002. ASBR2 assigns it a local label of 25516 and advertises it to ASBR1 through eBGP vpnv4 address-family changing the next hop to itself. This local label of 25516 is used by the ASBR1 to forward traffic to ASBR2, which in turn swaps it with a VPN label of 24002 before forwarding it to the next hop.

    Router-ASBR2# show bgp vpnv4 unicast rd 100:1 192.0.2.10
    Sun Jun  6 23:06:32.812 EDT
    BGP routing table entry for 192.0.2.10/24, Route Distinguisher: 100:1
    Versions:
      Process           bRIB/RIB  SendTblVer
      Speaker           16194881    16194881
        Local Label: 25516
        Gateway Array ID: 21940, Resilient per-PE nexthop set ID: 19598
    
    Paths: (1 available, best #1)
      Advertised to update-groups (with more than one peer):
        0.3
      Path #1: Received by speaker 0
      Advertised to update-groups (with more than one peer):
        0.3
      501
        192.0.2.15 (metric 30) from 192.0.2.15 (192.0.2.15)
          Received Label 24002
          Origin IGP, localpref 100, valid, internal, best, group-best, import-candidate, not-in-vrf
          Received Path ID 0, Local Path ID 1, version 16194881
          Extended community: RT:100:1
    
    Router-ASBR2# show bgp vpnv4 unicast rd 100:1 advertised neighbor 10.10.10.10 summary
    Sun Jun  6 23:07:05.617 EDT
    Network            Next Hop        From            AS Path
    Route Distinguisher: 100:1
    192.0.2.19/24       10.0.0.1         192.0.2.15         200?
    192.0.2.20/24       10.0.0.1         10.10.10.10     200 100?
    192.0.2.10/24       10.0.0.1         192.0.2.15         200 501i
    192.0.2.22/24       10.0.0.1         192.0.2.15         200 501i
    
    Processed 4 prefixes, 4 paths
    
    Router-ASBR2# show mpls forwarding labels 25516
    Sun Jun  6 23:07:32.394 EDT
    Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
    Label  Label       or ID              Interface                    Switched
    ------ ----------- ------------------ ------------ --------------- ------------
    25516  24002       No ID                           192.0.2.15         654
    -------------------------------------------------------------------------------

    Verification on P2.

    P2 is along the transit path of the traffic. It label switches or pops the transport label. In this example, PHP operation is performed and exposes the VPN label before forwarding the traffic.

    Router-P2# show mpls forwarding prefix 192.0.2.15/32
    Mon Jun  7 03:09:11.532 UTC
    Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
    Label  Label       or ID              Interface                    Switched
    ------ ----------- ------------------ ------------ --------------- ------------
    24005  Pop         192.0.2.15/32         BE25         192.0.2.23         11921958
    -------------------------------------------------------------------------------

    Verification on PE2.

    L3VPN route 192.0.2.10/24 is learned from eBGP neighbor 192.0.2.11 (CE2 interface towards PE2) in vrf1.

    Router-PE2# show route vrf vrf1
    
    Codes: C - connected, S - static, R - RIP, B - BGP, (>) - Diversion path
           D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
           N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
           E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
           i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2
           ia - IS-IS inter area, su - IS-IS summary null, * - candidate default
           U - per-user static route, o - ODR, L - local, G  - DAGR, l - LISP
           A - access/subscriber, a - Application route
           M - mobile route, r - RPL, t - Traffic Engineering, (!) - FRR Backup path
    
    Gateway of last resort is not set
    
    C    192.0.2.19/24 is directly connected, 6w4d, TenGigE0/0/0/30.1
    L    192.0.2.18/32 is directly connected, 6w4d, TenGigE0/0/0/30.1
    B    192.0.2.20/24 [200/0] via 10.0.0.1 (nexthop in vrf default), 03:58:16
    B    192.0.2.24/24 [200/0] via 10.0.0.1 (nexthop in vrf default), 04:30:07
    B    192.0.2.10/24 [20/0] via 192.0.2.11, 01:30:05
    B    192.0.2.22/24 [20/0] via 192.0.2.11, 01:30:05

    The route 192.0.2.10/24 gets installed in VRF1 with a local label of 24002 and then advertised through iBGP address-family VPNv4 unicast to ASBR2 changing the next hop to itself. ASBR2 adds this VPN label before forwarding it to PE2.

    Router-PE2# show bgp vpnv4 unicast rd 100:1 192.0.2.10
    
    BGP routing table entry for 192.0.2.10/24, Route Distinguisher: 100:1
    Versions:
      Process           bRIB/RIB  SendTblVer
      Speaker            1070062     1070062
        Local Label: 24002
    Last Modified: Jun  7 01:30:56.657 for 01:31:29
    Paths: (1 available, best #1)
      Advertised to peers (in unique update groups):
        10.0.0.1
      Path #1: Received by speaker 0
      Advertised to peers (in unique update groups):
        10.0.0.1
      501
        192.0.2.11 from 192.0.2.11 (192.0.2.25)
          Origin IGP, localpref 100, valid, external, best, group-best, import-candidate
          Received Path ID 0, Local Path ID 1, version 1070062
          Extended community: RT:100:1

    The traffic that arrives from PE2 with a VPN label of 24002 is assigned an outgoing label aggregate, which means that the lookup is to be performed in vrf1 RIB to forward it to the next hop on 192.0.2.12.

    Router-PE2# show mpls forwarding labels 24002
    Mon Jun  7 03:02:53.255 UTC
    Local  Outgoing    Prefix             Outgoing     Next Hop        Bytes
    Label  Label       or ID              Interface                    Switched
    ------ ----------- ------------------ ------------ --------------- ------------
    24002  Aggregate   vrf1: Per-VRF Aggr[V]   \
                                          vrf1                         138
    -------------------------------------------------------------------------------
    
    Router-PE2# show cef vrf vrf1 192.0.2.10
    Mon Jun  7 03:04:08.268 UTC
    192.0.2.10/24, version 3477, internal 0x1000001 0x30 (ptr 0x97f75328) [1], 0x0 (0x0), 0x0 (0x0)
     Updated Jun  7 01:30:57.120
     Prefix Len 24, traffic index 0, precedence n/a, priority 3
      gateway array (0x8c820f38) reference count 2, flags 0x2010, source rib (7), 0 backups
                    [1 type 3 flags 0x48441 (0x8a79cd88) ext 0x0 (0x0)]
      LW-LDI[type=0, refc=0, ptr=0x0, sh-ldi=0x0]
      gateway array update type-time 1 Jun  7 01:30:57.120
     LDI Update time Jun  7 01:30:57.120
    
      Level 1 - Load distribution: 0
      [0] via 192.0.2.11/32, recursive
    
       via 192.0.2.11/32, 3 dependencies, recursive, bgp-ext [flags 0x6020]
        path-idx 0 NHID 0x0 [0x8d575b80 0x0]
        next hop 192.0.2.11/32 via 192.0.2.11/32
    
        Load distribution: 0 (refcount 1)
    
        Hash  OK  Interface                 Address
        0     Y   TenGigE0/0/0/30.1         192.0.2.11

Inter-AS Option B for L3VPN is configured and verified when routing, label, and forwarding tables display correct states and expected label mappings across all PE, P, and ASBR devices.