Connectivity Guide
Enable OSPFv2 in a non-default VRF instance
To enable OSPFv2 in a non-default VRF instance:
1 Create a non-default VRF instance in which you want to enable OSPFv2:
ip vrf vrf-name
2 Enable OSPF and congure an OSPF instance in VRF CONFIGURATION mode.
router ospf instance-number vrf vrf-name
3 Enter the interface information to congure the interface for OSPF in INTERFACE mode.
interface ethernet node/slot/port[:subport]
4 Enable the interface in INTERFACE mode.
no shutdown
5 Disable the default switchport conguration and remove it from an interface or a LAG port in INTERFACE mode.
no switchport
6 Associate the interface with the non-default VRF instance that you created earlier.
ip vrf forwarding vrf-name
7 Assign an IP address to the interface.
ip address ip-address/mask
8 Enable OSPFv2 on the interface.
ip ospf process-id area area-id
• process-id—Enter the OSPFv2 process ID for a specic OSPF process, from 1 to 65535.
• area-id—Enter the OSPFv2 area ID as an IP address (A.B.C.D) or number, from 1 to 65535.
Enable OSPFv2 conguration
OS10(config)# ip vrf vrf-blue
OS10(config-vrf-blue)# router ospf 100 vrf-blue
OS10(conf-router-ospf-100)# exit
OS10(config)# interface ethernet 1/1/2
OS10(conf-if-eth1/1/2)# no shutdown
OS10(conf-if-eth1/1/2)# no switchport
OS10(conf-if-eth1/1/2)# ip vrf forwarding vrf-blue
OS10(conf-if-eth1/1/1)# ip address 11.1.1.1/24
OS10(conf-if-eth1/1/1)# ip ospf 100 area 0.0.0.0
NOTE
:
If you want to move an interface associated with one VRF instance to another default or non-default VRF instance, you must rst
remove the OSPF or Layer3 congurations that already exist on the interface. If you move the interface from one VRF instance to
another without removing these existing Layer3 or OSPF congurations, these congurations do not take eect in the new VRF
instance.
Consider a scenario where the OSPF instance 100 is congured on the default VRF instance and the OSPF instance 200 is congured
on the non-default VRF instance named VRF-Red. The interface eth1/1/1 on the default VRF instance is attached to an OSPF process
100 area 1. In this scenario, if you want to move eth1/1/1 from the default VRF instance to VRF-Red, you must rst remove the OSPF
area conguration to which the interface eth1/1/1 is currently attached to.
Assign router identier
For managing and troubleshooting purposes, you can assign a router ID for the OSPFv2 process. Use the router’s IP address as the router
ID.
• Assign the router ID for the OSPFv2 process in ROUTER-OSPF mode
router-id ip-address
Layer 3
535