Optionally, you can include the metric option to set a metric value for the remote end
point. The metric value specifies the cost of using the link. Routes with lower total path
metrics are preferred over those with higher path metrics.
You can configure a value from 1 through 65,535. The default value is 1.
OSPF Sham Links Example
This example shows how to enable OSPF sham links on a PE router.
The following is the loopback interface configuration on the PE router. The address
configured is for the local end point of the OSPF sham link:
[edit]
interfaces {
lo0 {
unit 1 {
family inet {
address 10.1.1.1/32;
}
}
}
}
The following is the routing instance configuration on the PE router, including the
configuration for the OSPF sham link. The sham-link local statement is configured with
the address for the local loopback interface:
[edit]
routing-instances {
example-sham-links {
instance-type vrf;
interface e1-1/0/2.0;
interface lo0.1;
route-distinguisher 3:4;
vrf-import vpn-red-import;
vrf-export vpn-red-export;
protocols {
ospf {
sham-link local 10.1.1.1;
area 0.0.0.0 {
sham-link-remote 10.2.2.2 metric 1;
interface e1-1/0/2.0 metric 1;
}
}
}
}
}
Configuring an OSPF Domain ID
For most OSPF configurations involving Layer 3 VPNs, you do not need to configure an
OSPF domain ID. However, for a Layer 3 VPN connecting multiple OSPF domains,
configuring OSPF domain IDs can help you control LSA translation (for Type 3 and Type 5
LSAs) between the OSPF domains and back-door paths. Each VPN routing and forwarding
835Copyright © 2017, Juniper Networks, Inc.
Chapter 26: Configuring Layer 3 VPNs