Thursday, April 15, 2021

OSPF database output understanding

Hello folks,

Let me preface this by saying, this is the network/scenario that I have to work with. This is not an ideal config/design, but I cannot really change this today.

I am trying to wrap my head around a scenario and why the OSPF database behaves the way it does.

https://i.imgur.com/mNF4oTz.png

R7, far right, is advertising 7.7.7.7/32 into OSPF

R2 is where I am performing my verifications. My goal is to understand what the OSPF database on R2 is the way it is, specifically the external routes in process 24.

Here are the redistributions that happen from right to left. Metric-type 1.

R3: Process 35 Area 35 > Process 23 Area 0 R3: Process 35 Area 35 > Process 1 Area 0 R5: Process 35 Area 35 > Process 45 Area 0 R4: Process 45 Area 0 > Process 24 Area 24 R2: Process 23 Area 0 > Process 24 Area 24 R2: Process 1 Area 0 > Process 24 Area 24 

All interfaces have default cost of 10. Loopback on R7 is 1

IOU2#show ip ospf int br Interface PID Area IP Address/Mask Cost State Nbrs F/C Et0/2 23 0 23.23.23.2/24 10 BDR 1/1 Et1/1 24 24 26.26.26.2/24 10 BDR 1/1 Et0/1 24 24 24.24.24.2/24 10 BDR 1/1 Et0/0 1 0 12.12.12.2/24 10 DR 1/1 

Database Output

IOU2#show ip ospf database external 7.7.7.7 OSPF Router with ID (23.23.23.2) (Process ID 23) Type-5 AS External Link States Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1175 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 23.23.23.3 LS Seq Number: 80000001 Checksum: 0x8A3B Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 11 Forward Address: 0.0.0.0 External Route Tag: 0 OSPF Router with ID (12.12.12.2) (Process ID 24) Type-5 AS External Link States LS age: 1174 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 12.12.12.2 LS Seq Number: 80000001 Checksum: 0xFDDF Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 21 Forward Address: 0.0.0.0 External Route Tag: 0 Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1165 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 24.24.24.4 LS Seq Number: 80000001 Checksum: 0xD0E6 Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 21 Forward Address: 0.0.0.0 External Route Tag: 0 OSPF Router with ID (24.24.24.2) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1176 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 13.13.13.3 LS Seq Number: 80000001 Checksum: 0x7B68 Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 11 Forward Address: 0.0.0.0 External Route Tag: 0 IOU2#show ip route 7.7.7.7 Routing entry for 7.7.7.7/32 Known via "ospf 23", distance 110, metric 21, type extern 1 Redistributing via ospf 24 Advertised by ospf 24 metric-type 1 subnets Last update from 23.23.23.3 on Ethernet0/2, 00:00:01 ago Routing Descriptor Blocks: * 23.23.23.3, from 23.23.23.3, 00:00:01 ago, via Ethernet0/2 Route metric is 21, traffic share count is 1 

Why does R2 not have 3 entries for the link id 7.7.7.7 ? It lists one entry from R4 and one from its redistribution from Process 23. The redistribution from Process 1 Area 0 is not shown in the Process 24 Area 24 database

Now if I bump up the cost of E0/2 on R2 to 100

IOU2#show ip ospf int br Interface PID Area IP Address/Mask Cost State Nbrs F/C Et0/2 23 0 23.23.23.2/24 100 BDR 1/1 Et1/1 24 24 26.26.26.2/24 10 BDR 1/1 Et0/1 24 24 24.24.24.2/24 10 BDR 1/1 Et0/0 1 0 12.12.12.2/24 10 DR 1/1 IOU2#show ip ospf database external 7.7.7.7 OSPF Router with ID (23.23.23.2) (Process ID 23) Type-5 AS External Link States Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1219 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 23.23.23.3 LS Seq Number: 80000001 Checksum: 0x8A3B Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 11 Forward Address: 0.0.0.0 External Route Tag: 0 OSPF Router with ID (12.12.12.2) (Process ID 24) Type-5 AS External Link States LS age: 8 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 12.12.12.2 LS Seq Number: 80000002 Checksum: 0x6072 Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 31 Forward Address: 0.0.0.0 External Route Tag: 0 Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1209 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 24.24.24.4 LS Seq Number: 80000001 Checksum: 0xD0E6 Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 21 Forward Address: 0.0.0.0 External Route Tag: 0 OSPF Router with ID (24.24.24.2) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA in topology Base with MTID 0 LS age: 1220 Options: (No TOS-capability, DC, Upward) LS Type: AS External Link Link State ID: 7.7.7.7 (External Network Number ) Advertising Router: 13.13.13.3 LS Seq Number: 80000001 Checksum: 0x7B68 Length: 36 Network Mask: /32 Metric Type: 1 (Comparable directly to link state metric) MTID: 0 Metric: 11 Forward Address: 0.0.0.0 External Route Tag: 0 IOU2#show ip route 7.7.7.7 Routing entry for 7.7.7.7/32 Known via "ospf 1", distance 110, metric 31, type extern 1 Redistributing via ospf 24 Advertised by ospf 24 metric-type 1 subnets Last update from 12.12.12.1 on Ethernet0/0, 00:04:20 ago Routing Descriptor Blocks: * 12.12.12.1, from 13.13.13.3, 00:04:20 ago, via Ethernet0/0 Route metric is 31, traffic share count is 1 

Now the redistributed entry from Process 1 Area 0 shows up, but not from Process 23 Area 0.

I'm sure this is cost related, but I cannot seem to find a reference to this anywhere in any document.



No comments:

Post a Comment