This section describes how to configure the routes that traverse the MPLS VPN backbone network to be the routes of the OSPF area. After the configuration, traffic between sites of the same VPN in the same OSPF area need not be forwarded through routes of the OSPF area.
OSPF sham links are unnumbered P2P links between two PEs over an BGP/MPLS IP VPN backbone network. Generally, BGP extended community attributes carry routing information over the BGP/MPLS IP VPN backbone between BGP peers. OSPF running on the other PE can use the routing information to generate inter-area routes from PEs to CEs.
If an intra-area OSPF link exists between the network segments of local and remote CEs on the BGP/MPLS IP VPN backbone network. Routes that pass through the intra-area route link and have higher preferences than inter-area routes that pass through the MPLS VPN backbone network. As a result, VPN traffic is always forwarded through the intra-area route instead of the backbone network. To avoid such a problem, an OSPF sham link can be established between PEs so that the routes that pass through the MPLS VPN backbone network also become OSPF intra-area routes and take precedence.
Perform the following steps on the PE devices at both ends of a sham link.
Each VPN instance must have an endpoint address of the sham link. The endpoint address is a loopback interface address with a 32-bit mask in the VPN address space on a PE device. Multiple sham links of the same OSPF process share an endpoint address, but sham links of different OSPF processes cannot have the same endpoint address.
After configuring an OSPF sham link, you can check the routing table on a CE, trace the nodes that data packets pass through from local CE to the remote CE, and check whether the sham link is successfully established on the PE.