cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
36288
Views
25
Helpful
9
Replies

Command to see all possible OSPF routes?

guibarati
Enthusiast
Enthusiast

Hi,

Is there a command where I can see all the possible OSPF routes to a destination AND it's metric?

I know I can use the "show ip ospf database...". But I will get the link states and would have to calculate myself.

Also if I use "show ip route" I will get only the installed route, I can't see the alternative ones.

"show ip ospf rib" Also does not show all the routes to a destination.

I want to know if there is a command that show all the alternative routes if it is installed on the route table or not. (If the route installed is from eigrp for exemple, and I still have 2 more routes through OSPF)

Thanks,

1 Accepted Solution

Accepted Solutions

Hi,

You can use 'show ip ospf route.'

Hope this is what you're looking for.


Sent from Cisco Technical Support iPhone App

View solution in original post

9 Replies 9

guibarati
Enthusiast
Enthusiast

nobody?

Hi,

You can use 'show ip ospf route.'

Hope this is what you're looking for.


Sent from Cisco Technical Support iPhone App

The ios I'm using has it as a hidden command.

It makes it much easier, but still doens't show all the possible paths.

marked as correct cuz I think that's the better we can get.

I tested on a router that I knew had two paths to get somewhere, but this command still only shows the best one.

I wish there was more information, like: there are 2 paths, this one with X cost, this one with Y cost. Best one is this. Like show ip bgp style.

Thanks!

This command does not show all possible routes in OSPF. It shows OSPF routes that exist in the routing table, it's not like what you see in OSPF database.
I do not think there is a command to show what you are after, but would be such a useful feature to have!!

Sent from Cisco Technical Support iPhone App

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

'show ip ospf rib' will give you the information you want. Note that '>" indicates whether this route will be installed in the routing table. Not having  '>' may be an indication the router has a path to the prefix via another routing protocol with a lower AD . In the case illustrated below (4.4.4.0/24) redistributed routes from EIGRP into OSPF have had the AD altered to be 175 (from 110). Unlike EIGRP, OSPF does not change the AD of redistributed routes by default, but rather leaves those at 110. EIGRP will set them at 170 and internal routes will be at 90.

R22#sh ip ospf rib

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


Base Topology (MTID 0)

OSPF local RIB
Codes: * - Best, > - Installed in global RIB

*> 1.1.1.0/24, Ext2, cost 20, tag 0
via 12.12.12.1, Ethernet0/0
*> 3.3.3.0/24, Ext2, cost 20, tag 0
via 12.12.12.1, Ethernet0/0
* 4.4.4.0/24, Ext2, cost 20, tag 0
via 12.12.12.1, Ethernet0/0
* 12.12.12.0/24, Intra, cost 10, area 0, Connected
via 12.12.12.2, Ethernet0/0
*> 13.13.13.0/24, Intra, cost 20, area 0
via 12.12.12.1, Ethernet0/0
* 24.24.24.0/24, Ext2, cost 20, tag 0
via 12.12.12.1, Ethernet0/0

Routing entry for 4.4.4.0/24
Known via "eigrp 1", distance 170, metric 409600, type external
Redistributing via ospf 1, eigrp 1
Advertised by ospf 1 subnets
Last update from 24.24.24.2 on Ethernet0/1, 00:16:05 ago
Routing Descriptor Blocks:
* 24.24.24.2, from 24.24.24.2, 00:16:05 ago, via Ethernet0/1
Route metric is 409600, traffic share count is 1
Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1

Hope this helps

That doesn't actually give you all the possible routes. Only gives you the routes that your routers accepted with the best possible cost... For instance, using the "show ip ospf rib" as suggested gives me the following for a particular route:

 

*> 208.82.102.0/24, Intra, cost 1163, area 0
via 147.92.88.3, GigabitEthernet0/1.95
via 147.92.88.198, GigabitEthernet0/0

I do however know for a fact that there is a more "expensive" cost route coming in via my GigabitEthernet 0/0.88 interface which is not being displayed as the calculated cost should have been around 1263 rather than the 1163 in the RIB.

 

So that doesn't actually answer his question above (or mine which is how I found this thread).

 

Marcos

 

 

 

Below command will display all the routes received by the router from the ospf neighbors. 

 

show ip ospf database topology 

Joseph W. Doherty
Hall of Fame Master Hall of Fame Master
Hall of Fame Master
Unlike EIGRP, I believe OSPF discards all higher cost paths (not the LSAs, though), once it has calculated the best path to each destination network.. I.e. I don't believe you'll find that information.

dheeraj_kavoor
Beginner
Beginner

show ip ospf database detail   will list the different transit networks the LSA for that prefix is connected to. You can then figure out what path it might take to reach the destination if the cost is changed, and there is a link failure on the best path.

Thanks

Dheeraj

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: