Generally, BGP peers transmit routing information over an MPLS VPN backbone network based on the BGP extension community attribute. OSPF that runs on the remote PEs can generate Type 3 LSAs advertised to CEs based on the routing information. These routes are called inter-area routes.
As shown in Figure 1, OSPF runs between PEs and CEs. Two sites in an OSPF area are connected to different PEs. The two sites, which are connected through an intra-area OSPF link, namely, the backdoor link, belong to the same VPN. The two sites can be considered as a dual-homed site.
In this situation, the routes of the two sites connected through PEs are regarded as inter-area routes. The priority of the inter-area routes is lower than that of the intra-area routes passing through the backdoor link. The inter-area routes, therefore, are not chosen by OSPF preferentially.
Thus, VPN traffic is permanently forwarded through the backdoor link instead of through the backbone network. OSPF sham links can be introduced to solve the problem. The establishment of an OSPF sham link between PE1 and PE2 changes the routes passing through the MPLS VPN backbone network to the OSPF intra-area routes.
A sham link acts as an intra-area point-to-point (P2P) link and the route of the sham link is advertised through a Type 1 LSA. By adjusting the metric values, users can select a route between the sham link and backdoor link.
A sham link is considered as the link between two VPN instances, each with an endpoint address of the sham link. The endpoint address is a loopback interface address with a 32-bit mask. The address is within the VPN address space supported by the PE. Different sham links of the same OSPF process can share an endpoint address, but different OSPF processes do not share sham links with the same endpoint address.
BGP advertises the endpoint addresses of the sham links as VPN-IPv4 addresses. A route passing through a sham link cannot be imported into BGP as a VPN-IPv4 route.
After a sham link is set up between two PEs, the PEs become sham link neighbors and exchange the routing information contained in their Link State Databases (LSDBs). At this time, the backbone network is perceived as the P2P intra-area links on which the PEs advertise Type1 LSAs.
Figure 2 shows the route advertisement on a sham link. Adv stands for the route advertiser; D indicates the destination address of the packet; Cost represents the route cost of the sham link.
If a sham link is considered as a physical link, the route cost of the sham link is the same as the OSPF route cost of the interfaces. To ensure that VPN traffic can be forwarded through the MPLS backbone network, the route cost of the sham link must be smaller than the OSPF route cost of the backdoor link.
As shown in Figure 2, the LSA type, advertiser, and the route cost of the route advertised on the sham link keep unchanged during the whole advertisement process. That is, the LSA is transparently transmitted from PE1 to PE2.