Two ASBRs established eBGP for VPNv4 address family to exchange VPNv4 prefixes+Labels
ASBRs advertises these to their internal AS.
VRFs are not configured on ASBRs. Therefore it is required to disable Route-Target Filter on them.
Initial Configurations
AS 1 Routers
PE1
!
hostname PE1
vrf definition A
rd 1:1
!
address-family ipv4
route-target export 1:1
route-target import 1:1
exit-address-family
!
vrf definition B
rd 1:2
!
address-family ipv4
route-target export 1:2
route-target import 1:2
exit-address-family
!
mpls label protocol ldp
!
interface Loopback0
ip address 11.11.11.11 255.255.255.255
ip ospf 1 area 0
!
interface GigabitEthernet1
mtu 1600
ip address 10.11.12.11 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
no shutdown
!
interface GigabitEthernet2
vrf forwarding A
ip address 172.16.1.1 255.255.255.252
no shutdown
!
interface GigabitEthernet3
vrf forwarding B
ip address 172.16.1.5 255.255.255.252
no shutdown
!
router ospf 1
router-id 11.11.11.11
passive-interface default
no passive-interface GigabitEthernet1
mpls ldp sync
mpls ldp autoconfig area 0
!
router bgp 1
bgp router-id 11.11.11.11
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 13.13.13.13 remote-as 1
neighbor 13.13.13.13 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family vpnv4
neighbor 13.13.13.13 activate
neighbor 13.13.13.13 send-community extended
exit-address-family
!
address-family ipv4 vrf A
redistribute connected
neighbor 172.16.1.2 remote-as 65101
neighbor 172.16.1.2 activate
exit-address-family
!
address-family ipv4 vrf B
redistribute connected
neighbor 172.16.1.6 remote-as 65201
neighbor 172.16.1.6 activate
exit-address-family
!
mpls ldp router-id Loopback0
!
P1
!
hostname P1
!
mpls label protocol ldp
!
interface Loopback0
ip address 12.12.12.12 255.255.255.255
ip ospf 1 area 0
!
interface GigabitEthernet1
mtu 1600
ip address 10.11.12.12 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
no shutdown
!
interface GigabitEthernet2
mtu 1600
ip address 10.12.13.12 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
no shutdown
interface GigabitEthernet3
mtu 1600
ip address 10.12.14.12 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
no shutdown
!
router ospf 1
router-id 12.12.12.12
passive-interface default
no passive-interface GigabitEthernet1
no passive-interface GigabitEthernet2
no passive-interface GigabitEthernet3
mpls ldp sync
mpls ldp autoconfig area 0
!
mpls ldp router-id Loopback0
!
!
hostname ASBR1
!
mpls label protocol ldp
1
interface Loopback0
ip address 14.14.14.14 255.255.255.255
ip ospf 1 area 0
!
interface GigabitEthernet1
mtu 1600
ip address 10.12.14.14 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
no shutdown
!
router ospf 1
router-id 14.14.14.14
passive-interface default
no passive-interface GigabitEthernet1
mpls ldp sync
mpls ldp autoconfig area 0
!
router bgp 1
bgp router-id 14.14.14.14
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 13.13.13.13 remote-as 1
neighbor 13.13.13.13 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family vpnv4
neighbor 13.13.13.13 activate
neighbor 13.13.13.13 send-community extended
exit-address-family
!
mpls ldp router-id Loopback0
AS 2 Routers
PE2
!
hostname PE2
vrf definition A
rd 1:1
!
address-family ipv4
route-target export 1:1
route-target import 1:1
exit-address-family
!
vrf definition B
rd 1:2
!
address-family ipv4
route-target export 1:2
route-target import 1:2
exit-address-family
!
mpls label protocol ldp
!
interface Loopback0
ip address 21.21.21.21 255.255.255.255
ip ospf 1 area 0
!
interface GigabitEthernet1
mtu 1600
ip address 20.11.12.11 255.255.255.0
ip ospf network point-to-point
ip ospf 1 area 0
no shutdown
!
interface GigabitEthernet2
vrf forwarding A
ip address 172.16.2.1 255.255.255.252
no shutdown
!
interface GigabitEthernet3
vrf forwarding B
ip address 172.16.2.5 255.255.255.252
no shutdown
!
router ospf 2
router-id 21.21.21.21
passive-interface default
no passive-interface GigabitEthernet1
mpls ldp sync
mpls ldp autoconfig area 0
!
router bgp 2
bgp router-id 21.21.21.21
bgp log-neighbor-changes
no bgp default ipv4-unicast
neighbor 23.23.23.23 remote-as 2
neighbor 23.23.23.23 update-source Loopback0
!
address-family ipv4
exit-address-family
!
address-family vpnv4
neighbor 23.23.23.23 activate
neighbor 23.23.23.23 send-community extended
exit-address-family
!
address-family ipv4 vrf A
redistribute connected
neighbor 172.16.2.2 remote-as 65102
neighbor 172.16.2.2 activate
exit-address-family
!
address-family ipv4 vrf B
redistribute connected
neighbor 172.16.2.6 remote-as 65202
neighbor 172.16.2.6 activate
exit-address-family
!
mpls ldp router-id Loopback0
!
P2
!
hostname P2
!
mpls label protocol ldp
!
interface Loopback0
ip address 22.22.22.22 255.255.255.255
ip ospf 2 area 0
!
interface GigabitEthernet1
mtu 1600
ip address 20.21.22.22 255.255.255.0
ip ospf network point-to-point
ip ospf 2 area 0
no shutdown
!
interface GigabitEthernet2
mtu 1600
ip address 20.22.23.22 255.255.255.0
ip ospf network point-to-point
ip ospf 2 area 0
no shutdown
interface GigabitEthernet3
mtu 1600
ip address 20.22.24.22 255.255.255.0
ip ospf network point-to-point
ip ospf 2 area 0
no shutdown
!
router ospf 2
router-id 22.22.22.22
passive-interface default
no passive-interface GigabitEthernet1
no passive-interface GigabitEthernet2
no passive-interface GigabitEthernet3
mpls ldp sync
mpls ldp autoconfig area 0
!
mpls ldp router-id Loopback0
!
ASBR1#show bgp vpnv4 unicast all
BGP table version is 9, local router ID is 14.14.14.14
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: 1:1
*>i 172.16.1.0/30 11.11.11.11 0 100 0 ?
*> 172.16.2.0/30 172.16.0.2 0 2 ?
*>i 192.168.1.1/32 11.11.11.11 0 100 0 65101 i
*> 192.168.1.2/32 172.16.0.2 0 2 65102 i
Route Distinguisher: 1:2
*>i 172.16.1.4/30 11.11.11.11 0 100 0 ?
*> 172.16.2.4/30 172.16.0.2 0 2 ?
*>i 192.168.2.1/32 11.11.11.11 0 100 0 65201 i
*> 192.168.2.2/32 172.16.0.2 0 2 65202 i
ASBR1#
ASBR1#
ASBR1#show bgp vpnv4 unicast all 192.168.1.2/32
BGP routing table entry for 1:1:192.168.1.2/32, version 7
Paths: (1 available, best #1, no table)
Advertised to update-groups:
7
Refresh Epoch 1
2 65102
172.16.0.2 (via default) from 172.16.0.2 (24.24.24.24)
Origin IGP, localpref 100, valid, external, best
Extended Community: RT:1:1
mpls labels in/out 29/23
rx pathid: 0, tx pathid: 0x0
Updated on Oct 11 2022 04:06:20 UTC
ASBR1#
ASBR1#
ASBR1#show bgp vpnv4 unicast all 192.168.2.2/32
BGP routing table entry for 1:2:192.168.2.2/32, version 9
Paths: (1 available, best #1, no table)
Advertised to update-groups:
7
Refresh Epoch 1
2 65202
172.16.0.2 (via default) from 172.16.0.2 (24.24.24.24)
Origin IGP, localpref 100, valid, external, best
Extended Community: RT:1:2
mpls labels in/out 28/25
rx pathid: 0, tx pathid: 0x0
Updated on Oct 11 2022 04:06:20 UTC
ASBR1#
ASBR2
ASBR2#show bgp vpnv4 unicast all
BGP table version is 9, local router ID is 24.24.24.24
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: 1:1
*> 172.16.1.0/30 172.16.0.1 0 1 ?
*>i 172.16.2.0/30 21.21.21.21 0 100 0 ?
*> 192.168.1.1/32 172.16.0.1 0 1 65101 i
*>i 192.168.1.2/32 21.21.21.21 0 100 0 65102 i
Route Distinguisher: 1:2
*> 172.16.1.4/30 172.16.0.1 0 1 ?
*>i 172.16.2.4/30 21.21.21.21 0 100 0 ?
*> 192.168.2.1/32 172.16.0.1 0 1 65201 i
*>i 192.168.2.2/32 21.21.21.21 0 100 0 65202 i
ASBR2#
ASBR2#show bgp vpnv4 unicast all 192.168.1.1/32
BGP routing table entry for 1:1:192.168.1.1/32, version 4
Paths: (1 available, best #1, no table)
Advertised to update-groups:
7
Refresh Epoch 1
1 65101
172.16.0.1 (via default) from 172.16.0.1 (14.14.14.14)
Origin IGP, localpref 100, valid, external, best
Extended Community: RT:1:1
mpls labels in/out 29/23
rx pathid: 0, tx pathid: 0x0
Updated on Oct 11 2022 04:06:20 UTC
ASBR2#
ASBR2#show bgp vpnv4 unicast all 192.168.2.1/32
BGP routing table entry for 1:2:192.168.2.1/32, version 8
Paths: (1 available, best #1, no table)
Advertised to update-groups:
7
Refresh Epoch 1
1 65201
172.16.0.1 (via default) from 172.16.0.1 (14.14.14.14)
Origin IGP, localpref 100, valid, external, best
Extended Community: RT:1:2
mpls labels in/out 28/25
rx pathid: 0, tx pathid: 0x0
Updated on Oct 11 2022 04:06:20 UTC
ASBR2#