06-15-2023 12:12 AM
Hi everyone,
The topology like below,
The switches and routers in the diagram all have OSPF connection.
R1,R2,R3,SW1 are in area0.
R4,R5,SW2 are in area4
I got two WAN, WAN-A & WAN-B. When reaching destination 172.24.2.0/24, primary is using WAN-A. But when we used prefix-list to stop propagating 172.24.2.0/24 on R1, reaching destination 172.24.2.0/24 will go through WAN-B.
when using WAN-B, on R3, the metric/cost reaching 172.24.2.0/24 is 1001.
#sh ip ro 172.24.2.0
Routing entry for 172.24.2.0/24
Known via "ospf 100", distance 110, metric 1001, type intra area
Last update from 192.168.39.182 on Tunnel1620, 1d03h ago
Routing Descriptor Blocks:
* 192.168.39.182, from 10.42.249.23, 1d03h ago, via Tunnel1620
Route metric is 1001, traffic share count is 1
However, on SW1, the metric/cost reaching 172.24.2.0/24 is 358.
sh ip ro 172.24.2.0
Routing entry for 172.24.2.0/24
Known via "ospf 64", distance 110, metric 358, type inter area
Last update from 10.42.252.145 on TenGigabitEthernet1/2/1, 03:49:31 ago
Routing Descriptor Blocks:
* 10.42.252.145, from 192.168.13.4, 03:49:31 ago, via TenGigabitEthernet1/2/1
Route metric is 358, traffic share count is 1
How come the metric is even smaller when the device is more far away from 172.24.2.0/24? Isn't it the metric/cost of OSPF accumulate?
================================================
Also, i got another question, when using "show ip ospf database summary 172.24.2.0" on R3, the Advertising Router is R2. Isn't it R3 a ABR already? it has one interface in area0 and one interface in area4. How come the Advertising Router is R2?
LS age: 1303
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 172.24.2.0 (summary Network Number)
Advertising Router: 192.168.12.4 ----->R2
LS Seq Number: 80000086
Checksum: 0xEB8E
Length: 28
Network Mask: /24
MTID: 0 Metric: 252
=========================================
Please help, i tried to find the answer but has no clue so far.
Solved! Go to Solution.
06-29-2023 07:09 PM
unfortunately, R1 has no area99
=============R1 config===========
R1#sh run | sec ospf
router ospf 1
queue-depth update 1024
area 0 filter-list prefix area0_out out
area 1 range 192.168.15.0 255.255.255.0
area 1 range 192.168.16.0 255.255.255.0
area 1 range 192.168.17.0 255.255.255.0
area 1 range 192.168.18.0 255.255.255.0
area 1 range 192.168.19.0 255.255.255.0
area 1 filter-list prefix area1_out out
area 2 range 192.168.20.0 255.255.255.0
area 2 range 192.168.21.0 255.255.255.0
area 2 range 192.168.22.0 255.255.255.0
area 2 range 192.168.23.0 255.255.255.0
area 2 filter-list prefix area2_out out
area 3 range 192.168.24.0 255.255.255.0
area 3 range 192.168.25.0 255.255.255.0
area 3 range 192.168.26.0 255.255.255.0
area 3 range 192.168.27.0 255.255.255.0
area 3 range 192.168.28.0 255.255.255.0
area 3 filter-list prefix area3_out out
area 4 range 192.168.29.0 255.255.255.0
area 4 range 192.168.30.0 255.255.255.0
area 4 range 192.168.31.0 255.255.255.0
area 4 range 192.168.32.0 255.255.255.0
area 4 range 192.168.33.0 255.255.255.0
area 4 filter-list prefix area4_out out
passive-interface GigabitEthernet0/0/0.99
passive-interface GigabitEthernet0/0/0.100
network 10.42.252.4 0.0.0.3 area 0
network 10.42.252.12 0.0.0.3 area 0
network 192.168.12.3 0.0.0.0 area 0
network 192.168.14.0 0.0.0.255 area 0
network 192.168.15.0 0.0.0.255 area 1
network 192.168.16.0 0.0.0.255 area 1
network 192.168.17.0 0.0.0.255 area 1
network 192.168.18.0 0.0.0.255 area 1
network 192.168.19.0 0.0.0.255 area 1
network 192.168.20.0 0.0.0.255 area 2
network 192.168.21.0 0.0.0.255 area 2
network 192.168.22.0 0.0.0.255 area 2
network 192.168.23.0 0.0.0.255 area 2
network 192.168.24.0 0.0.0.255 area 3
network 192.168.25.0 0.0.0.255 area 3
network 192.168.26.0 0.0.0.255 area 3
network 192.168.27.0 0.0.0.255 area 3
network 192.168.28.0 0.0.0.255 area 3
network 192.168.29.0 0.0.0.255 area 4
network 192.168.30.0 0.0.0.255 area 4
network 192.168.31.0 0.0.0.255 area 4
network 192.168.32.0 0.0.0.255 area 4
network 192.168.33.0 0.0.0.255 area 4
network 192.168.35.4 0.0.0.3 area 0
network 192.168.39.0 0.0.0.255 area 4
R1#sh run | be ip prefix-list
ip prefix-list area0_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area0_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area0_out seq 30 permit 0.0.0.0/0
ip prefix-list area0_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area1_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area1_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area1_out seq 30 permit 0.0.0.0/0
ip prefix-list area1_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area2_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area2_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area2_out seq 30 permit 0.0.0.0/0
ip prefix-list area2_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area3_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area3_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area3_out seq 30 permit 0.0.0.0/0
ip prefix-list area3_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area4_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area4_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area4_out seq 30 permit 0.0.0.0/0
ip prefix-list area4_out seq 35 permit 172.16.0.0/12 le 32
=================================
06-30-2023 06:42 AM - edited 06-30-2023 06:45 AM
You see prefix in area 99 because SW is advertise not learn this prefix to area 99.
Advertise router is router-id of SW.
07-01-2023 07:27 AM
what i don't understand is why area99 advertise the prefix 172.24.2.0/24? There is no "network 172.24.2.0 0.0.0.255 area 99" command on SW01
07-01-2023 07:35 AM
SW1 is in area 0 and it adverise prefix to area99 not area99 router advertise prefix to SW1
Check the advertise router id' it must be SW1 id.
07-02-2023 09:29 PM
When we filter out 172.24.2.0/24 on R1, we can see the the metric is 358 on SW01 for route 172.24.2.0/24.
However for "show ip ospf database summary" , we can see the metric of LSA type3 advertised from 10.42.249.80(R3) is 1001.
So the question is where "metric 358" comes from ?
-----------------------------------------------
sw01# sh ip ro 172.24.0.0
Routing entry for 172.24.0.0/24, 4 known subnets
O IA 172.24.2.0
[110/358] via 10.42.252.145, 00:00:12, TenGigabitEthernet1/2/1 (10.42.252.145 ==> R3)
-----------------------------------------------
sw01# sh ip ospf database summary 172.24.2.0
OSPF Router with ID (10.42.249.41) (Process ID 64)
Summary Net Link States (Area 0)
LS age: 614
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 172.24.2.0 (summary Network Number)
Advertising Router: 10.42.249.80 (10.42.249.80 ==>R3)
LS Seq Number: 800000AF
Checksum: 0xB51
Length: 28
Network Mask: /24
MTID: 0 Metric: 1001
LS age: 831
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 172.24.2.0 (summary Network Number)
Advertising Router: 192.168.12.4 ( 192.168.12.4 ==>R2)
LS Seq Number: 800000AF
Checksum: 0x99B7
Length: 28
Network Mask: /24
MTID: 0 Metric: 252
07-10-2023 01:10 AM
anyone can help on the issue?
07-10-2023 01:22 AM
did you ever see my previous photo ?
the R2 inject route not R1
need to you filter in R2 prevent R2 from advertise LSA3 for prefix into Area0
07-11-2023 02:01 AM
I tried to filter in R2, and everything works properly. The metric of route 172.24.2.0/24 becomes 1002 on SW1.
But I still don't understand that why. Applying filter in R1, then as your saying, R2 injects route to SW1. But the next hop of the route on SW1 is R3 and yet the metric of the route is 358 which is from R2?
=========after applying filter in R2 & R1===============
sw01# sh ip ro 172.24.0.0
Routing entry for 172.24.0.0/24, 4 known subnets
O IA 172.24.2.0 [110/1002] via 10.42.252.145, 00:00:34, TenGigabitEthernet1/2/1
=========after applying filter in R1==================
sw01# sh ip ro 172.24.0.0
Routing entry for 172.24.0.0/24, 4 known subnets
O IA 172.24.2.0
[110/358] via 10.42.252.145, 00:00:12, TenGigabitEthernet1/2/1 (next hop is 10.42.252.145 ==> R3, yet the metric is 358 from R2?)
07-12-2023 07:05 PM
anyone can kindly explain the phenomenon?
07-12-2023 07:45 PM
Not sure it will help much but coming over the configs I noticed a few things.
1. We don't have all the configs for all the devices. So we cant determine with 100% certainty of what the network is doing or supposed to look like.
2. In OSPF its not about the longest path but the cost associated with it. I did notice the path cost for both directions has been modified
From R1->R2 = 60
From R2->R4 = 250 (so this path cost is 310 + the cost from R4->S2 AND the cost from Sw1->R1) if I were to guess the unknown numbers added to the 310 we know about is gonna be 358 you see.
From R3->R5 the cost is 500. (So the path cost is 500 + the cost from R5->S2 AND the cost from SW1->R3)....my best guess is its 501 to give you the 1001 path cost.
Also keep in mind path cost is taken into account AFTER the other path selection mechanism of origination (Inter-Area vs Intra-Area)
As far as the other advertisements from Area 99 and filtering there is a lot more to it and some dep dive into OSPF and how your network is operating may be in order.
Hope that helps
-David
07-13-2023 12:18 AM
Thanks for your explanation.
But what i don't understand is why the next hop of the best route of 172.24.2.0/24 on SW1 is R3 , yet the metric of the best route is 358 from R2 instead of 1002??
=========after applying filter in R2 & R1===============
sw01# sh ip ro 172.24.0.0
Routing entry for 172.24.0.0/24, 4 known subnets
O IA 172.24.2.0 [110/1002] via 10.42.252.145, 00:00:34, TenGigabitEthernet1/2/1 (10.42.252.145 ==> R3 )
=========after applying filter in R1==================
sw01# sh ip ro 172.24.0.0
Routing entry for 172.24.0.0/24, 4 known subnets
O IA 172.24.2.0
[110/358] via 10.42.252.145, 00:00:12, TenGigabitEthernet1/2/1 (next hop is 10.42.252.145 ==> R3, yet the metric is 358 from R2?)
07-13-2023 02:14 AM
Did you see Dark TV series, this issue is same ...LOL
ok,
can I see how you filter prefix, may be we are looking to different side of issue.
thanks
MHM
07-13-2023 08:21 PM
No, I didn't see the Dark TV series. Any links?
The following is the filter I applied on R1 and R2
ip prefix-list area0_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area0_out seq 15 deny 172.24.2.0/24 le 32
ip prefix-list area0_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area0_out seq 30 permit 0.0.0.0/0
ip prefix-list area0_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area1_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area1_out seq 15 deny 172.24.2.0/24 le 32
ip prefix-list area1_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area1_out seq 30 permit 0.0.0.0/0
ip prefix-list area1_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area2_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area2_out seq 15 deny 172.24.2.0/24 le 32
ip prefix-list area2_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area2_out seq 30 permit 0.0.0.0/0
ip prefix-list area2_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area3_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area3_out seq 15 deny 172.24.2.0/24 le 32
ip prefix-list area3_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area3_out seq 30 permit 0.0.0.0/0
ip prefix-list area3_out seq 35 permit 172.16.0.0/12 le 32
!
ip prefix-list area4_out seq 10 deny 192.168.0.0/16 le 32
ip prefix-list area4_out seq 15 deny 172.24.2.0/24 le 32
ip prefix-list area4_out seq 20 permit 10.0.0.0/8 le 32
ip prefix-list area4_out seq 30 permit 0.0.0.0/0
ip prefix-list area4_out seq 35 permit 172.16.0.0/12 le 32
router ospf 1
queue-depth update 1024
area 0 filter-list prefix area0_out out
area 1 filter-list prefix area1_out out
area 2 filter-list prefix area2_out out
area 3 filter-list prefix area3_out out
area 4 filter-list prefix area4_out out
07-20-2023 07:05 PM
Anyone can explain why the next hop would be R3 but yet the OSPF metric is from R2?
07-25-2023 12:16 AM
anyone can help? Or it is a very tricky question?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide