OcNOS SP : Multi-Protocol Label Switching Guide : Multi-Protocol Label Switching Configuration : Inter-AS VPN Option-C Configuration
Inter-AS VPN Option-C Configuration
This is an option which enables BGP VPNv4 routes exchange between the two or more Provider Edge routers residing in different AS'es. There is no VPNv4 route exchange between the ASBRs and hence the ASBRs are completely transparent of the VPNs provisioned on the connecting AS'es. This option is more scalable than the previous two options because it removes the restriction of installing VPNv4 LFIB entries on the ASBRs hence reducing the resource requirements on them. ASBRs are only required to forward data based on the transport LSPs configured.
Pre-requisites to successfully configure this option.
There should be end to end transport LSP between the two PE's residing in different AS'es.
Could use BGP Labeled-unicast to exchange labels for the two PE's residing in different AS'es.
This option can utilize RR's to exchange VPNv4 routes between the two AS'es and hence should have capability to keep the next-hops unchanged when reflecting routes from iBGP to eBGP
LDP/RSVP/SR can be used as a transport within the AS.
There are multiple ways in which this option can be configured.
Inter-AS Option-C with VPNv4 Routes exchange between the two RRs in different AS'es
Inter-AS Option-C with VPNv4 Routes exchange between two PE's in different AS.
Inter-AS Option-C with VPNv4 Routes exchange between PE of one AS and RR of another AS.
This section explains the configuration for the first two points.
Inter-AS Option-C with RR
This sub-option enables VPNv4 routes exchange between the Route-Reflectors of different AS'es and thus requires
1. Remote PE loopback addresses to be known in the AS - This is accomplished using BGP-LU and is advertised inside the AS using the Route-reflector and outside the AS using the eBGP Peering between the ASBRs.
2. MP-eBGP peering between the two RRs of different AS'es in order to exchange VPNv4 routes.
3. To be able to have an eBGP session between RR's, Remote Route-reflector Loopback addresses are required to be known in the local AS and vice-versa. This is accomplished using the mutual redistribution between OSPF and bgp on the two ASBRs. The redistribution is controlled using the route-maps and only permits the
1. Local Route-reflectors Loopback address to be redistributed from local OSPF to BGP.
2. Remote Route-reflectors Loopback address to be redistributed from bgp to local OSPF.
4. Next-hop attribute should not be changed when RR reflects the VPNv4 route from iBGP peering to the remote RR over an eBGP peering. This is accomplished using the configuration "attribute-unchanged next-hop" for the eBGP neighbor.
5. Next-hop attribute should be changed when ASBR advertises the remote PE's Loopback address as LU route to the RR. This is accomplished using the configuration "next-hop self" for the iBGP RR neighbor
(1) and (5) enables an end to end LSP between the two PE's which needs to run the L3VPN service and (2), (3) and (4) enables the RR's to form BGP neighborship with each other and successfully exchange the VPNv4 Routes.
 
Topology
InterAS-VPN Option-C with RR
PE1
 
PE1(#configure terminal
Enter configure mode.
PE1(config-router)#interface lo
Enter interface mode.
PE1(config-if)# ip address 41.41.41.41/32 secondary
Assign the IPv4 address.
PE1(config-if)#exit
Exit interface mode.
PE1(config)#ip vrf vrf1
Create a new VRF named vrf1.
PE1(config-vrf)# rd 1:1
Assign the route distinguisher (RD) value as 1:1.
PE1(config-vrf)# route-target both 1:1
Configure import and export route-target values
PE1(config-vrf)#exit
Exit VRF mode.
PE1(config-if)#interface xe23
Enter interface mode.
PE1(config-if)# ip vrf forwarding vrf1
Bind the interface connected to the CE router with VRF vrf1.
PE1(config-if)# ip address 10.1.1.2/24
Assign the IPv4 address.
PE1(config-if)#exit
Exit interface mode.
PE1(config-if)#interface xe15
Enter interface mode.
PE1(config-if)# ip address 11.1.1.2/24
Assign the IPv4 address.
PE1(config-if)#exit
Exit interface mode.
PE1(config-if)#router ospf 1
Enter router OSPF mode.
PE1(config-router)# ospf router-id 41.41.41.41
Configure OSPF router id same as loopback ip address.
PE1(config-router)# network 11.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE1(config-router)# network 41.41.41.41/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE1(config)#router ldp
Enter router LDP mode.
PE1(config-router)#router-id 41.41.41.41
Set the router ID to IP address 41.41.41.41
PE1(config-router)#transport-address ipv4 41.41.41.41
Configure LDP transport address same as loopback address.
PE1(config-router)#exit
Exit LDP mode.
PE1(config-if)#interface xe15
Enter interface mode.
PE1(config-if)# label-switching
Enable label switching in interface.
PE1(config-if)# enable-ldp ipv4
Enable LDP in interface.
PE1(config-if)#exit
Exit interface mode.
PE1(config-router)#router bgp 65000
Enter BGP router mode.
PE1(config-router)# bgp router-id 41.41.41.41
Configure BGP router-id.
PE1(config-router)# no bgp default ipv4-unicast
Configure BGP peer to have no ipv4 unicast capability exchange by default.
PE1(config-router)# neighbor 31.31.31.31 remote-as 65000
Configure neighbor with remote AS.
PE1(config-router)# neighbor 31.31.31.31 update-source lo
Update the loopback as the source of BGP session.
PE1(config-router)# allocate-label all
Allocate the label for all advertised networks.
PE1(config-router)# address-family ipv4 labeled-unicast
Enter the IPv4 labeled-unicast address family
PE1(config-router-af)# neighbor 31.31.31.31 activate
Activate the neighbor under the address-family.
PE1(config-router-af)# exit-address-family
Exit IPv4 labeled-unicast Address Family mode.
PE1(config-router)# address-family vpnv4 unicast
Enter vpnv4 unicast address-family mode.
PE1(config-router-af)# neighbor 31.31.31.31 activate
Activate the neighbor under vpnv4 unicast address-family.
PE1(config-router-af)# exit-address-family
Exit vpnv4 unicast address-family.
PE1(config-router)# address-family ipv4 vrf vrf1
Enter ipv4 VRF address-family mode.
PE1(config-router-af)# redistribute connected
Redistribute connected networks under VRF address-family.
PE1(config-router-af)# exit-address-family
Exit ipv4 VRF address-family.
PE1(config-router)#exit
Exit the router mode.
PE1(config)#commit
Commit candidate configuration to be running configuration.
PE1(config)#exit
Exit the config mode.
P1
 
P1(config)#interface lo
Enter interface mode.
P1(config-if)# ip address 51.51.51.51/32 secondary
Assign the secondary IPv4 address on loopback interface.
P1(config-if)#interface xe15
Enter interface mode.
P1(config-if)# ip address 11.1.1.31/24
Assign the IPv4 address.
P1(config-if)#interface xe21
Enter interface mode.
P1(config-if)# ip address 12.1.1.31/24
Assign the IPv4 address.
P1(config-if)#interface xe22
Enter interface mode.
P1(config-if)# ip address 13.1.1.1/24
Assign the IPv4 address.
P1(config-if)#router ospf 1
Enter router OSPF mode.
P1(config-router)# ospf router-id 51.51.51.51
Configure OSPF router-id (optional).
P1(config-router)# network 11.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol.
P1(config-router)# network 12.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol.
P1(config-router)# network 13.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol.
P1(config-router)# network 51.51.51.51/32 area 0.0.0.0
Enable networks for OSPF protocol.
P1(config-router)#router ldp
Enter router LDP mode. This is required to enable LDP globally on the router.
P1(config-router)#router-id 51.51.51.51
Set the router ID to IP address 51.51.51.51
P1(config-router)#transport-address ipv4 51.51.51.51
Configure LDP transport address same as loopback address.
P1(config-router)#interface xe15
Enter interface configuration mode.
P1(config-if)# label-switching
Configure label-switching on the interface.
P1(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P1(config-if)#interface xe21
Enter interface configuration mode.
P1(config-if)# label-switching
Configure label-switching on the interface.
P1(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P1(config-if)#exit
Exit interface mode.
P1(config)#commit
Commit candidate configuration to the running configuration.
P1(config)#exit
Exit the config mode.
RR1
 
#configure terminal
Enter configure mode.
RR1(config)#interface lo
Enter interface mode.
RR1(config-if)# ip address 31.31.31.31/32 secondary
Assign the IPv4 address.
RR1(config-if)#interface xe22
Exit interface mode.
RR1(config-if)# ip address 13.1.1.2/24
Assign the IPv4 address.
RR1(config-if)#router ospf 1
Enter router OSPF mode.
RR1(config-router)# ospf router-id 31.31.31.31
Configure OSPF router-id explicitly (optional).
RR1(config-router)# network 13.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol under area 0.
RR1(config-router)# network 31.31.31.31/32 area 0.0.0.0
Enable networks for OSPF protocol under area 0.
RR1(config-router)#router bgp 65000
Enter BGP router mode.
RR1(config-router)# bgp router-id 31.31.31.31
Configure BGP router-id.
RR1(config-router)# no bgp default ipv4-unicast
Disable default ipv4-unicast capability exchange with BGP neighbors.
RR1(config-router)# no bgp inbound-route-filter
Disable inbound route-filtering for bgp VPNV4 routes. This is required for Route-reflectors.
RR1(config-router)# neighbor 2.2.2.2 remote-as 65000
Configure PE2-ASBR as iBGP neighbor.
RR1(config-router)# neighbor 2.2.2.2 update-source lo
Configure BGP speaker to use loopback address as source for BGP session.
RR1(config-router)# neighbor 5.5.5.5 remote-as 65001
Configure RR2 as an eBGP neighbor.
RR1(config-router)# neighbor 5.5.5.5 ebgp-multihop
Enable multihop on eBGP session.
RR1(config-router)# neighbor 5.5.5.5 update-source lo
Configure BGP speaker to use loopback address as source for this BGP session.
RR1(config-router)# neighbor 41.41.41.41 remote-as 65000
Configure PE1 as an iBGP neighbor.
RR1(config-router)# neighbor 41.41.41.41 update-source lo
Configure BGP speaker to use loopback address as source for this BGP session.
RR1(config-router)# allocate-label all
Configure this peer to allocate label for all advertised networks.
RR1(config-router)# address-family ipv4 labeled-unicast
Enter ipv4 labeled-unicast address-family.
RR1(config-router-af)# neighbor 2.2.2.2 activate
Activate PE2-ASBR for this AFI/SAFI.
RR1(config-router-af)# neighbor 2.2.2.2 route-reflector-client
Configure PE2-ASBR as Route-reflector client.
RR1(config-router-af)# neighbor 41.41.41.41 activate
Activate PE1 for this AFI/SAFI.
RR1(config-router-af)# neighbor 41.41.41.41 route-reflector-client
Configure PE1 as Route-reflector client.
RR1(config-router-af)# exit-address-family
Exit ipv4 labeled-unicast address-family.
RR1(config-router)# address-family vpnv4 unicast
Enter vpnv4 unicast address-family.
RR1(config-router-af)# neighbor 5.5.5.5 allow-ebgp-vpn
Allow eBGP VPN route exchange for the RR2 eBGP neighbor.
RR1(config-router-af)# neighbor 5.5.5.5 activate
Activate the RR2 eBGP neighbor.
RR1(config-router-af)# neighbor 5.5.5.5 attribute-unchanged next-hop
Configure next-hop unchanged for this eBGP neighbor for all vpnv4 NLRIs to keep original next-hop while advertising to this eBGP neighbor.
RR1(config-router-af)# neighbor 41.41.41.41 activate
Activate PE1 iBGP neighbor.
RR1(config-router-af)# neighbor 41.41.41.41 route-reflector-client
Configure PE1 as Route-reflector client for this AFI/SAFI.
RR1(config-router-af)# exit-address-family
Exit Address-family mode.
RR1(config-router)#exit
Exit the router mode.
RR1(config)#commit
Commit candidate configuration to be running configuration.
RR1(config)#exit
Exit the config mode.
PE2-ASBR
 
PE2-ASBR#configure terminal
Enter configure mode.
PE2-ASBR(config)#interface lo
Enter interface mode.
PE2-ASBR(config-if)# ip address 2.2.2.2/32 secondary
Assign a secondary IPv4 address to the loopbacl interface.
PE2-ASBR(config-if)#interface xe20
Enter interface mode.
PE2-ASBR(config-if)# ip address 12.1.1.2/24
Assign an IPv4 address to the interface.
PE2-ASBR(config-if)#interface xe5
Enter interface mode.
PE2-ASBR(config-if)# ip address 20.1.1.2/24
Assign an IPv4 address to the interface.
PE2-ASBR(config-if)#ip access-list standard RR1_LO
Create an IP standard access list to permit RR1s loopbacl address. This is required to redistribute RR1 Lo from OSPF to BGP.
PE2-ASBR(config-ip-acl-std)# permit host 31.31.31.31
Permit RR1 loopback address.
PE2-ASBR(config-ip-acl-std)#ip access-list standard RR2_LO
Create an IP standard access list to permit RR2 Lo address. This is required to redistribute RR2 Lo from BGP to OSPF.
PE2-ASBR(config-ip-acl-std)# permit host 5.5.5.5
Permit RR2s Loopback address.
PE2-ASBR(config-ip-acl-std)#route-map RR1_LO permit 10
Create a Route-map to allow RR1-LO address . This is required when redistributing from OSPF to BGP.
PE2-ASBR(config-route-map)# match ip address RR1_LO
match the RR1_LO access list.
PE2-ASBR(config-route-map)#route-map RR2_LO permit 10
Create a Route-map to allow RR2-LO address . This is required when redistributing from BGP to OSPF.
PE2-ASBR(config-route-map)# match ip address RR2_LO
match the RR2_LO access list.
PE2-ASBR(config-route-map)#router ospf 1
Enter router OSPF mode.
PE2-ASBR(config-router)# ospf router-id 2.2.2.2
Configure OSPF router-id explicitly (optional).
PE2-ASBR(config-router)# redistribute bgp route-map RR2_LO
Redistribute RR2's Lo from BGP to OSPF. This is required for eBGP session between RR1 and RR2.
PE2-ASBR(config-router)# network 2.2.2.2/32 area 0.0.0.0
Enable OSPF networks/links in area 0.
PE2-ASBR(config-router)# network 12.1.1.0/24 area 0.0.0.0
Enable OSPF networks/links in area 0.
PE2-ASBR(config-router)#router ldp
Enter Router ldp mode. This is required to enable ldp globally on the router.
PE2-ASBR(config-router)#router-id 2.2.2.2
Set the router ID to IP address 2.2.2.2
PE2-ASBR(config-router)#transport-address ipv4 2.2.2.2
Configure LDP transport address same as loopback address.
PE2-ASBR(config-router)#interface xe20
Enter interface mode.
PE2-ASBR(config-if)# label-switching
Configure label-switching to enable MPLS forwarding on this interface.
PE2-ASBR(config-if)# enable-ldp ipv4
Enable LDP on this interface.
PE2-ASBR(config-if)#interface xe5
Enter interface mode.
PE2-ASBR(config-if)# label-switching
Configure label-switching to enable MPLS forwarding on this interface.
PE2-ASBR(config-if)#router bgp 65000
Enter router BGP configuration mode.
PE2-ASBR(config-router)# bgp router-id 2.2.2.2
Configure BGP router-id.
PE2-ASBR(config-router)# no bgp default ipv4-unicast
Configure BGP to disable default exchange of ipv4 unicast AFI/SAFI capability.
PE2-ASBR (config-router)# address-family ipv4 unicast
Enter address-family ipv4 unicast mode
PE2-ASBR(config-router-af)# redistribute ospf route-map RR1_LO
Redistribute RR1 Lo from OSPF to BGP. This is required for eBGP session between RR1 and RR2.
PE2-ASBR(config-router-af)#exit
Exit address-family mode
PE2-ASBR(config-router)# neighbor 20.1.1.40 remote-as 65001
Configure PE3-ASBR as eBGP neighbor.
PE2-ASBR(config-router)# neighbor 20.1.1.40 activate
Activate PE3-ASBR neighbor for IPv4 unicast AFI/SAFI. This is required to exchange the redistributed RR1 Lo prefix to PE3-ASBR eBGP peer.
PE2-ASBR(config-router)# neighbor 31.31.31.31 remote-as 65000
Configure RR1 as an iBGP neighbor.
PE2-ASBR(config-router)# neighbor 31.31.31.31 update-source lo
Update the source of the iBGP session to loopbacl address.
PE2-ASBR(config-router)# allocate-label all
Configure this command to allocate label for all advertised networks.
PE2-ASBR(config-router)# address-family ipv4 labeled-unicast
Enter ipv4 labeled-unicast AFI/SAFI.
PE2-ASBR(config-router-af)# neighbor 20.1.1.40 activate
Activate PE3-ASBR neighbor for IPv4 labeled-unicast.
PE2-ASBR(config-router-af)# neighbor 31.31.31.31 activate
Activate RR1 neighbor for IPv4 labeled-unicast.
PE2-ASBR(config-router-af)# neighbor 31.31.31.31 next-hop-self
Configure next-hop-self for the RR1 neighbor.
PE2-ASBR(config-router-af)# exit-address-family
Exit this address-family.
PE2-ASBR(config-router)#exit
Exit the router mode.
PE2-ASBR (config)#commit
Commit candidate configuration to be running configuration.
PE2-ASBR(config)#exit
Exit the config mode.
PE3-ASBR
 
#configure terminal
Enter configure mode.
PE3-ASBR(config)#interface lo
Enter interface mode.
PE3-ASBR(config-if)# ip address 40.40.40.40/32 secondary
Assign a secondary IPv4 address to the loopbacl interface.
PE3-ASBR(config-if)#interface xe5
Enter interface mode.
PE3-ASBR(config-if)# ip address 20.1.1.40/24
Assign an IPv4 address to the interface.
PE3-ASBR(config-if)#interface xe1
Enter interface mode.
PE3-ASBR(config-if)# ip address 21.1.1.40/24
Assign an IPv4 address to the interface.
PE3-ASBR(config-if)#ip access-list standard RR1_LO
Create an IP standard access list to permit RR1s loopbacl address. This is required to redistribute RR1 Lo from BGP to OSPF.
PE3-ASBR(config-ip-acl-std)# permit host 31.31.31.31
Permit RR1 loopback address.
PE3-ASBR(config-ip-acl-std)#ip access-list standard RR2_LO
Create an IP standard access list to permit RR2 Lo address. This is required to redistribute RR2 Lo from OSPF to BGP.
PE3-ASBR(config-ip-acl-std)# permit host 5.5.5.5
Permit RR2s Loopback address.
PE3-ASBR(config-ip-acl-std)#route-map RR1_LO permit 10
Create a Route-map to allow RR1-LO address . This is required when redistributing from BGP to OSPF.
PE3-ASBR(config-route-map)# match ip address RR1_LO
match the RR1_LO access list.
PE3-ASBR(config-route-map)#route-map RR2_LO permit 10
Create a Route-map to allow RR2-LO address . This is required when redistributing from OSPF to BGP.
PE3-ASBR(config-route-map)# match ip address RR2_LO
match the RR2_LO access list.
PE3-ASBR(config-route-map)#router ospf 1
Enter router OSPF mode.
PE3-ASBR(config-router)# ospf router-id 40.40.40.40
Configure OSPF router-id explicitly (optional).
PE3-ASBR(config-router)# redistribute bgp route-map RR1_LO
Redistribute RR2's Lo from OSPF to BGP. This is required for eBGP session between RR1 and RR2.
PE3-ASBR(config-router)# network 21.1.1.0/24 area 0.0.0.0
Enable OSPF networks/links in area 0.
PE3-ASBR(config-router)# network 40.40.40.40/32 area 0.0.0.0
Enable OSPF networks/links in area 0.
PE3-ASBR(config-router)#router ldp
Enter Router LDP mode. This is required to enable LDP globally on the router.
PE3-ASBR(config-router)#router-id 40.40.40.40
Set the router ID to IP address 40.40.40.40
PE3-ASBR(config-router)#transport-address ipv4 40.40.40.40
Configure LDP transport address same as loopback address
PE3-ASBR(config-router)#interface xe5
Enter interface mode.
PE3-ASBR(config-if)# label-switching
Configure label-switching to enable MPLS forwarding on this interface.
PE3-ASBR(config-if)#interface xe1
Enter interface mode.
PE3-ASBR(config-if)# label-switching
Configure label-switching to enable MPLS forwarding on this interface.
PE3-ASBR(config-if)# enable-ldp ipv4
Enable LDP on this interface.
PE3-ASBR(config-if)#router bgp 65001
Enter router BGP configuration mode.
PE3-ASBR(config-router)# bgp router-id 40.40.40.40
Configure BGP router-id.
PE3-ASBR(config-router)# no bgp default ipv4-unicast
Configure BGP to disable default exchange of ipv4 unicast AFI/SAFI capability.
PE3-ASBR(config-router)# redistribute ospf route-map RR2_LO
Redistribute RR2 Lo from OSPF to BGP. This is required for eBGP session between RR1 and RR2.
PE3-ASBR(config-router)# neighbor 5.5.5.5 remote-as 65001
Configure RR2 as eBGP neighbor.
PE3-ASBR(config-router)# neighbor 5.5.5.5 update-source lo
Update the source of the iBGP session to loopback address.
PE3-ASBR(config-router)# neighbor 20.1.1.2 remote-as 65000
Configure PE2-ASBR as an eBGP neighbor.
PE3-ASBR(config-router)# neighbor 20.1.1.2 activate
Activate PE2-ASBR neighbor for IPv4 unicast AFI/SAFI. This is required to exchange the redistributed RR1 Lo prefix to PE2-ASBR eBGP peer.
PE3-ASBR(config-router)# allocate-label all
Configure this command to allocate label for all advertised networks.
PE3-ASBR(config-router)# address-family ipv4 labeled-unicast
Enter ipv4 labeled-unicast AFI/SAFI.
PE3-ASBR(config-router-af)# neighbor 5.5.5.5 activate
Activate RR1 neighbor for IPv4 labeled-unicast.
PE3-ASBR(config-router-af)# neighbor 5.5.5.5 next-hop-self
Configure next-hop-self for the RR2 neighbor.
PE3-ASBR(config-router-af)# neighbor 20.1.1.2 activate
Activate PE2-ASBR neighbor for IPv4 labeled-unicast.
PE3-ASBR(config-router-af)# ex-it-address-family
Exit this address-family.
PE3-ASBR(config-router)#exit
Exit the router mode.
PE3-ASBR(config)#commit
Commit candidate configuration to be running configuration.
PE3-ASBR(config)#exit
Exit the config mode.
RR2
 
#configure terminal
Enter configure mode.
RR2(config)#interface lo
Enter interface mode.
RR2(config-if)# ip address 5.5.5.5/32 secondary
Assign the IPv4 address.
RR2(config-if)#interface xe22
Enter interface mode.
RR2(config-if)# ip address 23.1.1.2/24
Assign the IPv4 address.
RR2(config-if)#router ospf 1
Enter router OSPF mode.
RR2(config-router)# ospf router-id 5.5.5.5
Configure OSPF router-id explicitly (optional).
RR2(config-router)# network 5.5.5.5/32 area 0.0.0.0
Enable networks for OSPF protocol under area 0.
RR2(config-router)# network 23.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol under area 0.
RR2(config-router)#router bgp 65001
Enter BGP router mode.
RR2(config-router)# bgp router-id 5.5.5.5
Configure BGP router-id.
RR2(config-router)# no bgp default ipv4-unicast
Disable default ipv4-unicast capability exchange with BGP neighbors.
RR2(config-router)# no bgp inbound-route-filter
Disable inbound route-filtering for bgp VPNV4 routes. This is required for Route-reflectors.
RR2(config-router)# neighbor 28.28.28.28 remote-as 65001
Configure PE2-ASBR as iBGP neighbor.
RR2(config-router)# neighbor 28.28.28.28 update-source lo
Configure BGP speaker to use loopback address as source for BGP session.
RR2(config-router)# neighbor 31.31.31.31 remote-as 65000
Configure RR2 as an eBGP neighbor.
RR2(config-router)# neighbor 31.31.31.31 ebgp-multihop
Enable multihop on eBGP session.
RR2(config-router)# neighbor 31.31.31.31 update-source lo
Configure BGP speaker to use loopback address as source for this BGP session.
RR2(config-router)# neighbor 40.40.40.40 remote-as 65001
Configure PE1 as an iBGP neighbor.
RR2(config-router)# neighbor 40.40.40.40 update-source lo
Configure BGP speaker to use loopback address as source for this BGP session.
RR2(config-router)# allocate-label all
Configure this peer to allocate label for all advertised networks.
RR2(config-router)# address-family ipv4 labeled-unicast
Enter ipv4 labeled-unicast address-family.
RR2(config-router-af)# neighbor 28.28.28.28 activate
Activate PE2-ASBR for this AFI/SAFI.
RR2(config-router-af)# neighbor 28.28.28.28 route-reflector-client
Configure PE2-ASBR as Route-reflector client.
RR2(config-router-af)# neighbor 40.40.40.40 activate
Activate PE1 for this AFI/SAFI.
RR2(config-router-af)# neighbor 40.40.40.40 route-reflector-client
Configure PE1 as Route-reflector client.
RR2(config-router-af)# exit-address-family
Exit ipv4 labeled-unicast address-family.
RR2(config-router)# address-family vpnv4 unicast
Enter vpnv4 unicast address-family.
RR2(config-router-af)# neighbor 28.28.28.28 activate
Allow eBGP vpn route exchange for the RR2 eBGP neighbor.
RR2(config-router-af)# neighbor 28.28.28.28 route-reflector-client
Activate the RR2 eBGP neighbor.
RR2(config-router-af)# neighbor 31.31.31.31 allow-ebgp-vpn
Configure next-hop unchanged for this eBGP neighbor for all vpnv4 NLRIs to keep original next-hop while advertising to this eBGP neighbor.
RR2(config-router-af)# neighbor 31.31.31.31 activate
Activate PE1 iBGP neighbor.
RR2(config-router-af)# neighbor 31.31.31.31 attribute-unchanged next-hop
Configure PE1 as Route-reflector client for this AFI/SAFI.
RR2(config-router-af)# exit-address-family
Exit Address-family mode.
RR2(config-router)#exit
Exit the router mode.
RR2(config)#commit
Commit candidate configuration to be running configuration.
RR2(config)#exit
Exit the config mode.
P2
 
P2(config)#interface lo
Enter interface mode.
P2(config-if)# ip address 6.6.6.6/32 secondary
Assign the secondary IPv4 address on loopback interface.
P2(config-if)#interface xe22
Enter interface mode.
P2(config-if)# ip address 23.1.1.1/24
Assign the IPv4 address.
P2(config-if)#interface xe0
Enter interface mode.
P2(config-if)# ip address 21.1.1.5/24
Assign the IPv4 address.
P2(config-if)#interface xe11
Enter interface mode.
P2(config-if)# ip address 22.1.1.5/24
Assign the IPv4 address.
P2(config-if)#router ospf 1
Enter router OSPF mode.
P2(config-router)# ospf router-id 6.6.6.6
Configure OSPF router-id (optional).
P2(config-router)# network 6.6.6.6/32 area 0.0.0.0
Enable networks for OSPF protocol.
P2(config-router)# network 21.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol.
P2(config-router)# network 22.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol.
P2(config-router)# network 23.1.1.0/24 area 0.0.0.0
Enable networks for OSPF protocol.
P2(config-router)#router ldp
Enter router ldp mode. This is required to enable LDP globally on the router.
P2(config-router)#router-id 6.6.6.6
Set the router ID to IP address 6.6.6.6
P2(config-router)#transport-address ipv4 6.6.6.6
Configure LDP transport address same as loopback address.
P2(config-router)#interface xe0
Enter interface configuration mode.
P2(config-if)# label-switching
Configure label-switching on the interface.
P2(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P2(config-if)#interface xe11
Enter interface configuration mode.
P2(config-if)# label-switching
Configure label-switching on the interface.
P2(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P2(config-if)#exit
Exit interface mode.
P2(config)#commit
Commit candidate configuration to be running configuration.
P2(config)#exit
Exit the config mode.
PE4
 
#configure terminal
Enter configure mode.
PE4(config)#interface lo
Enter interface mode.
PE4(config-if)# ip address 28.28.28.28/32 secondary
Assign the secondary IPv4 address on the loopback interface.
PE4(config-if)#ip vrf vrf1
Create a new VRF named vrf1.
PE4(config-vrf)# rd 1:1
Assign the route distinguisher (RD) value as 1:1.
PE4(config-vrf)# route-target both 1:1
Configure import and export route-target values.
PE4(config-vrf)#interface xe21
Enter interface mode.
PE4(config-if)# ip vrf forwarding vrf1
Bind the interface connected to the CE router with VRF vrf1.
PE4(config-if)# ip address 30.1.1.1/24
Assign the IPv4 address.
PE4(config-if)#interface xe11
Enter interface mode.
PE4(config-if)# ip address 22.1.1.28/24
Assign the IPv4 address.
PE4(config-if)#router ospf 1
Enter router OSPF mode.
PE4(config-router)# ospf router-id 28.28.28.28
Configure OSPF router id same as loopback ip address.
PE4(config-router)# network 22.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE4(config-router)# network 28.28.28.28/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE4(config-router)#router ldp
Enter router LDP mode.
PE4(config-router)#router-id 28.28.28.28
Set the router ID to IP address 28.28.28.28
PE4(config-router)#transport-address ipv4 28.28.28.28
Configure LDP transport address same as loopback address.
PE4(config-router)#interface xe11
Enter interface mode.
PE4(config-if)# label-switching
Enable label switching in interface.
PE4(config-if)# enable-ldp ipv4
Enable LDP in interface.
PE4(config-if)#router bgp 65001
Enter BGP router mode.
PE4(config-router)# bgp router-id 28.28.28.28
Configure BGP router-id.
PE4(config-router)# no bgp default ipv4-unicast
Configure BGP peer to have no ipv4 unicast capability exchange by default.
PE4(config-router)# address-family ipv4 unicast
Enter the IPv4 unicast address family.
PE4(config-router-af)# network 28.28.28.28/32
advertise the network of this BGP speaker.
PE4(config-router-af)# exit-address-family
Exit address family mode.
PE4(config-router)# neighbor 5.5.5.5 remote-as 65001
configure neighbor with remote AS.
PE4(config-router)# neighbor 5.5.5.5 update-source lo
Update the loopback as the source of BGP session.
PE4(config-router)# allocate-label all
Allocate the label for all advertised networks.
PE4(config-router)# address-family ipv4 labeled-unicast
Enter the IPv4 labeled-unicast address family.
PE4(config-router-af)# neighbor 5.5.5.5 activate
Activate the neighbor under the address-family.
PE4(config-router-af)# exit-address-family
Exit IPv4 labeled-unicast Address Family mode.
PE4(config-router)# address-family vpnv4 unicast
Enter vpnv4 unicast address-family mode.
PE4(config-router-af)# neighbor 5.5.5.5 activate
Activate the neighbor under vpnv4 unicast address-family.
PE4(config-router-af)# exit-address-family
Exit vpnv4 unicast address-family.
PE4(config-router)# address-family ipv4 vrf vrf1
Enter ipv4 VRF address-family mode.
PE4(config-router-af)# redistribute connected
Redistribute connected networks under VRF address-family.
PE4(config-router-af)# exit-address-family
Exit ipv4 VRF address-family.
PE4(config-router)#exit
Exit the router mode.
PE4(config)#commit
Commit candidate configuration to be running configuration.
PE4(config)#exit
Exit the config mode.
Validation
PE1
PE1#show ip bgp labeled-unicast summary
BGP router identifier 41.41.41.41, local AS number 65000
BGP table version is 5
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
31.31.31.31 4 65000 5920 5932 5 0 0 1d15h58m 3
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE1#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 5.5.5.5/32 2.2.2.2 24963 24965
*>i 28.28.28.28/32 2.2.2.2 24965 24964
*>i 31.31.31.31/32 2.2.2.2 24967 24961
*> 41.41.41.41/32 0.0.0.0 24961 -
 
PE1#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
L> 2.2.2.2/32 4 0 Yes LSP_DEFAULT 24321 xe15 No 11.1.1.31
L> 5.5.5.5/32 6 0 Yes LSP_DEFAULT 24324 xe15 No 11.1.1.31
B 5.5.5.5/32 7 0 Yes LSP_DEFAULT 24965 - No 2.2.2.2
L> 12.1.1.0/24 2 0 Yes LSP_DEFAULT 3 xe15 No 11.1.1.31
L> 13.1.1.0/24 3 0 Yes LSP_DEFAULT 3 e15 No 11.1.1.31
B> 28.28.28.28/32 9 0 Yes LSP_DEFAULT 24964 - No 2.2.2.2
L> 31.31.31.31/32 5 0 Yes LSP_DEFAULT 24322 xe15 No 11.1.1.31
B 31.31.31.31/32 11 0 Yes LSP_DEFAULT 24961 - No 2.2.2.2
L> 51.51.51.51/32 1 0 Yes LSP_DEFAULT 3 xe15 No 11.1.1.31
 
PE1#show ip bgp vpnv4 all summary
BGP router identifier 41.41.41.41, local AS number 65000
BGP table version is 2
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
31.31.31.31 4 65000 5928 5940 2 0 0 1d16h01m 1
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE1#show ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (Default for VRF vrf1)
*> l 10.1.1.0/24 0.0.0.0 0 100 32768 ?
*>il 30.1.1.0/24 28.28.28.28 0 100 0 65001 ?
Announced routes count = 1
Accepted routes count = 1
Route Distinguisher: 1:1
*>il 30.1.1.0/24 28.28.28.28 0 100 0 65001 ?
Announced routes count = 0
Accepted routes count = 1
 
PE1#show ip route vrf vrf1 database
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
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
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
> - selected route, * - FIB route, p - stale info
 
IP Route Table for VRF "vrf1"
C *> 10.1.1.0/24 is directly connected, xe23, 1d15h59m
B *> 30.1.1.0/24 [200/0] via 28.28.28.28, 1d15h47m
 
Gateway of last resort is not set
P1
P1#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
L> 2.2.2.2/32 2 24321 3 N/A xe21 12.1.1.2 LSP_DEFAULT
L> 41.41.41.41/32 1 24320 3 N/A xe15 11.1.1.2 LSP_DEFAULT
L> 31.31.31.31/32 4 24323 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 31.31.31.31/32 3 24322 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 5.5.5.5/32 5 24324 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
RR1
RR1#show ip route ospf
IP Route Table for VRF "default"
O 2.2.2.2/32 [110/3] via 13.1.1.1, xe22, 1d16h37m
O E2 5.5.5.5/32 [110/1] via 13.1.1.1, xe22, 1d16h35m
O 11.1.1.0/24 [110/2] via 13.1.1.1, xe22, 1d16h37m
O 12.1.1.0/24 [110/2] via 13.1.1.1, xe22, 1d16h37m
O 41.41.41.41/32 [110/3] via 13.1.1.1, xe22, 1d16h37m
O 51.51.51.51/32 [110/2] via 13.1.1.1, xe22, 1d16h37m
 
Gateway of last resort is not set
 
RR1#sho ip bgp labeled-unicast summary
BGP router identifier 31.31.31.31, local AS number 65000
BGP table version is 9
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 65000 7514 7654 9 0 0 1d16h11m 3
41.41.41.41 4 65000 5961 5951 9 0 0 1d16h11m 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
RR1#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 5.5.5.5/32 2.2.2.2 24320 24965
*>i 28.28.28.28/32 2.2.2.2 24323 24964
*>i 31.31.31.31/32 2.2.2.2 24327 24961
*>i 41.41.41.41/32 41.41.41.41 24326 24961
 
RR1#show ip bgp vpnv4 all summary
BGP router identifier 31.31.31.31, local AS number 65000
BGP table version is 3
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
5.5.5.5 4 65001 5729 5725 3 0 0 1d15h56m 1
41.41.41.41 4 65000 5962 5953 3 0 0 1d16h12m 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
RR1#show ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1
*>il 10.1.1.0/24 41.41.41.41 0 100 0 ?
*> 30.1.1.0/24 28.28.28.28 0 100 0 65001 ?
Announced routes count = 0
Accepted routes count = 2
PE2-ASBR
PE2-ASBR#show ip bgp labeled-unicast summary
BGP router identifier 2.2.2.2, local AS number 65000
BGP table version is 6
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
20.1.1.40 4 65001 5884 5976 6 0 0 1d16h37m 2
31.31.31.31 4 65000 5790 5794 6 0 0 1d16h15m 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
PE2-ASBR#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*> 5.5.5.5/32 20.1.1.40 24965 24965
*> 28.28.28.28/32 20.1.1.40 24964 24962
*> 31.31.31.31/32 12.1.1.31 24961 -
*>i 41.41.41.41/32 41.41.41.41 24967 24961
 
PE2-ASBR#sho mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
B> 5.5.5.5/32 6 24965 24965 N/A N/A 20.1.1.40 LSP_DEFAULT
B> 28.28.28.28/32 5 24964 24962 N/A N/A 20.1.1.40 LSP_DEFAULT
B> 31.31.31.31/32 2 24961 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
B> 41.41.41.41/32 8 24967 24961 N/A N/A 41.41.41.41 LSP_DEFAULT
 
PE2-ASBR#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
B> 5.5.5.5/32 8 0 Yes LSP_DEFAULT 24965 xe5 No 20.1.1.40
L> 11.1.1.0/24 1 0 Yes LSP_DEFAULT 3 xe20 No 12.1.1.31
L> 13.1.1.0/24 2 0 Yes LSP_DEFAULT 3 xe20 No 12.1.1.31
B> 28.28.28.28/32 7 0 Yes LSP_DEFAULT 24962 xe5 No 20.1.1.40
L> 31.31.31.31/32 5 0 Yes LSP_DEFAULT 24323 xe20 No 12.1.1.31
L> 41.41.41.41/32 3 0 Yes LSP_DEFAULT 24320 xe20 No 12.1.1.31
B 41.41.41.41/32 10 0 Yes LSP_DEFAULT 24961 - No 41.41.41.41
L> 51.51.51.51/32 4 0 Yes LSP_DEFAULT 3 xe20 No 12.1.1.31
 
PE2-ASBR#show ip route bgp
IP Route Table for VRF "default"
B 5.5.5.5/32 [20/3] via 20.1.1.40, xe5, 1d16h38m
B 28.28.28.28/32 [20/0] via 20.1.1.40, xe5, 1d16h39m
 
Gateway of last resort is not set
 
PE2-ASBR#show ip route ospf
IP Route Table for VRF "default"
O 11.1.1.0/24 [110/2] via 12.1.1.31, xe20, 1d16h59m
O 13.1.1.0/24 [110/2] via 12.1.1.31, xe20, 1d16h59m
O 31.31.31.31/32 [110/3] via 12.1.1.31, xe20, 1d16h41m
O 41.41.41.41/32 [110/3] via 12.1.1.31, xe20, 1d16h59m
O 51.51.51.51/32 [110/2] via 12.1.1.31, xe20, 1d16h59m
 
Gateway of last resort is not set
 
PE2-ASBR#show ip route connected
IP Route Table for VRF "default"
C 2.2.2.2/32 is directly connected, lo, 1d18h27m
C 12.1.1.0/24 is directly connected, xe20, 1d18h27m
C 20.1.1.0/24 is directly connected, xe5, 1d18h27m
C 127.0.0.0/8 is directly connected, lo, 1d19h32m
 
Gateway of last resort is not set
PE3-ASBR
PE3-ASBR#show ip bgp labeled-unicast summary
BGP router identifier 40.40.40.40, local AS number 65001
BGP table version is 7
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
5.5.5.5 4 65001 5729 5736 7 0 0 1d16h46m 1
20.1.1.2 4 65000 5731 5739 7 0 0 1d16h46m 2
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
PE3-ASBR#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*> 5.5.5.5/32 21.1.1.5 24965 -
*>i 28.28.28.28/32 28.28.28.28 24962 24321
*> 31.31.31.31/32 20.1.1.2 24964 24961
*> 41.41.41.41/32 20.1.1.2 24967 24967
 
PE3-ASBR#sho mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
B> 31.31.31.31/32 6 24964 24961 N/A N/A 20.1.1.2 LSP_DEFAULT
B> 28.28.28.28/32 4 24962 24321 N/A N/A 28.28.28.28 LSP_DEFAULT
B> 41.41.41.41/32 9 24967 24967 N/A N/A 20.1.1.2 LSP_DEFAULT
B> 5.5.5.5/32 7 24965 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
 
PE3-ASBR#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
L> 5.5.5.5/32 5 0 Yes LSP_DEFAULT 24320 xe1 No 21.1.1.5
L> 6.6.6.6/32 6 0 Yes LSP_DEFAULT 3 xe1 No 21.1.1.5
L> 22.1.1.0/24 7 0 Yes LSP_DEFAULT 3 xe1 No 21.1.1.5
L> 23.1.1.0/24 8 0 Yes LSP_DEFAULT 3 xe1 No 21.1.1.5
L> 28.28.28.28/32 9 0 Yes LSP_DEFAULT 24321 xe1 No 21.1.1.5
B 28.28.28.28/32 2 0 Yes LSP_DEFAULT 24321 - No 28.28.28.28
B> 31.31.31.31/32 4 0 Yes LSP_DEFAULT 24961 xe5 No 20.1.1.2
B> 41.41.41.41/32 11 0 Yes LSP_DEFAULT 24967 xe5 No 20.1.1.2
 
PE3-ASBR#show ip route bgp
IP Route Table for VRF "default"
B 31.31.31.31/32 [20/3] via 20.1.1.2, xe5, 1d16h46m
B 41.41.41.41/32 [20/0] via 20.1.1.2, xe5, 1d16h23m
 
Gateway of last resort is not set
 
PE3-ASBR#show ip route ospf
IP Route Table for VRF "default"
O 5.5.5.5/32 [110/3] via 21.1.1.5, xe1, 1d16h54m
O 6.6.6.6/32 [110/2] via 21.1.1.5, xe1, 1d16h55m
O 22.1.1.0/24 [110/2] via 21.1.1.5, xe1, 1d16h55m
O 23.1.1.0/24 [110/2] via 21.1.1.5, xe1, 1d16h54m
O 28.28.28.28/32 [110/3] via 21.1.1.5, xe1, 1d16h55m
 
PE3-ASBR#show ip route connected
IP Route Table for VRF "default"
C 20.1.1.0/24 is directly connected, xe5, 1d16h55m
C 21.1.1.0/24 is directly connected, xe1, 1d16h55m
C 40.40.40.40/32 is directly connected, lo, 1d16h55m
C 127.0.0.0/8 is directly connected, lo, 1d19h39m
 
Gateway of last resort is not set
RR2
RR2#show ip bgp labeled-unicast summary
BGP router identifier 5.5.5.5, local AS number 65001
BGP table version is 10
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
28.28.28.28 4 65001 5795 5815 10 0 0 1d17h00m 1
40.40.40.40 4 65001 5779 5787 10 0 0 1d16h54m 3
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
RR2#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 5.5.5.5/32 40.40.40.40 24325 24965
*>i 28.28.28.28/32 28.28.28.28 24322 24321
*>i 31.31.31.31/32 40.40.40.40 24324 24964
*>i 41.41.41.41/32 40.40.40.40 24327 24967
 
RR2#show ip bgp vpnv4 all summary
BGP router identifier 5.5.5.5, local AS number 65001
BGP table version is 3
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
28.28.28.28 4 65001 5796 5815 3 0 0 1d17h00m 1
31.31.31.31 4 65000 5769 5776 3 0 0 1d16h16m 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
RR2#show ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1
*> 10.1.1.0/24 41.41.41.41 0 100 0 65000 ?
*>il 30.1.1.0/24 28.28.28.28 0 100 0 ?
Announced routes count = 0
Accepted routes count = 2
 
RR2#show ip route ospf
IP Route Table for VRF "default"
O 6.6.6.6/32 [110/2] via 23.1.1.1, xe22, 1d17h02m
O 21.1.1.0/24 [110/2] via 23.1.1.1, xe22, 1d17h02m
O 22.1.1.0/24 [110/2] via 23.1.1.1, xe22, 1d17h02m
O 28.28.28.28/32 [110/3] via 23.1.1.1, xe22, 1d17h02m
O E2 31.31.31.31/32 [110/1] via 23.1.1.1, xe22, 1d16h54m
O 40.40.40.40/32 [110/3] via 23.1.1.1, xe22, 1d17h02m
 
Gateway of last resort is not set
P2
P2#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
L> 5.5.5.5/32 3 24322 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 5.5.5.5/32 1 24320 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 28.28.28.28/32 2 24321 3 N/A xe11 22.1.1.28 LSP_DEFAULT
L> 31.31.31.31/32 4 24323 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 40.40.40.40/32 5 24324 3 N/A xe0 21.1.1.40 LSP_DEFAULT
PE4
PE4#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 5.5.5.5/32 40.40.40.40 24325 24965
*> 28.28.28.28/32 0.0.0.0 24321 -
*>i 31.31.31.31/32 40.40.40.40 24324 24964
*>i 41.41.41.41/32 40.40.40.40 24327 24967
 
PE4#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
L> 5.5.5.5/32 4 0 Yes LSP_DEFAULT 24322 xe11 No 22.1.1.5
B 5.5.5.5/32 3 0 Yes LSP_DEFAULT 24965 - No 40.40.40.40
L> 6.6.6.6/32 5 0 Yes LSP_DEFAULT 3 xe11 No 22.1.1.5
L> 21.1.1.0/24 6 0 Yes LSP_DEFAULT 3 xe11 No 22.1.1.5
L> 23.1.1.0/24 7 0 Yes LSP_DEFAULT 3 xe11 No 22.1.1.5
L> 31.31.31.31/32 8 0 Yes LSP_DEFAULT 24323 xe11 No 22.1.1.5
B 31.31.31.31/32 2 0 Yes LSP_DEFAULT 24964 - No 40.40.40.40
L> 40.40.40.40/32 9 0 Yes LSP_DEFAULT 24324 xe11 No 22.1.1.5
B> 41.41.41.41/32 11 0 Yes LSP_DEFAULT 24967 - No 40.40.40.40
 
PE4#show ip bgp vpnv4 all summary
BGP router identifier 28.28.28.28, local AS number 65001
BGP table version is 2
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
5.5.5.5 4 65001 5792 5781 2 0 0 1d17h08m 1
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE4#show ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (Default for VRF vrf1)
*>il 10.1.1.0/24 41.41.41.41 0 100 0 65000 ?
*> l 30.1.1.0/24 0.0.0.0 0 100 32768 ?
Announced routes count = 1
Accepted routes count = 1
Route Distinguisher: 1:1
*>il 10.1.1.0/24 41.41.41.41 0 100 0 65000 ?
Announced routes count = 0
Accepted routes count = 1
 
PE4#show ip route vrf vrf1 database
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
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
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
> - selected route, * - FIB route, p - stale info
 
IP Route Table for VRF "vrf1"
B *> 10.1.1.0/24 [200/0] via 41.41.41.41, 1d16h23m
C *> 30.1.1.0/24 is directly connected, xe21, 1d16h35m
 
Gateway of last resort is not set
Inter-AS VPN Option-C Configuration (Without RR)
This sub-option enables VPNv4 routes exchange between the Provider Edge Routers of different AS'es and thus requires
1. Remote PE loopback addresses to be known in the AS - This is accomplished using BGP-LU and is advertised inside the AS using the Route-reflector and outside the AS using the eBGP Peering between the ASBRs.
2. Next-hop attribute should be changed when ASBR advertises the remote PE's Loopback address as LU route to the RR. This is accomplished using the configuration "next-hop self" for the iBGP RR neighbor.
3. MP-eBGP session between the two PE's in different AS's to exchange the VPNv4 routes.
(1) and (2) enables an end to end LSP between the two PE's which needs to run the L3VPN service and (3) enables the PE's in different AS'es to form BGP neighborship with each other and successfully exchange the VPNv4 Routes.
Topology
InterAS-VPN Option-C without RR
PE1
 
#configure terminal
Enter configure mode.
PE1(config)#interface lo
Enter interface mode.
PE1(config-if)#ip address 41.41.41.41/32 secondary
Assign the IPv4 address.
PE1(config-if)#exit
Exit interface mode.
PE1(config)#ip vrf vrf1
Create a new VRF named vrf1.
PE1(config-vrf)#rd 1:1
Assign the route distinguisher (RD) value as 1:1.
PE1(config-vrf)#route-target both 1:1
Configure import and export RT for this VRF.
PE1(config-vrf)#exit
Exit interface mode.
PE1(config)#interface xe23
Enter interface mode.
PE1(config-if)#ip vrf forwarding vrf1
Bind the interface connected to the CE router with VRF vrf1.
PE1(config-if)#ip address 10.1.1.1/24
Assign the IPv4 address.
PE1(config)#interface xe15
Enter interface mode.
PE1(config-if)#ip address 11.1.1.41/24
Assign the IPv4 address.
PE1(config-if)#exit
Exit interface mode.
PE1(config)#router ospf 1
Enter router OSPF mode.
PE1(config-router)#ospf router-id 41.41.41.41
Configure OSPF router id same as loopback ip address.
PE1(config-router)#network 11.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE1(config-router)#network 41.41.41.41/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE1(config-router)#exit
Exit OSPF router mode.
PE1(config-router)#router ldp
Enter router LDP mode.
PE1(config-router)#router-id 41.41.41.41
Set the router ID to IP address 41.41.41.41
PE1(config-router)#transport-address ipv4 41.41.41.41
Configure LDP transport address same as loopback address
PE1(config-router)#exit
Exit LDP mode.
(config)#interface xe15
Enter interface mode.
(config-if)#label-switching
Enable label switching in interface.
(config-if)#enable-ldp ipv4
Enable LDP in interface.
(config-if)#exit
Exit interface mode.
PE1(config-if)#router bgp 65000
Enter BGP router mode.
PE1(config-router)# bgp router-id 41.41.41.41
Configure BGP router-id.
PE1(config-router)# no bgp default ipv4-unicast
Configure BGP peer to have no ipv4 unicast capability exchange by default.
PE1(config-router)# address-family ipv4 unicast
Enter address-family ipv4 unicast.
PE1(config-router-af)# network 41.41.41.41/32
Advertise loopback address.
PE1(config-router-af)# exit-address-family
Exit address-family ipv4 labeled-unicast.
PE1(config-router)# neighbor 2.2.2.2 re-mote-as 65000
Configure PE2-ASBR1 as an iBGP peer.
PE1(config-router)# neighbor 2.2.2.2 up-date-source lo
Update the source as loopback for iBGP peering with the remote PE2 router.
PE1(config-router)# neighbor 28.28.28.28 remote-as 65001
Configure PE4 as an eBGP peer.
PE1(config-router)# neighbor 28.28.28.28 ebgp-multihop
Configure eBGP multichip for eBGP peer PE4.
PE1(config-router)# neighbor 28.28.28.28 update-source lo
Update the source as loopback for eBGP peering with the remote PE4 router.
PE1(config-router)# allocate-label all
Configure allocate-label.
PE1(config-router)# address-family ipv4 la-beled-unicast
Enter address-family ipv4 labeled-unicast.
PE1(config-router-af)# neighbor 2.2.2.2 ac-tivate
Activate iBGP neighbor.
PE1(config-router-af)# exit-address-family
Exit address-family ipv4 labeled-unicast.
PE1(config-router)# address-family vpnv4 unicast
Enter address-family vpnv4.
PE1(config-router-af)# neighbor 28.28.28.28 allow-ebgp-vpn
Configure allow-ebgp-vpn for ebgp neighbor PE4.
PE1(config-router-af)# neighbor 28.28.28.28 activate
Activate eBGP neighbor PE4.
PE1(config-router-af)# exit-address-family
Exit address-family vpnv4.
PE1(config-router)# address-family ipv4 vrf vrf1
Enter the IPv4 address family for VRF vrf1.
PE1(config-router-af)# redistribute con-nected
Redistribute connected route.
PE1(config-router-af)# exit-address-family
Exit IPv4 VRF Address Family mode.
PE1(config-router)#exit
Exit the router mode.
PE1(config)#commit
Commit candidate configuration to be running configuration.
PE1(config)#exit
Exit the config mode.
P1
 
P1#configure terminal
Enter configure mode.
P1(config)#interface lo
Enter interface mode.
P1(config-if)# ip address 51.51.51.51/32 secondary
Assign the IPv4 address.
P1(config-if)#exit
Exit interface mode.
P1(config)#interface xe15
Enter interface mode.
P1(config-if)#ip address 11.1.1.31/24
Assign the IPv4 address.
P1(config-if)#exit
Exit interface mode.
P1(config)#interface xe21
Enter interface mode.
P1(config-if)#ip address 12.1.1.31/24
Assign the IPv4 address.
P1(config-if)#exit
Exit interface mode.
P1(config)#router ospf 1
Enter router OSPF mode.
P1(config-router)#ospf router-id 51.51.51.51
Configure OSPF router id same as loopback ip address.
P1(config-router)#network 11.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
P1(config-router)#network 12.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
P1(config-router)#network 51.51.51.51/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
P1(config-router)#exit
Exit router OSPF mode.
P1(config-router)#router ldp
Enter router LDP mode.
P1(config-router)#router-id 51.51.51.51
Set the router ID to IP address 51.51.51.51
P1(config-router)#transport-address ipv4 51.51.51.51
Configure LDP transport address same as loopback address
P1(config-router)#exit
Exit LDP mode.
P1(config)#interface xe15
Enter interface mode.
P1(config-if)#label-switching
Enable label switching in interface.
P1(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P1(config-if)#exit
Exit interface mode.
P1(config)#interface xe21
Enter interface mode.
P1(config-if)#label-switching
Enable label switching in interface.
P1(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P1(config-if)#exit
Exit interface mode.
P1(config)#commit
Commit candidate configuration to be running configuration.
P1(config)#exit
Exit the config mode.
PE2-ASBR1
 
#configure terminal
Enter configure mode.
PE2-ASBR(config)#interface lo
Enter interface mode.
PE2-ASBR(config-if)#ip address 2.2.2.2/32 secondary
Assign the IPv4 address.
PE2-ASBR(config-if)#exit
Exit interface mode.
PE2-ASBR(config)#router ospf 1
Enter router OSPF mode.
PE2-ASBR(config-router)#ospf router-id 2.2.2.2
Configure OSPF router id same as loopback ip address.
PE2-ASBR(config-router)#network 2.2.2.2/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE2-ASBR(config-router)#network 12.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE2-ASBR(config-router)#exit
Exit router OSPF mode.
PE2-ASBR(config-router)#router ldp
Enter router LDP mode.
PE2-ASBR(config-router)#router-id 2.2.2.2
Set the router ID to IP address 2.2.2.2
PE2-ASBR(config-router)#transport-address ipv4 2.2.2.2
Configure LDP transport address same as loopback address.
PE2-ASBR(config-router)#exit
Exit LPD mode.
PE2-ASBR(config)#interface xe5
Enter interface mode.
PE2-ASBR(config-if)#ip address 20.1.1.2/24
Assign the IPv4 address.
PE2-ASBR(config-if)#label-switching
Enable label switching in interface.
PE2-ASBR(config-if)#exit
Exit interface mode.
PE2-ASBR(config)#interface xe20
Enter interface mode.
PE2-ASBR(config-if)#ip address 12.1.1.2/24
Assign the IPv4 address.
PE2-ASBR(config-if)#label-switching
Enable label switching in interface.
PE2-ASBR(config-if)# enable-ldp ipv4
Enable LDP on the interface.
PE2-ASBR(config-if)#exit
Exit interface mode
PE2-ASBR(config-if)#router bgp 65000
Enter BGP router mode.
PE2-ASBR(config-router)# bgp router-id 2.2.2.2
Configure BGP router-id.
PE2-ASBR(config-router)# no bgp default ipv4-unicast
Configure BGP to have no default ipv4 unicast capability exchange between neighbors.
PE2-ASBR(config-router)# neighbor 20.1.1.40 remote-as 65001
Configure PE3-ASBR2 as an eBGP peer.
PE2-ASBR(config-router)# neighbor 41.41.41.41 remote-as 65000
Configure PE1 as an iBGP peer.
PE2-ASBR(config-router)# neighbor 41.41.41.41 update-source lo
Update the source as loopback for iBGP peering with the remote PE1 router.
PE2-ASBR(config-router)# allocate-label all
Configure allocate-label.
PE2-ASBR(config-router)# address-family ipv4 labeled-unicast
Enter address-family ipv4 labeled-unicast.
PE2-ASBR(config-router-af)# neighbor 20.1.1.40 activate
Activate eBGP neighbor PE3-ASBR2.
PE2-ASBR(config-router-af)# neighbor 41.41.41.41 activate
Activate iBGP neighbor PE1.
PE2-ASBR(config-router-af)# neighbor 41.41.41.41 next-hop-self
Configure next-hop-self for iBGP neighbor PE1.
PE2-ASBR(config-router-af)# exit-address-family
Exit address-family ipv4 labeled-unicast.
PE2(config-router)#exit
Exit the router mode.
PE2(config)#commit
Commit candidate configuration to be running configuration.
PE2(config)#exit
Exit the config mode.
PE3-ASBR
 
PE3-ASBR#configure terminal
Enter configure mode.
PE3-ASBR(config)#interface lo
Enter interface mode.
PE3-ASBR(config-if)#ip address 40.40.40.40/32 secondary
Assign the IPv4 address.
PE3-ASBR(config-if)#exit
Exit interface mode.
PE3-ASBR(config)#interface xe5
Enter interface mode.
PE3-ASBR(config-if)#ip address 20.1.1.40/24
Assign the IPv4 address.
PE3-ASBR(config-if)#exit
Exit interface mode.
PE3-ASBR(config)#interface xe1
Enter interface mode.
PE3-ASBR(config-if)#ip address 21.1.1.40/24
Assign the IPv4 address.
PE3-ASBR(config-if)#exit
Exit interface mode.
PE3-ASBR(config)#router ospf 1
Enter router OSPF mode.
PE3-ASBR(config-router)#ospf router-id 40.40.40.40
Configure OSPF router id same as loopback ip address.
PE3-ASBR(config-router)#network 21.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE3-ASBR(config-router)#network 40.40.40.40/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE3-ASBR(config-router)#exit
Exit router OSPF mode.
PE3-ASBR(config-router)#router ldp
Enter router LDP mode.
PE3-ASBR(config-router)#router-id 40.40.40.40
Set the router ID to IP address 40.40.40.40
PE3-ASBR(config-router)#transport-address ipv4 40.40.40.40
Configure LDP transport address same as loopback address
PE3-ASBR(config)#interface xe1
Enter interface mode.
PE3-ASBR(config-if)#label-switching
Enable label switching in interface.
PE3-ASBR(config-if)#enable-ldp ipv4
Enable LDP on the interface.
PE3-ASBR(config)#interface xe5
Enter interface mode.
PE3-ASBR(config-if)#label-switching
Enable label switching in interface.
PE3-ASBR(config-if)#router bgp 65001
Enter BGP router mode.
PE3-ASBR(config-router)# bgp router-id 40.40.40.40
Configure BGP router-id.
PE3-ASBR(config-router)# no bgp default ipv4-unicast
Configure BGP to have no default ipv4 unicast capability exchange with the neighbors.
PE3-ASBR(config-router)# neighbor 20.1.1.2 remote-as 65000
Configure PE2-ASBR as an eBGP peer.
PE3-ASBR(config-router)# neighbor 28.28.28.28 remote-as 65001
Configure PE4 as an iBGP peer.
PE3-ASBR(config-router)# neighbor 28.28.28.28 update-source lo
Update the source as loopback for iBGP peering with the remote PE4 router.
PE3-ASBR(config-router)# allocate-label all
Configure allocate-label.
PE3-ASBR(config-router)# address-family ipv4 labeled-unicast
Enter address-family ipv4 labeled-unicast.
PE3-ASBR(config-router-af)# neighbor 20.1.1.2 activate
Activate eBGP neighbor PE2-ASBR1.
PE3-ASBR(config-router-af)# neighbor 28.28.28.28 activate
Activate iBGP neighbor PE4.
PE3-ASBR(config-router-af)# neighbor 28.28.28.28 next-hop-self
Configure next-hop-self for iBGP neighbor PE4.
PE3-ASBR(config-router-af)# exit-address-family
Exit address-family ipv4 labeled-unicast.
PE3-ASBR(config-router)#exit
Exit the router mode.
PE3-ASBR(config)#commit
Commit candidate configuration to be running configuration.
PE3-ASBR(config)#exit
Exit the config mode.
P2
 
#configure terminal
Enter configure mode.
P2(config)#interface lo
Enter interface mode.
P2(config-if)# ip address 6.6.6.6/32 secondary
Assign the IPv4 address.
P2(config-if)#exit
Exit interface mode.
P2(config)#interface xe0
Enter interface mode.
P2(config-if)#ip address 21.1.1.5/24
Assign the IPv4 address.
P2(config-if)#exit
Exit interface mode.
P2(config)#interface xe11
Enter interface mode.
P2(config-if)#ip address 22.1.1.5/24
Assign the IPv4 address.
P2(config-if)#exit
Exit interface mode.
P2(config)#router ospf 1
Enter router OSPF mode.
P2(config-router)#ospf router-id 6.6.6.6
Configure OSPF router id same as loopback ip address.
P2(config-router)# network 6.6.6.6/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
P2(config-router)#network 21.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
P2(config-router)#network 22.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
P2(config-router)#exit
Exit router OSPF mode.
P2(config)#router ldp
Enter router LDP mode.
P2(config-router)#router-id 6.6.6.6
Set the router ID to IP address 6.6.6.6
P2(config-router)#transport-address ipv4 6.6.6.6
Configure LDP transport address same as loopback address
P2(config-router)#exit
Exit LDP mode.
P2(config)#interface xe0
Enter interface mode.
P2(config-if)#label-switching
Enable label switching in interface.
P2(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P2(config-if)#exit
Exit interface mode.
P2(config)#interface xe11
Enter interface mode.
P2(config-if)#label-switching
Enable label switching in interface.
P2(config-if)# enable-ldp ipv4
Enable LDP on the interface.
P2(config-if)#exit
Exit interface mode.
P2(config)#commit
Commit candidate configuration to be running configuration.
P2(config)#exit
Exit the config mode.
PE4
 
#configure terminal
Enter configure mode.
PE4(config)#interface lo
Enter interface mode.
PE4(config-if)#ip address 28.28.28.28/32 secondary
Assign the IPv4 address.
PE4(config-if)#exit
Exit interface mode.
PE4(config)#ip vrf vrf1
Create a new VRF named vrf1.
PE4(config-vrf)#rd 1:1
Assign the route distinguisher (RD) value as 1:1.
PE4(config-vrf)#route-target both 1:1
Configure import and export RTs for the VRF.
PE4(config-vrf)#exit
Exit VRF mode.
PE4(config)#interface xe23
Enter interface mode.
PE4(config-if)#ip vrf forwarding vrf1
Bind the interface connected to the CE router with VRF vrf1.
PE4(config-if)#ip address 30.1.1.1/24
Assign the IPv4 address.
PE4(config-if)#exit
Exit interface mode.
PE4(config)#interface xe11
Enter interface mode.
PE4(config-if)#ip address 22.1.1.28/24
Assign the IPv4 address.
PE4(config-if)#exit
Exit interface mode.
PE4(config)#router ospf 1
Enter router OSPF mode.
PE4(config-router)#ospf router-id 28.28.28.28
Configure OSPF router id same as loopback ip address.
PE4(config-router)#network 22.1.1.0/24 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE4(config-router)#network 28.28.28.28/32 area 0.0.0.0
Define the network on which OSPF runs and associate area id.
PE4(config-router)#exit
Exit OSPF router mode.
PE4(config)# router ldp
Enter router LDP mode.
PE4(config-router)#router-id 28.28.28.28
Set the router ID to IP address 28.28.28.28
PE4(config-router)#transport-address ipv4 28.28.28.28
Configure LDP transport address same as loopback address
PE4(config-router)#exit
Exit LDP mode.
PE4(config)#interface xe11
Enter interface mode.
PE4(config-if)#label-switching
Enable label switching in interface.
PE4(config-if)# enable-ldp ipv4
Enable LDP on the interface.
PE4(config-if)#exit
Exit interface mode.
PE4(config-if)#router bgp 65001
Enter BGP router mode.
PE4(config-router)# bgp router-id 28.28.28.28
Configure BGP router-id.
PE4(config-router)# no bgp default ipv4-unicast
Configure BGP speaker to have no default ipv4 unicast capability exchange between neighbors.
PE4(config-router)#address-family ipv4 unicast
Enter the IPv4 unicast address family.
PE4(config-router-af)#network 28.28.28.28/32
Advertise loopback address.
PE4(config-router-af)#exit-address-family
Exit address family mode
PE4(config-router)# neighbor 40.40.40.40 remote-as 65001
Configure PE3-ASBR2 as an iBGP peer.
PE4(config-router)# neighbor 40.40.40.40 update-source lo
Update the source as loopback for iBGP peering with the remote PE3-ASBR router.
PE4(config-router)# neighbor 41.41.41.41 remote-as 65000
Configure PE1 as an eBGP peer.
PE4(config-router)# neighbor 41.41.41.41 ebgp-multihop
Configure eBGP multichip for eBGP peer PE1.
PE4(config-router)# neighbor 41.41.41.41 update-source lo
Update the source as loopback for eBGP peering with the remote PE1 router.
PE4(config-router)# allocate-label all
Configure allocate-label.
PE4(config-router)# address-family ipv4 la-beled-unicast
Enter address-family ipv4 labeled-unicast.
PE4(config-router-af)# neighbor 40.40.40.40 activate
Activate iBGP neighbor.
PE4(config-router-af)# exit-address-family
Exit address-family ipv4 labeled-unicast.
PE4(config-router)# address-family vpnv4 unicast
Enter address-family vpnv4.
PE4(config-router-af)# neighbor 41.41.41.41 allow-ebgp-vpn
Activate eBGP neighbor PE1.
PE4(config-router-af)# neighbor 41.41.41.41 activate
Configure allow-ebgp-vpn for ebgp neighbor PE1.
PE4(config-router-af)# exit-address-family
Exit address-family vpnv4.
PE4(config-router)# address-family ipv4 vrf vrf1
Enter the IPv4 address family for VRF vrf1.
PE4(config-router-af)# redistribute con-nected
Redistribute connected route.
PE4(config-router-af)# exit-address-family
Exit IPv4 VRF Address Family mode.
PE4(config-router)#exit
Exit the router mode.
PE4(config)#commit
Commit candidate configuration to be running configuration.
PE4(config)#exit
Exit the config mode.
Validation
PE1
PE1#show ip bgp labeled-unicast summary
BGP router identifier 41.41.41.41, local AS number 65000
BGP table version is 10
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 65000 374 368 10 0 0 02:37:43 3
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE1#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 5.5.5.5/32 2.2.2.2 24960 24965
*>i 28.28.28.28/32 2.2.2.2 24962 24962
*>i 31.31.31.31/32 2.2.2.2 24963 24961
*> 41.41.41.41/32 0.0.0.0 24961 -
 
PE1#show ip route bgp
IP Route Table for VRF "default"
B 28.28.28.28/32 [200/0] via 2.2.2.2 (recursive via 11.1.1.31), 02:41:00
 
Gateway of last resort is not set
PE1#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
L> 2.2.2.2/32 4 0 Yes LSP_DEFAULT 24321 xe15 No 11.1.1.31
L> 5.5.5.5/32 6 0 Yes LSP_DEFAULT 24324 xe15 No 11.1.1.31
B 5.5.5.5/32 7 0 Yes LSP_DEFAULT 24965 - No 2.2.2.2
L> 12.1.1.0/24 2 0 Yes LSP_DEFAULT 3 xe15 No 11.1.1.31
L> 13.1.1.0/24 3 0 Yes LSP_DEFAULT 3 xe15 No 11.1.1.31
B> 28.28.28.28/32 8 0 Yes LSP_DEFAULT 24962 - No 2.2.2.2
L> 31.31.31.31/32 5 0 Yes LSP_DEFAULT 24322 xe15 No 11.1.1.31
B 31.31.31.31/32 9 0 Yes LSP_DEFAULT 24961 - No 2.2.2.2
L> 51.51.51.51/32 1 0 Yes LSP_DEFAULT 3 xe15 No 11.1.1.31
 
PE1#show ip bgp vpnv4 all summary
BGP router identifier 41.41.41.41, local AS number 65000
BGP table version is 4
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
28.28.28.28 4 65001 340 338 4 0 0 02:22:11 1
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE1#show ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (Default for VRF vrf1)
*> l 10.1.1.0/24 0.0.0.0 0 100 32768 ?
*> 30.1.1.0/24 28.28.28.28 0 100 0 65001 ?
Announced routes count = 1
Accepted routes count = 1
Route Distinguisher: 1:1
*> 30.1.1.0/24 28.28.28.28 0 100 0 65001 ?
Announced routes count = 0
Accepted routes count = 1
 
PE1#show ip route vrf vrf1 database
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
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
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
> - selected route, * - FIB route, p - stale info
 
IP Route Table for VRF "vrf1"
C *> 10.1.1.0/24 is directly connected, xe23, 1d19h57m
B *> 30.1.1.0/24 [20/0] via 28.28.28.28, 02:22:28
 
Gateway of last resort is not set
P1
P1#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
L> 2.2.2.2/32 2 24321 3 N/A xe21 12.1.1.2 LSP_DEFAULT
L> 41.41.41.41/32 1 24320 3 N/A xe15 11.1.1.2 LSP_DEFAULT
L> 31.31.31.31/32 4 24323 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 31.31.31.31/32 3 24322 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 5.5.5.5/32 5 24324 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
PE2-ASBR
PE2-ASBR#show ip bgp labeled-unicast summary
BGP router identifier 2.2.2.2, local AS number 65000
BGP table version is 10
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
20.1.1.40 4 65001 6427 6521 10 0 0 1d20h28m 2
41.41.41.41 4 65000 379 385 10 0 0 02:42:38 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
PE2-ASBR#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
B> 31.31.31.31/32 2 24961 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
B> 41.41.41.41/32 1 24960 24961 N/A N/A 41.41.41.41 LSP_DEFAULT
B> 5.5.5.5/32 6 24965 24965 N/A N/A 20.1.1.40 LSP_DEFAULT
B> 28.28.28.28/32 3 24962 24961 N/A N/A 20.1.1.40 LSP_DEFAULT
 
PE2-ASBR#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
B> 5.5.5.5/32 8 0 Yes LSP_DEFAULT 24965 xe5 No 20.1.1.40
L> 11.1.1.0/24 1 0 Yes LSP_DEFAULT 3 xe20 No 12.1.1.31
L> 13.1.1.0/24 2 0 Yes LSP_DEFAULT 3 xe20 No 12.1.1.31
B> 28.28.28.28/32 7 0 Yes LSP_DEFAULT 24961 xe5 No 20.1.1.40
L> 31.31.31.31/32 5 0 Yes LSP_DEFAULT 24323 xe20 No 12.1.1.31
L> 41.41.41.41/32 3 0 Yes LSP_DEFAULT 24320 xe20 No 12.1.1.31
B 41.41.41.41/32 6 0 Yes LSP_DEFAULT 24961 - No 41.41.41.41
L> 51.51.51.51/32 4 0 Yes LSP_DEFAULT 3 xe20 No 12.1.1.31
 
PE2-ASBR#show ip route bgp
IP Route Table for VRF "default"
B 28.28.28.28/32 [20/0] via 20.1.1.40, xe5, 02:41:38
 
Gateway of last resort is not set
PE3-ASBR
PE3-ASBR#show ip bgp labeled-unicast summary
BGP router identifier 40.40.40.40, local AS number 65001
BGP table version is 11
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
20.1.1.2 4 65000 6263 6267 11 0 0 1d20h31m 2
28.28.28.28 4 65001 383 389 11 0 0 02:42:56 1
 
Total number of neighbors 2
 
Total number of Established sessions 2
 
PE3-ASBR#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
B> 31.31.31.31/32 6 24964 24961 N/A N/A 20.1.1.2 LSP_DEFAULT
B> 41.41.41.41/32 2 24960 24960 N/A N/A 20.1.1.2 LSP_DEFAULT
B> 28.28.28.28/32 3 24961 24321 N/A N/A 28.28.28.28 LSP_DEFAULT
B> 5.5.5.5/32 7 24965 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
 
PE3-ASBR#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
L> 5.5.5.5/32 5 0 Yes LSP_DEFAULT 24320 xe1 No 21.1.1.5
L> 6.6.6.6/32 6 0 Yes LSP_DEFAULT 3 xe1 No 21.1.1.5
L> 22.1.1.0/24 7 0 Yes LSP_DEFAULT 3 xe1 No 21.1.1.5
L> 23.1.1.0/24 8 0 Yes LSP_DEFAULT 3 xe1 No 21.1.1.5
L> 28.28.28.28/32 9 0 Yes LSP_DEFAULT 24321 xe1 No 21.1.1.5
B 28.28.28.28/32 2 0 Yes LSP_DEFAULT 24321 - No 28.28.28.28
B> 31.31.31.31/32 4 0 Yes LSP_DEFAULT 24961 xe5 No 20.1.1.2
B> 41.41.41.41/32 1 0 Yes LSP_DEFAULT 24960 xe5 No 20.1.1.2
 
PE3-ASBR#show ip route bgp
IP Route Table for VRF "default"
B 41.41.41.41/32 [20/0] via 20.1.1.2, xe5, 02:45:37
 
Gateway of last resort is not set
P2
P2#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
L> 5.5.5.5/32 3 24322 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 5.5.5.5/32 1 24320 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 28.28.28.28/32 2 24321 3 N/A xe11 22.1.1.28 LSP_DEFAULT
L> 31.31.31.31/32 4 24323 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
L> 40.40.40.40/32 5 24324 3 N/A xe0 21.1.1.40 LSP_DEFAULT
PE4
PE4#show ip bgp labeled-unicast summary
BGP router identifier 28.28.28.28, local AS number 65001
BGP table version is 12
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
40.40.40.40 4 65001 404 399 12 0 0 02:49:41 3
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE4#show ip bgp labeled-unicast
 
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, S - stale
Network Next Hop In Label Out Label
*>i 5.5.5.5/32 40.40.40.40 24324 24965
*> 28.28.28.28/32 0.0.0.0 24321 -
*>i 31.31.31.31/32 40.40.40.40 24322 24964
*>i 41.41.41.41/32 40.40.40.40 24323 24960
PE4#
 
PE4#show mpls forwarding-table
Codes: > - installed FTN, * - selected FTN, p - stale FTN,
B - BGP FTN, K - CLI FTN, t - tunnel, P - SR Policy FTN,
L - LDP FTN, R - RSVP-TE FTN, S - SNMP FTN, I - IGP-Shortcut,
U - unknown FTN, O - SR-OSPF FTN, i - SR-ISIS FTN, k - SR-CLI FTN
 
Code FEC FTN-ID Tunnel-id Pri LSP-Type Out-Label Out-Intf ELC Nexthop
L> 5.5.5.5/32 4 0 Yes LSP_DEFAULT 24322 xe11 No 22.1.1.5
B 5.5.5.5/32 3 0 Yes LSP_DEFAULT 24965 - No 40.40.40.40
L> 6.6.6.6/32 5 0 Yes LSP_DEFAULT 3 xe11 No 22.1.1.5
L> 21.1.1.0/24 6 0 Yes LSP_DEFAULT 3 xe11 No 22.1.1.5
L> 23.1.1.0/24 7 0 Yes LSP_DEFAULT 3 xe11 No 22.1.1.5
L> 31.31.31.31/32 8 0 Yes LSP_DEFAULT 24323 xe11 No 22.1.1.5
B 31.31.31.31/32 1 0 Yes LSP_DEFAULT 24964 - No 40.40.40.40
L> 40.40.40.40/32 9 0 Yes LSP_DEFAULT 24324 xe11 No 22.1.1.5
B> 41.41.41.41/32 2 0 Yes LSP_DEFAULT 24960 - No 40.40.40.40
 
PE4#show ip bgp vpnv4 all summary
BGP router identifier 28.28.28.28, local AS number 65001
BGP table version is 4
2 BGP AS-PATH entries
0 BGP community entries
 
Neighbor V AS MsgRcv MsgSen TblVer InQ OutQ Up/Down State/PfxRcd
41.41.41.41 4 65000 373 376 4 0 0 02:37:04 1
 
Total number of neighbors 1
 
Total number of Established sessions 1
 
PE4#show ip bgp vpnv4 all
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, l - labeled
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
Network Next Hop Metric LocPrf Weight Path
Route Distinguisher: 1:1 (Default for VRF vrf1)
*> 10.1.1.0/24 41.41.41.41 0 100 0 65000 ?
*> l 30.1.1.0/24 0.0.0.0 0 100 32768 ?
Announced routes count = 1
Accepted routes count = 1
Route Distinguisher: 1:1
*> 10.1.1.0/24 41.41.41.41 0 100 0 65000 ?
Announced routes count = 0
Accepted routes count = 1
 
PE4#show ip route vrf vrf1 database
Codes: K - kernel, C - connected, S - static, R - RIP, B - BGP
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
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, E - EVPN,
v - vrf leaked
> - selected route, * - FIB route, p - stale info
 
IP Route Table for VRF "vrf1"
B *> 10.1.1.0/24 [20/0] via 41.41.41.41, 02:37:23
C *> 30.1.1.0/24 is directly connected, xe21, 1d20h11m
 
Gateway of last resort is not set
 
PE4#show mpls ilm-table
Codes: > - installed ILM, * - selected ILM, p - stale ILM
K - CLI ILM, T - MPLS-TP, S - Stitched ILM
S - SNMP, L - LDP, R - RSVP, C - CRLDP
B - BGP , K - CLI , V - LDP_VC, I - IGP_SHORTCUT
O - OSPF/OSPF6 SR, i - ISIS SR, k - SR CLI
P - SR Policy, U - unknown
 
Code FEC/VRF/L2CKT ILM-ID In-Label Out-Label In-Intf Out-Intf/VRF Nexthop LSP-Type
B> 41.41.41.41/32 4 24323 24960 N/A N/A 40.40.40.40 LSP_DEFAULT
B> 28.28.28.28/32 2 24321 Nolabel N/A N/A 127.0.0.1 LSP_DEFAULT
B> vrf1 1 24320 Nolabel N/A vrf1 N/A LSP_DEFAULT
B> 31.31.31.31/32 3 24322 24964 N/A N/A 40.40.40.40 LSP_DEFAULT
B> 5.5.5.5/32 5 24324 24965 N/A N/A 40.40.40.40 LSP_DEFAULT