OSPF Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Release

PDF

OSPF Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Release

Configure OSPF virtual and sham links

Want to summarize with AI?

Log in

Provides configuration procedures for enabling OSPF virtual and sham links to maintain backbone connectivity and optimize routing on Cisco 8000 Series Routers.


This task provides the procedures required to maintain OSPF network integrity and routing efficiency through the implementation of virtual links and sham links.

  • Virtual Links: Establishes a logical connection between an Area Border Router (ABR) and the backbone area (Area 0) in scenarios where a direct physical connection is not feasible. This ensures continuous reachability and maintains the OSPF area hierarchy.

  • Sham Links: Configures an intra-area link between Provider Edge (PE) routers within an MPLS VPN environment. This ensures that OSPF treats the path across the MPLS backbone as an intra-area route, thereby preventing suboptimal routing and maintaining consistent OSPF adjacency for enterprise and service provider networks.

Perform this task on the CSC-PE to configure advanced L3VPN label allocation and BGP settings required for Carrier Supporting Carrier.

Before you begin

  • Configure the sham link under OSPF area submode as needed.

  • To create a virtual link with MD5 authentication to area 0:

    • Obtain the neighbor router’s router ID by running show ospf or show ospfv3 on the remote router.

    • Set a stable router ID at each end. Avoid default-assigned router IDs to prevent link disruption.

    • Assign router IDs manually using the router-id command.

    • Optionally, configure a loopback interface for persistent router IDs.

Follow these steps to configure and verify Carrier Supporting Carrier for L3VPN on CSC-PE:

Procedure

1.

Configure a virtual link with MD5 authentication to area 0.

Example:


Router# configure
Router(config)# router ospf 1
Router(config)# router ospfv3 1
Router(config-ospf)# router-id [local-router-id]
Router(config-ospf)# area 1
Router(config-ospf-ar)# virtual-link [neighbor-router-id]
Router(config-ospf-ar-vl)# authentication message-digest
Router(config-ospf-ar-vl)# message-digest-key [key-id] md5 [yourkey]
Router# show ospf 1 2 virtual-links
Router# show ospfv3 1 virtual-links
Router# show ospf
Router# show ospfv3
          

Enter global configuration mode and configure the OSPF or OSPFv3 instance. Manually assign a stable router ID. Specify the area (other than 0) and configure the virtual link using the neighbor router’s router ID. Enable MD5 authentication and set the message-digest key. Optionally, run show ospf or show ospfv3 commands to verify OSPF processes and router ID.

2.

Configure an OSPFv2 sham link.

Example:


Router# configure
Router(config)# interface loopback [number]
Router(config-if)# vrf [vrf-name]
Router(config-if)# ipv4 address [address] [mask]
Router(config-if)# exit
Router(config)# router ospf [process-name]
Router(config-ospf)# vrf [vrf-name]
Router(config-ospf-vrf)# router-id [router-id]
Router(config-ospf-vrf)# redistribute bgp [asn]
Router(config-ospf-vrf)# area 0
Router(config-ospf-vrf-ar)# sham-link [source-addr] [dest-addr]
Router(config-ospf-vrf-ar-sl)# cost [value]
Router(config-ospf-vrf-ar-sl)# commit
          

Configure a loopback interface within the appropriate VRF and assign an IP address. Enter OSPF router configuration in the desired VRF and assign a stable router ID. Redistribute BGP as required. Enter area 0, then configure the sham link between the source and destination addresses. Set the cost value for the sham link and commit your changes. Ensure the source and destination addresses belong to the VRF and are advertised by BGP as host routes to remote PE routers. Explicitly set the cost to override defaults.

Your OSPF configuration is committed and verified. The router uses the intended OSPF topology with both virtual and sham links.