12-16-2012 12:15 AM - edited 03-04-2019 06:25 PM
Hi guys,
Just checking today a topology when I noticed something interesting. I attached a simple topology with R1-R4 running OSPF.
There is no special config on either router just the basics:
router ospf 156
log-adjacency-changes
network 155.1.0.0 0.0.255.255 area 0
Let's take R4 routing table:
155.1.0.0/24 is subnetted, 4 subnets
O 155.1.23.0 [110/2] via 155.1.34.3, 00:14:40, FastEthernet0/0
O 155.1.12.0 [110/3] via 155.1.34.3, 00:14:40, FastEthernet0/0
C 155.1.45.0 is directly connected, FastEthernet1/0
C 155.1.34.0 is directly connected, FastEthernet0/0
All good, but when I run show ip protocols:
Routing Protocol is "ospf 156"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 155.1.45.4
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
155.1.0.0 0.0.255.255 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
155.1.23.2 110 00:14:45
155.1.34.3 110 00:14:45
Distance: (default is 110)
So here is my question: if R4 is using only R3 (155.1.34.3) as routing gateway why is R2 (155.1.23.2)
listed there?
Going to the other end, R1 routing table:
155.1.0.0/24 is subnetted, 4 subnets
O 155.1.23.0 [110/2] via 155.1.12.2, 00:17:19, FastEthernet0/0
C 155.1.12.0 is directly connected, FastEthernet0/0
O 155.1.45.0 [110/4] via 155.1.12.2, 00:17:19, FastEthernet0/0
O 155.1.34.0 [110/3] via 155.1.12.2, 00:17:19, FastEthernet0/0
R1#show ip protocols
Routing Protocol is "ospf 156"
Outgoing update filter list for all interfaces is not set
Incoming update filter list for all interfaces is not set
Router ID 155.1.12.1
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
Routing for Networks:
155.1.0.0 0.0.255.255 area 0
Reference bandwidth unit is 100 mbps
Routing Information Sources:
Gateway Distance Last Update
155.1.45.4 110 00:18:31
155.1.34.3 110 00:18:31
Distance: (default is 110)
This time, the routing gateway used is not even present, yet another two "gateways" show up.
Any ideas what is this command (show ip protocols) really showing up?
L.E. topology file attached.
12-16-2012 12:33 AM
In this case it is displaying the OSPF neighbors, referred to as "routing sources" in the output. The output is not dictating or suggesting how traffic should be routed, simply stating which routing protocols are in play and some general info about them.
As for the default gateway not being displayed on R1, my guess would be because the DG for R4 and R1 are different based on the topology, assuming the routers are connected in a ring (I.e. R1-----R2-------R4------R3-----R1....).
If that isn't clear please post configs and ill try to be more detailed in my response.
Sent from Cisco Technical Support iPhone App
12-16-2012 12:49 AM
Hi
Routing Information Sources: | Lists all the routing sources that the Cisco IOS software is using to build its routing table. The following is displayed for each source: |
http://www.cisco.com/en/US/docs/ios/12_3/iproute/command/reference/ip2_s3g.html#wp1039132
This is actually routing information sources. All the routers sending routing information to this router will be listed there
Thanks
Raju
12-16-2012 02:51 AM
##Rajs2
Maybe it supposed to work so (This is actually routing information sources. All the routers sending routing information to this router will be listed there), still it doesn't.
Take for example R1, it receives direct info from R2 as it's next-hop still it is not listed.
##Mitchell
I agree with you, still the info provided by the command doesn't link with neiher: show ip ospf neighbors, show ip route. I don't know what really tries to tell.
Also if we are to take this from the bottom, it would be difficult to "draw" the topology using ONLY show ip protocols on each routers.
##All
You can find the topology attached in the 1st post.
12-16-2012 03:46 AM
Hi
Can you paste me the following outputs from R1 and R4
1. show ip ospf database
Thanks
Raju
12-17-2012 01:45 AM
Hello Florin,
>>Also if we are to take this from the bottom, it would be difficult to "draw" the topology using ONLY
show ip protocols on each routers.
show ip protocols is a general purpose show command with some distance vector bias.
The right show command to draw the OSPF topology is show ip ospf database (as noted by Raju) that shows all the different OSPF data structures.
As noted by Mitchell, within a single OSPF area IP subnets associated to a LAN segment are advertised by OSPF DR of that LAN segment in a LSA type 2 network LSA.
In the case of OSPF a routing source is the OSPF RID of the owner (originator) of an LSA data structure and it doesn't need to be directly connected to the local node where the show is executed, for the flooding of the LSAs.
For OSPF the use of show ip ospf database is more meaningful, with show ip prot summary that can be used just to check what routing protocols processes are running on the device. (at least this is the use I do of show ip protocols summary).
For DV protocols like RIP or IGRP show ip protocols lists as gateway the direct neighbors with at least one prefix advertised.
For OSPF that is link state as you have noted things are different as LSAs are flooded and all routers within an area have an identical link state database (in synch).
Hope to help
Giuseppe
12-16-2012 11:50 AM
Alright, I believe I've gotten to the bottom of this. So given the topology R1 -- R2 -- R3 -- R4, R4 only has two network links that it does NOT know about via directly connected links and will learn about via OSPF, same with R1. The device which advertises this link is based on the DR/BDR election process (priority, or highest router ID). The "Routing Information Sources" section is showing the RID of the DR for the link that is being learned via OSPF.
Now, to the point, output below is from your post above:
R4:
155.1.23.2 110 00:14:45 (R2) DR for the 155.1.12.0/24 link
155.1.34.3 110 00:14:45 (R3) DR for the 155.1.23.0/24 lnk
R1:
155.1.45.4 110 00:18:31 (R4) DR for the 155.1.34.0/24 link
155.1.34.3 110 00:18:31 (R3) DR for the 155.1.23.0/24 link
Hope that helps, good question though!
12-17-2012 12:41 PM
Hi Mitchell,
You are right about it: show ip protocols on OSPF show DR for the advertised links.
Giuseppe, thank for the input also. We all appreciate your answers and your rich expertise to this field. And as you underlined I believe show ip protocols was designed at first for distance vector routing protocols.
For anyone else and offcourse you two I invite you to follow another question I raised about multicast between a host and 1st hop router.
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