MPLS - Sham-Link Support on Multi-VRF

Sham-Link Support on Multi-VRF

Sham-link support on Multi-VRF (Virtual Routing and Forwarding) networks is a feature in MPLS (Multiprotocol Label Switching) implementations that enables the creation of pseudo or "sham" links between routers within separate VRF instances. In Multi-VRF environments, each VRF represents an independent routing table, and sham-links are established to connect VRFs that belong to different routing domains. Sham-links utilize MPLS techniques to provide inter-VRF connectivity, allowing the exchange of routing information between distinct VPNs while maintaining isolation. This feature is particularly valuable in scenarios where service providers need to extend services across multiple VRFs or VPNs within their network infrastructure, enabling seamless communication between different customer environments. Sham-link support on Multi-VRF networks enhances the flexibility and scalability of MPLS deployments, providing a mechanism for efficient and controlled interconnectivity between isolated routing domains.

Lab:

Disclaimer

This Configuration Guide is designed to assist members to enhance their skills in particular technology area. While every effort has been made to ensure that all material is as complete and accurate as possible, the enclosed material is presented on an “as is” basis. Neither the authors nor Forum assume any liability or responsibility to any person or entity with respect to loss or damages incurred from the information contained in this guide. This configuration guide was developed by Forum. Any similarities between material presented in this configuration guide and any other material is completely coincidental.

CE1 Router:

ip cef 
! 
ip vrf vpna 
rd 3:10 
route-target export 3:10 
route-target import 3:
! 
ip vrf vpnb 
rd 3:20 
route-target export 3:20 
route-target import 3:20 
! 
ip vrf vpnc 
rd 3:30 
route-target export 3:30 
route-target import 3:30 
! 
interface Loopback10 
ip vrf forwarding vpna 
ip address 10.0.0.1 255.255.255.0 
! 
interface Loopback11 
ip vrf forwarding vpnb 
ip address 20.0.0.1 255.255.255.0 
! 
interface Loopback12 
ip vrf forwarding vpnc 
ip address 30.0.0.1 255.255.255.0 
! 
interface FastEthernet0/0.1 
encapsulation dot1Q 10 
ip vrf forwarding vpna 
ip address 150.1.40.2 255.255.255.252 
! 
interface FastEthernet0/0.2 
encapsulation dot1Q 20 
ip vrf forwarding vpnb 
ip address 150.1.40.6 255.255.255.252 
! 
interface FastEthernet0/0.3 
encapsulation dot1Q 30 
ip vrf forwarding vpnc 
ip address 150.1.40.10 255.255.255.252 
! 
router ospf 10 vrf vpna 
capability vrf-lite
network 10.0.0.0 0.0.0.255 area 0 
network 150.1.40.0 0.0.0.3 area 0 
! 
router ospf 20 vrf vpnb 
capability vrf-lite
network 20.0.0.0 0.0.0.255 area 0 
network 150.1.40.4 0.0.0.3 area 0 
! 
router ospf 30 vrf vpnc 
capability vrf-lite
network 30.0.0.0 0.0.0.255 area 0 
network 150.1.40.8 0.0.0.3 area 0 
! 
end

CE2 Router:

interface Loopback0 
ip address 203.1.0.2 255.255.255.255 
! 
interface Loopback1 
ip address 203.1.2.1 255.255.255.0 
! 
interface FastEthernet0/0 
ip address 150.1.31.6 255.255.255.252 
! 
router ospf 10 
network 0.0.0.0 255.255.255.255 area 0 
! 
end

CE3 Router:

interface Loopback0 
ip address 203.1.0.3 255.255.255.255 
! 
interface Loopback1 
ip address 203.1.3.1 255.255.255.0 
! 
interface FastEthernet0/0 
ip address 150.1.31.14 255.255.255.252 
! 
router ospf 20 
network 0.0.0.0 255.255.255.255 area 0 
! 
end

CE4 Router:

interface Loopback0 
ip address 203.1.0.4 255.255.255.255 
! 
interface Loopback1 
ip address 203.1.4.1 255.255.255.0 
! 
interface FastEthernet0/0 
ip address 150.1.31.18 255.255.255.252 
! 
router ospf 30 
network 0.0.0.0 255.255.255.255 area 0 
! 
end

PE1 Router:

ip cef 
! 
ip vrf vpna 
rd 3:10 
route-target export 3:10 
route-target import 3:10 
! 
ip vrf vpnb 
rd 3:20 
route-target export 3:20 
route-target import 3:20 
! 
ip vrf vpnc 
rd 3:30 
route-target export 3:30 
route-target import 3:30 
! 
mpls label protocol ldp 
! 
interface Loopback0 
ip address 192.168.3.1 255.255.255.255 
! 
interface Loopback10 
ip vrf forwarding vpna 
ip address 10.10.10.10 255.255.255.255 
! 
interface Loopback20 
ip vrf forwarding vpnb 
ip address 20.20.20.20 255.255.255.255
! 
interface Loopback30 
ip vrf forwarding vpnc 
ip address 30.30.30.30 255.255.255.255 
! 
interface FastEthernet0/0.1 
encapsulation dot1Q 10 
ip vrf forwarding vpna 
ip address 150.1.40.1 255.255.255.252 
! 
interface FastEthernet0/0.2 
encapsulation dot1Q 20 
ip vrf forwarding vpnb 
ip address 150.1.40.5 255.255.255.252 
! 
interface FastEthernet0/0.3 
encapsulation dot1Q 30 
ip vrf forwarding vpnc 
ip address 150.1.40.9 255.255.255.252 
! 
interface Serial2/0 
description *** Link to PE2 *** 
ip address 192.168.3.22 255.255.255.252 
tag-switching ip 
! 
router ospf 10 vrf vpna
router-id 10.10.10.10 
area 0 sham-link 10.10.10.10 40.40.40.40 
cost 10 
redistribute bgp 3 subnets 
network 150.1.40.0 0.0.0.3 area 0 
! 
router ospf 20 vrf vpnb 
router-id 20.20.20.20 
area 0 sham-link 20.20.20.20 50.50.50.50 
cost 10 
redistribute bgp 3 subnets 
network 150.1.40.4 0.0.0.3 area 0 
! 
router ospf 30 vrf vpnc 
router-id 30.30.30.30 
area 0 sham-link 30.30.30.30 60.60.60.60 
cost 10 
redistribute bgp 3 subnets 
network 150.1.40.8 0.0.0.3 area 0 
! 
router ospf 1 
network 192.168.3.0 0.0.0.255 area 0 
! 
router bgp 3 
no synchronization 
network 192.168.3.1 mask 255.255.255.255 
neighbor 192.168.3.2 remote-as 3 
neighbor 192.168.3.2 update-source 
Loopback0 
no auto-summary 
! 
address-family vpnv4 
neighbor 192.168.3.2 activate 
neighbor 192.168.3.2 send-community 
extended 
exit-address-family 
! 
address-family ipv4 vrf vpnc 
redistribute ospf 30 vrf vpnc 
no synchronization 
network 30.30.30.30 mask 255.255.255.255 
exit-address-family 
! 
address-family ipv4 vrf vpnb 
redistribute ospf 20 vrf vpnb 
no synchronization 
network 20.20.20.20 mask 255.255.255.255 
exit-address-family 
! 
address-family ipv4 vrf vpna 
redistribute ospf 10 vrf vpna 
no synchronization 
network 10.10.10.10 mask 255.255.255.255 
exit-address-family 
! 
tag-switching tdp router-id Loopback0 
! 
end

PE2 Router:

ip vrf vpna 
rd 3:10 
route-target export 3:10 
route-target import 3:10 
! 
mpls label protocol ldp 
! 
interface Loopback0 
ip address 192.168.3.2 255.255.255.255 
! 
interface Loopback10 
ip vrf forwarding vpna 
ip address 40.40.40.40 255.255.255.255 
! 
interface FastEthernet0/0 
description *** Link to A2 *** 
ip vrf forwarding vpna 
ip address 150.1.31.5 255.255.255.252 
! 
interface Serial2/0 
description *** Link to PE1 *** 
ip address 192.168.3.21 255.255.255.252 
tag-switching ip 
! 
interface Serial2/1 
description *** Link to P *** 
ip address 192.168.3.18 255.255.255.252 
tag-switching ip 
! 
router ospf 10 vrf vpna 
router-id 40.40.40.40 
area 0 sham-link 40.40.40.40 10.10.10.10 
cost 10 
redistribute bgp 3 subnets 
network 150.1.0.0 0.0.255.255 area 0 
! 
router ospf 1 
network 192.168.3.0 0.0.0.255 area 0 
! 
router bgp 3 
no synchronization 
network 192.168.3.2 mask 255.255.255.255 
neighbor 192.168.3.1 remote-as 3 
neighbor 192.168.3.1 update-source 
Loopback0 
neighbor 192.168.3.1 route-reflector-client 
neighbor 192.168.3.3 remote-as 3 
neighbor 192.168.3.3 update-source 
Loopback0 
neighbor 192.168.3.3 route-reflector-client 
no auto-summary 
! 
address-family vpnv4 
neighbor 192.168.3.1 activate 
neighbor 192.168.3.1 send-community 
extended 
neighbor 192.168.3.1 route-reflector-client 
neighbor 192.168.3.3 activate 
neighbor 192.168.3.3 send-community 
extended 
exit-address-family 
! 
address-family ipv4 vrf vpna 
redistribute ospf 10 vrf vpna 
no synchronization 
network 40.40.40.40 mask 255.255.255.255 
exit-address-family 
! 
tag-switching tdp router-id Loopback0 
! 
end

P Router:

ip cef 
! 
mpls label protocol ldp 
! 
interface Loopback0 
ip address 192.168.3.5 255.255.255.255 
! 
interface Serial2/0 
description *** Link to PE3 *** 
ip address 192.168.3.14 255.255.255.252 
tag-switching ip 
! 
interface Serial2/1 
description *** Link to PE2 *** 
ip address 192.168.3.17 255.255.255.252 
tag-switching ip 
! 
router ospf 1 
network 192.168.3.0 0.0.0.255 area 0 
! 
tag-switching tdp router-id Loopback0
! 
end

PE3 Router:

ip cef 
! 
ip vrf vpnb 
rd 3:20 
route-target export 3:20 
route-target import 3:20 
! 
mpls label protocol ldp 
! 
interface Loopback0 
ip address 192.168.3.3 255.255.255.255 
! 
interface Loopback20 
ip vrf forwarding vpnb 
ip address 50.50.50.50 255.255.255.255 
! 
interface FastEthernet0/0 
description *** Link to A3 *** 
ip vrf forwarding vpnb 
ip address 150.1.31.13 255.255.255.252 
! 
interface Serial2/0 
description *** Link to P *** 
ip address 192.168.3.13 255.255.255.252 
tag-switching ip 
! 
interface Serial2/1 
description *** Link to PE4 *** 
ip address 192.168.3.10 255.255.255.252 
tag-switching ip 
! 
router ospf 20 vrf vpnb 
router-id 50.50.50.50 
area 0 sham-link 50.50.50.50 20.20.20.20 
cost 10 
redistribute bgp 3 subnets 
network 150.1.0.0 0.0.255.255 area 0 
! 
router ospf 1 
network 192.168.3.0 0.0.0.255 area 0 
! 
router bgp 3
no synchronization 
network 192.168.3.3 mask 255.255.255.255 
neighbor 192.168.3.2 remote-as 3 
neighbor 192.168.3.2 update-source 
Loopback0 
neighbor 192.168.3.2 route-reflector-client 
neighbor 192.168.3.4 remote-as 3 
neighbor 192.168.3.4 update-source 
Loopback0 
neighbor 192.168.3.4 route-reflector-client 
no auto-summary 
! 
address-family vpnv4 
neighbor 192.168.3.2 activate 
neighbor 192.168.3.2 send-community 
extended 
neighbor 192.168.3.4 activate 
neighbor 192.168.3.4 send-community 
extended 
neighbor 192.168.3.4 route-reflector-client 
exit-address-family 
! 
address-family ipv4 vrf vpnb 
redistribute ospf 20 vrf vpnb 
no synchronization 
network 50.50.50.50 mask 255.255.255.255 
exit-address-family 
! 
tag-switching tdp router-id Loopback0 
! 
end

PE4 Router:

ip cef 
! 
ip vrf vpnc 
rd 3:30 
route-target export 3:30 
route-target import 3:30 
! 
mpls label protocol ldp 
! 
interface Loopback0 
ip address 192.168.3.4 255.255.255.255 
! 
interface Loopback30 
ip vrf forwarding vpnc 
ip address 60.60.60.60 255.255.255.255 
! 
interface FastEthernet0/0 
description *** Link to A4 *** 
ip vrf forwarding vpnc 
ip address 150.1.31.17 255.255.255.252 
! 
interface Serial2/1 
description *** Link to PE3 *** 
ip address 192.168.3.9 255.255.255.252 
no ip directed-broadcast 
tag-switching ip 
! 
router ospf 30 vrf vpnc 
router-id 60.60.60.60 
area 0 sham-link 60.60.60.60 30.30.30.30 
cost 10 
redistribute bgp 3 subnets 
network 150.1.0.0 0.0.255.255 area 0 
! 
router ospf 1 
network 192.168.3.0 0.0.0.255 area 0 
! 
router bgp 3 
no synchronization 
bgp log-neighbor-changes 
network 192.168.3.4 mask 255.255.255.255 
neighbor 192.168.3.3 remote-as 3
neighbor 192.168.3.3 update-source 
Loopback0 
no auto-summary 
! 
address-family vpnv4 
neighbor 192.168.3.3 activate 
neighbor 192.168.3.3 send-community 
extended 
exit-address-family 
! 
address-family ipv4 vrf vpnc 
redistribute ospf 30 vrf vpnc 
no synchronization 
network 60.60.60.60 mask 255.255.255.255 
exit-address-family 
! 
tag-switching tdp router-id Loopback0 
! 
end