234
Configuring an OSPF sham link
The sham link is considered an OSPF intra-area route. It is used to make sure that the VPN traffic is
transmitted over the backbone instead of the backdoor link between two CEs.
The source and destination addresses of the sham link must be loopback interface addresses with 32-bit
masks. Besides, the loopback interfaces must be bound to the VPN instances and be advertised through
BGP.
Configuration prerequisites
Before configuring OSPF sham link, complete the following tasks:
•
Configure basic MPLS L3VPN (OSPF is used between PE and CE)
•
Configure OSPF in the LAN where CEs reside
Configuring a loopback interface
To configure a loopback interface:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Create a loopback interface and
enter loopback interface view
interface loopback
interface-number
Required
Bind the loopback interface to VPN
instance
ip binding vpn-instance
vpn-instance-name
Required
By default, an interface is
associated with no VPN instance.
Configure the address of the
loopback interface
ip address
ip-address
{
mask
|
mask-length
}
Required
Redistributing the loopback interface route and OSPF routes
into BGP
To redistribute the loopback interface route and OSPF routes into BGP:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enter BGP view
bgp
as-number
Required
Enter BGP VPN instance view
ipv4-family vpn-instance
vpn-instance-name
Required
Redistribute direct routes into BGP
(to redistribute the loopback
interface route into BGP)
import-route direct
[
med
med-value
|
route-policy
route-policy-name
] *
Required
Redistribute OSPF VPN routes
import-route ospf
[ {
process-id
|
all-processes
} [
allow-direct
|
med
med-value
|
route-policy
route-policy-name
] * ]
Required