- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2013 04:51 AM - edited 03-07-2019 01:58 PM
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,
Solved! Go to Solution.
- Labels:
-
Other Switching
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2013 08:29 PM
Hi,
You can use 'show ip ospf route.'
Hope this is what you're looking for.
Sent from Cisco Technical Support iPhone App
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2013 09:39 AM
nobody?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2013 08:29 PM
Hi,
You can use 'show ip ospf route.'
Hope this is what you're looking for.
Sent from Cisco Technical Support iPhone App
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2013 07:14 AM
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!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2013 01:32 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2016 05:43 PM
'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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2018 11:34 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2018 10:33 AM
Below command will display all the routes received by the router from the ospf neighbors.
show ip ospf database topology
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2018 02:34 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 11:33 PM
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
