Cisco Systems IOS XR Network Router User Manual


 
Implementing OSPF on Cisco IOS XR Software
Configuration Examples for Implementing OSPF on Cisco IOS XR Software
RC-238
Cisco IOS XR Routing Configuration Guide
In Cisco IOS XR software, OSPF areas must be explicitly configured, and interfaces configured under
the area configuration mode are explicitly bound to that area. In this example, interface 10.1.2.0/24 is
bound to area 0 and interface 10.1.3.0/24 is bound to area 1.
Cisco IOS XR Software Configuration
interface POS 0/3/0/0
ip address 10.1.2.1 255.255.255.0
negotiation auto
!
interface POS 0/3/0/1
ip address 10.1.3.1 255.255.255.0
negotiation auto
!
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