Cisco IOS XR OSPF

OPSF Grundkonfiguration auf einem IOS XR Cisco Router

hostname XR-1
cdp
cdp advertise v1
interface Loopback1
ipv4 address 1.1.1.1 255.255.255.255
!
interface Loopback11
ipv4 address 11.11.11.11 255.255.255.255
!
interface MgmtEth0/0/CPU0/0
shutdown
!
interface GigabitEthernet0/0/0/0
cdp
ipv4 address 10.10.10.1 255.255.255.252
!
interface GigabitEthernet0/0/0/1
ipv4 address 20.20.20.1 255.255.255.252
!
interface GigabitEthernet0/0/0/2
ipv4 address 30.30.30.1 255.255.255.252
!
router ospf 1
router-id 1.1.1.1
address-family ipv4 unicast
area 0
interface GigabitEthernet0/0/0/0
!
interface GigabitEthernet0/0/0/1
!

!
hostname IOS-1
!
interface Loopback2
ip address 2.2.2.2 255.255.255.255
!
interface Loopback22
ip address 22.22.22.22 255.255.255.255
!
interface Ethernet0/0
ip address 10.10.10.2 255.255.255.252
ip ospf 1 area 0
!
interface Ethernet0/1
ip address 20.20.20.2 255.255.255.252
!
interface Ethernet0/2
ip address 30.30.30.2 255.255.255.252
!
!
router ospf 1
network 10.10.10.0 0.0.0.3 area 0
network 20.20.20.0 0.0.0.3 area 0
!

RP/0/0/CPU0:XR-1#sh ospf neighbor
Thu Mar 9 07:30:09.037 UTC

* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up

Neighbors for OSPF 1

Neighbor ID Pri State Dead Time Address Interface
22.22.22.22 1 FULL/DR 00:00:36 10.10.10.2 GigabitEthernet0/0/0/0
Neighbor is up for 00:06:04
22.22.22.22 1 FULL/DR 00:00:33 20.20.20.2 GigabitEthernet0/0/0/1
Neighbor is up for 00:05:59

RP/0/0/CPU0:XR-1#sh ospf database
Thu Mar 9 07:30:39.195 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 389 0x80000002 0x002d32 2
22.22.22.22 22.22.22.22 389 0x80000004 0x00edb2 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
10.10.10.2 22.22.22.22 395 0x80000001 0x009acd
20.20.20.2 22.22.22.22 389 0x80000001 0x003119

RP/0/0/CPU0:XR-1#sh ospf interface
Thu Mar 9 07:31:10.143 UTC

Interfaces for OSPF 1

GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 10.10.10.1/30, Area 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
Designated Router (ID) 22.22.22.22, Interface address 10.10.10.2
Backup Designated router (ID) 1.1.1.1, Interface address 10.10.10.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Hello due in 00:00:04:847
Index 1/1, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
LS Ack List: current length 0, high water mark 3
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 22.22.22.22 (Designated Router)
Suppress hello for 0 neighbor(s)
Multi-area interface Count is 0
GigabitEthernet0/0/0/1 is up, line protocol is up
Internet Address 20.20.20.1/30, Area 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
Designated Router (ID) 22.22.22.22, Interface address 20.20.20.2
Backup Designated router (ID) 1.1.1.1, Interface address 20.20.20.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

Hello due in 00:00:02:525
Index 2/2, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
LS Ack List: current length 0, high water mark 2
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 22.22.22.22 (Designated Router)
Suppress hello for 0 neighbor(s)
Multi-area interface Count is 0

IOS

IOS-1#sh ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/BDR 00:00:33 20.20.20.1 Ethernet0/1
1.1.1.1 1 FULL/BDR 00:00:35 10.10.10.1 Ethernet0/0

IOS-1#sh ip ospf database

OSPF Router with ID (22.22.22.22) (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 542 0x80000002 0x002D32 2
22.22.22.22 22.22.22.22 540 0x80000004 0x00EDB2 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
10.10.10.2 22.22.22.22 546 0x80000001 0x009ACD
20.20.20.2 22.22.22.22 540 0x80000001 0x003119

IOS-1#sh ip ospf interface
Ethernet0/1 is up, line protocol is up
Internet Address 20.20.20.2/30, Area 0, Attached via Network Statement
Process ID 1, Router ID 22.22.22.22,
Network Type BROADCAST, Cost: 10
Topology-MTID Cost Disabled Shutdown Topology Name
0 10 no no Base
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 22.22.22.22, Interface address 20.20.20.2
Backup Designated router (ID) 1.1.1.1, Interface address 20.20.20.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40
Hello due in 00:00:02
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/2/2, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.1 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
Ethernet0/0 is up, line protocol is up
Internet Address 10.10.10.2/30, Area 0,
Attached via Network Statement
Process ID 1, Router ID 22.22.22.22, Network Type BROADCAST, Cost: 10
Topology-MTID Cost Disabled Shutdown Topology Name
0 10 no no Base
Enabled by interface config, including secondary ip addresses
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 22.22.22.22, Interface address 10.10.10.2
Backup Designated router (ID) 1.1.1.1, Interface address 10.10.10.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40
Hello due in 00:00:07
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 1/1/1, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.1 (Backup Designated Router)
Suppress hello for 0 neighbor(s)


Aufbau der OSPF Konfiguration beim IOS-XR

OSPF Process
Area 0
Interface 1
Interface 2

Area 1
Interface 3
Interface 4

OSPF passive Interface

OSPF passive Interfaces senden keinen Informationen (Hellos) zu OSPF raus und bilden keine Nachbarbezieheungen zur Gegenseite

IOS XR

Router ospf 1
Address-family ipv4 unicats
Passive enable <-- global passive Interface eingeschaltet Area 0 Passive enable <-- in der Area passive Interface eingeschaltet Interface g 0/0/0/0/0 Passive disable <-- auf dem Interface passice Interface ausgeschaltet Load Balancing
IOS max 4 Routes
IOS XR max 16 Routes

IOS
Router ospf 1
Maximum-path 16
Network 30.30.30.0 0.0.0.3
Network 2.2.2.2 0.0.0.0 area 0
network 22.22.22.22 0.0.0.0 area 0

XR
Router ospf 1
Address-family ipv4 unicats
Maximum-path 16
Area 0
Interface gig 0/0/0/2
interface loopback 1
interface loopback 11

RP/0/0/CPU0:XR-1#sh route ospf
Thu Mar 9 09:18:38.431 UTC

O 2.2.2.2/32 [110/2] via 30.30.30.2, 00:01:12, GigabitEthernet0/0/0/2
[110/2] via 20.20.20.2, 00:01:12, GigabitEthernet0/0/0/1
[110/2] via 10.10.10.2, 00:01:12, GigabitEthernet0/0/0/0
O 22.22.22.22/32 [110/2] via 30.30.30.2, 00:01:03, GigabitEthernet0/0/0/2
[110/2] via 20.20.20.2, 00:01:03, GigabitEthernet0/0/0/1
[110/2] via 10.10.10.2, 00:01:03, GigabitEthernet0/0/0/0

IOS-1#sh ip route ospf
….

Gateway of last resort is not set

1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 30.30.30.1, 00:00:11, Ethernet0/2
[110/11] via 20.20.20.1, 00:00:11, Ethernet0/1
[110/11] via 10.10.10.1, 00:00:11, Ethernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/11] via 30.30.30.1, 00:00:11, Ethernet0/2
[110/11] via 20.20.20.1, 00:00:11, Ethernet0/1
[110/11] via 10.10.10.1, 00:00:11, Ethernet0/0

Weitere Area hinzufügen

Einen Netzwerkberecih einer Area hinzufügen

XR

router ospf 1
address-family ipv4 unicats
area 0
interface gig 0/0/0/2
area 1
range 172.16.0.0 /23 advertise
interface gig 0/0/03

IOS
router ospf 1
area 2 range 192.168.0.0 255.255.254.0