OSPF single area configuration on IOS XR

Written By
CCIE HUB
📅
Published On
24th Sep, 2025
⏱️
Min Reading
3 Min
Table of Contents

IO OSP S F SINGL X E ARE R A COFIGURATION ON IOS XR-LAW SAH

Step 1 : configure the ip address

XR1
conf t
host XR_R1
int g0/0/0/0
ip add 10.1.1 2 .1/ 2 4
no sh
int g0/0/0/1
ip add 10.1.1 3 .1/ 2 4
no sh
commit
XR-2
conf t
host XR_ 2
int g0/0/0/0
ip add 10.1.1 2 . 2 / 2 4
no sh
int g0/0/0/1
ip add 10.1. 2 4 . 2 / 2 4
no sh
commit

XR-3
conf t
host XR_3
int g0/0/0/0
ip add 10.1.13.3/24
no sh
int g0/0/0/1
ip add 10.1.34.3/24
no sh
commit
XR-4
conf t
host XR_4
int g0/0/0/0
ip add 10.1.34.4/24
no sh
int g0/0/0/1
ip add 10.1.24.4/24
no sh
int l1
ip add 4.4.4.4/32
commit

Step 2 : configure the ospf protocol

XR-1
router ospf 1
router-id 1.1.1.1
area 0
int g0/0/0/0
exit
int g0/0/0/1
exit
commit
XR-2
router ospf 1
router-id 2.2.2.2
area 0
int g0/0/0/0
exit
int g0/0/0/1
commit
XR-3
router ospf 1
router-id 3.3.3.3
area 0
int g0/0/0/0
exit
int g0/0/0/1
commit
XR-4
router ospf 1
router-id 4.4.4.4
area 0
int g0/0/0/0
exit
int g0/0/0/1
int l1
commit

Step 3 :Verification the end to end conectivity

RP/0/0/CPU0:XR_R1#ping 4.4.4.4
Wed Sep 24 12:10:04.724 UTC
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4,
timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), roundtrip min/avg/max = 1/2/9 ms
RP/0/0/CPU0:XR_R1#
RP/0/0/CPU0:XR_R1#show ospf neighbor
Wed Sep 24 12:10:27.282 UTC

* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:38 10.1.12.2
GigabitEthernet0/0/0/0
Neighbor is up for 23:58:46
3.3.3.3 1 FULL/DR 00:00:32 10.1.13.3
GigabitEthernet0/0/0/1
Neighbor is up for 23:58:26
Total neighbor count: 2
RP/0/0/CPU0:XR_R1#
RP/0/0/CPU0:XR_R1#show ospf int br
Wed Sep 24 12:10:44.551 UTC

* Indicates MADJ interface, (P) Indicates fast detect hold
down state
Interfacesfor OSPF 1
Interface PID Area IP Address/Mask Cost State
Nbrs F/C
Gi0/0/0/0 1 0 10.1.12.1/24 1 BDR 1/1
Gi0/0/0/1 1 0 10.1.13.1/24 1 BDR 1/1
RP/0/0/CPU0:XR_R1#
RP/0/0/CPU0:XR_R1#show ospf database
Wed Sep 24 12:10:54.871 UTC

OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 1845 0x8000002d 0x003455 2
2.2.2.2 2.2.2.2 1658 0x8000002d 0x00f574 2
3.3.3.3 3.3.3.3 282 0x8000002e 0x00e95c 2
4.4.4.4 4.4.4.4 206 0x8000002d 0x000601 3

Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
10.1.12.2 2.2.2.2 1658 0x8000002b 0x006e74
10.1.13.3 3.3.3.3 282 0x8000002c 0x006b6c
10.1.24.2 2.2.2.2 1658 0x8000002b 0x00705a
10.1.34.4 4.4.4.4 206 0x8000002c 0x00d1df
RP/0/0/CPU0:XR_R1#

RP/0/0/CPU0:XR_R1#show ospf int g0/0/0/0
Wed Sep 24 12:11:05.350 UTC
GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.1.12.1/24, Area 0
Label stack Primary label 0 Backup label 0 SRTE label 0
Process ID 1, Router ID 1.1.1.1, Network Type
BROADCAST, Cost: 1
Transmit Delay is 1 sec, State BDR, Priority 1, MTU
1500, MaxPktSz 1500
Forward reference No, Unnumbered no, Bandwidth
1000000
Designated Router (ID) 2.2.2.2, Interface address
10.1.12.2

Backup Designated router (ID) 1.1.1.1, Interface
address 10.1.12.1
Timer intervals configured, Hello 10, Dead 40,
Wait 40, Retransmit 5
Hello due in 00:00:02:129
Index 1/1, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 2, maximum is 2
Last flood scan time is 0 msec, maximum is 0
msec
LS Ack List: current length 0, high water mark 4
Neighbor Count is 1, Adjacent neighbor count is 1

Adjacent with neighbor 2.2.2.2 (Designated Router)
Suppress hello for 0 neighbor(s)
Multi-area interface Count is 0

Verfication
– Gather the information
– T-shoot
show ospf int br
show ospf int g0/0/0/0
show ospf
show opsf database

 

About The Author