11.2.7 Applying OSPF in VRF
- Points to note
-
The example below shows how to specify the vrf parameter in the router ospf command.
- Command examples
-
This procedure uses the loopback address as the router ID and enables OSPF for VRF 2.
-
(config)# interface loopback 2
Switches to interface mode and specifies information about loopback 2.
-
(config-if)# vrf forwarding 2
(config-if)# ip address 100.1.1.1
Specifies VRF 2 and sets the IP address to 100.1.1.1.
-
(config-if)# ip ospf 1 area 0
(config-if)# exit
Specifies that OSPF runs in area 0 of domain 1.
-
(config)# router ospf 1 vrf 2
Switches to ospf mode, and then specifies information about the OSPF that runs in VRF 2. Assigns 1 as the domain number.
-
(config-router)# network 10.0.0.0 0.255.255.255 area 0
Associates interfaces in the 10.0.0.0/8 network range with area 0.