Cisco Systems IOS XR Laptop User Manual


 
Implementing OSPF on Cisco IOS XR Software
Configuration Examples for Implementing OSPF on Cisco IOS XR Software
RC-189
Cisco IOS XR Routing Configuration Guide
router ospf 1
router-id 10.2.3.4
area 0
interface POS 0/3/0/0
!
area 1
interface POS 0/3/0/1
!
!
CLI Inheritance and Precedence for OSPF Version 2: Example
The following example configures the cost parameter at different hierarchical levels of the OSPF
topology, and illustrates how the parameter is inherited and how only one setting takes precedence.
According to the precedence rule, the most explicit configuration is used.
The cost parameter is set to 5 in router configuration mode for the OSPF process. Area 1 sets the cost to
15 and area 6 sets the cost to 30. All interfaces in area 0 inherit a cost of 5 from the OSPF process because
the cost was not set in area 0 or its interfaces.
In area 1, every interface has a cost of 15 because the cost is set in area 1 and 15 overrides the value 5
that was set in router configuration mode.
Area 4 does not set the cost, but POS interface 01/0/2 sets the cost to 20. The remaining interfaces in
area 4 have a cost of 5 that is inherited from the OSPF process.
Area 6 sets the cost to 30, which is inherited by POS interfaces 0/1/0/3 and 0/2/0/3. POS interface 0/3/0/3
uses the cost of 1, which is set in interface configuration mode.
router ospf 1
router-id 10.5.4.3
cost 5
area 0
interface POS 0/1/0/0
!
interface POS 0/2/0/0
!
interface POS 0/3/0/0
!
!
area 1
cost 15
interface POS 0/1/0/1
!
interface POS 0/2/0/1
!
interface POS 0/3/0/1
!
!
area 4
interface POS 0/1/0/2
cost 20
!
interface POS 0/2/0/2
!
interface POS 0/3/0/2
!
!
area 6
cost 30
interface POS 0/1/0/3
!