cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5644
Views
20
Helpful
10
Replies

OSPF how to see all possible routes to destination?

Hello, below I added a screen of my simple test ospfv2 network.

From router IOU3 to IP 10.0.0.1/32 - two ways. One more short via IOU1 and another longer via IOU2.

Default traceroute from IOU3 is:

 

IOU3#traceroute 10.0.0.1
1 192.168.1.2 1 msec 0 msec 1 msec
2 192.168.5.2 1 msec 2 msec 1 msec
 

IF I disable the interface e0/0 on IOU1 then traceroute 10.0.0.1 from IOU3

 

IOU3#traceroute 10.0.0.1
1 192.168.2.2 0 msec 1 msec 1 msec
2 192.168.3.2 1 msec 2 msec 0 msec
3 192.168.4.2 2 msec 1 msec 2 msec

 

As you see OSPF finds an alternate path. Then I enable interface e0/0 on IOU1 to back original settings.

 

When I write a command

 sh ip route ospf 

I see one best route to 10.0.0.1/32

IOU3#sh ip route ospf

10.0.0.0/32 is subnetted, 1 subnets
O 10.0.0.1 [110/21] via 192.168.1.2, 00:15:15, Ethernet0/0

 

I want to understand what command should I use to see an alternative path to 10.0.0.1/32 via 192.168.2.2

 

I tried

  sh ip ospf rib 10.0.0.1

it does not show the necessary information.

*> 10.0.0.1/32, Intra, cost 21, area 0
SPF Instance 16, age 00:18:48
Flags: RIB, HiPrio
via 192.168.1.2, Ethernet0/0
Flags: RIB
LSA: 1/10.10.10.4/10.10.10.4

 

Please help me understand how I can see an alternate route to 10.0.0.1/32 from router IOU3 (look picture below)?

 

OSPFv2-net.jpg

 

1 Accepted Solution

Accepted Solutions

Joseph W. Doherty
Hall of Fame
Hall of Fame

I believe, OSPF drops worst paths ASAP from its SPF.

I.e. unlike EIGRP, OSPF doesn't retain an alternate or next best path.  If currently active path fails, it has to actually recompute SPF.  So, as far as I know there's no command to "see" the next best path.

Also BTW, if next best path port is "on" router that just lost what was the best path port, switch over is very fast (especially if Cisco's iSPF is active).  But, if lost path is further "downstream", it takes longer as "upstream" routers need to be notified to re-converge.  (BTW, for ECMP paths, that's the fasted possible switch over, i.e. all traffic sent to remaining active path.)

E.g.:

Assuming your "longer (number of hops) path", in your diagram was the best path and the next hop link on that path, on IOU 3 or 4 failed, switch over would be very fast.  However, if link between IOU 2 and 5 failed, IOS 3 or 4 would need notification from their neighbor before they would recompute SPF and reroute to other path.  (The latter can get interesting because different vendors deal with LSA transmission, differently.  Cisco has various proprietary OSPF hold and back-off timers [mostly to avoid impact of a flapping link].)

View solution in original post

10 Replies 10

marce1000
Hall of Fame
Hall of Fame

 

 - Can you try

 show ip ospf route 

 

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

No it also dose not help, see below.

 

IOU3#sh ip ospf route

OSPF Router with ID (10.10.10.3) (Process ID 1)


Base Topology (MTID 0)


Area BACKBONE(0)

Intra-area Route List

* 192.168.2.0/24, Intra, cost 10, area 0, Connected
via 192.168.2.1, Ethernet0/1
* 192.168.1.0/24, Intra, cost 10, area 0, Connected
via 192.168.1.1, Ethernet0/0
*> 192.168.5.0/24, Intra, cost 20, area 0
via 192.168.1.2, Ethernet0/0
*> 192.168.3.0/24, Intra, cost 20, area 0
via 192.168.2.2, Ethernet0/1
*> 192.168.4.0/24, Intra, cost 30, area 0
via 192.168.1.2, Ethernet0/0
via 192.168.2.2, Ethernet0/1
*> 10.0.0.1/32, Intra, cost 21, area 0
via 192.168.1.2, Ethernet0/0

First Hop Forwarding Gateway Tree

192.168.1.1 on Ethernet0/0, count 1
192.168.1.2 on Ethernet0/0, count 3
192.168.2.1 on Ethernet0/1, count 1
192.168.2.2 on Ethernet0/1, count 2
IOU3#

Yes

show ip route

shows the content of the IP routing table and OSPF will insert the best route in the IP routing table and not any inferior routes into the routing table. To see alternate routes in ospf use

show ip ospf 

database.

HTH

Rick

Hi Richard. I entered recommended command and did not see a second path( The question is steel actual.

 

IOU3#sh ip ospf database

OSPF Router with ID (10.10.10.3) (Process ID 1)

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
10.10.10.1 10.10.10.1 505 0x80000003 0x000217 2
10.10.10.2 10.10.10.2 514 0x80000003 0x000C0D 2
10.10.10.3 10.10.10.3 466 0x80000003 0x007BA1 2
10.10.10.4 10.10.10.4 466 0x80000005 0x0026C7 3
10.10.10.5 10.10.10.5 500 0x80000004 0x0012FB 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
192.168.1.1 10.10.10.3 466 0x80000002 0x005A12
192.168.2.1 10.10.10.3 466 0x80000002 0x005D0D
192.168.3.2 10.10.10.5 500 0x80000002 0x005014
192.168.4.1 10.10.10.5 500 0x80000002 0x006BF6
192.168.5.2 10.10.10.4 466 0x80000002 0x00283D

The OSPF not support not equal multi path, so we need to change the cost make Path 1 same cost to path 2 and we will see both path in routing table.

I agree with you. But in my scheme 2 different ways to 10.0.0.1 from router IOU3  and I want with some command to see this different way with another cost. And hope someone knows how to see this alternative way.

Joseph W. Doherty
Hall of Fame
Hall of Fame

I believe, OSPF drops worst paths ASAP from its SPF.

I.e. unlike EIGRP, OSPF doesn't retain an alternate or next best path.  If currently active path fails, it has to actually recompute SPF.  So, as far as I know there's no command to "see" the next best path.

Also BTW, if next best path port is "on" router that just lost what was the best path port, switch over is very fast (especially if Cisco's iSPF is active).  But, if lost path is further "downstream", it takes longer as "upstream" routers need to be notified to re-converge.  (BTW, for ECMP paths, that's the fasted possible switch over, i.e. all traffic sent to remaining active path.)

E.g.:

Assuming your "longer (number of hops) path", in your diagram was the best path and the next hop link on that path, on IOU 3 or 4 failed, switch over would be very fast.  However, if link between IOU 2 and 5 failed, IOS 3 or 4 would need notification from their neighbor before they would recompute SPF and reroute to other path.  (The latter can get interesting because different vendors deal with LSA transmission, differently.  Cisco has various proprietary OSPF hold and back-off timers [mostly to avoid impact of a flapping link].)

Thank you very much Joseph!

https://www.cisco.com/c/en/us/support/docs/ip/ip-routing/200225-Configure-Loop-Free-Alternate-path-with.html

cisco support backup-path "repair" but with config of

Fast-rerout.


I try use 7200 image in GNS3 but it not support this feature may be other image support this feature for OSPF.

Ah, a feature option for OSPF of which I was unaware.  Interesting!  Basically, would save the time of a SPF re-calc before an alternative path is used.

For really fast switch over, though, I suspect you would still want to "adjust" Cisco's OSPF timers.  (Because, for a further "downstream" break, I believe router would still need to be notified its primary path is no longer usable.)

"I try use 7200 image in GNS3 but it not support this feature may be other image support this feature for OSPF."

Considering the age and current support level of 7200s and tech notes is from 6/7/18, likely no 7200 IOS supports this feature.