The OSPF router ID is used to uniquely identify all the routers in the OSPF domain. As a result, it needs to be unique to each router.
When you do a 'sh ip route', it will show you the next-hop address of the router where it displays 'via'. That will not be the router ID. In fact, the router ID does not have much to do with routes. It is there simply so that routers can uniqely identify which router they are receiving information from.
Hope that helps.
Pls do take a moment to rate the posts of people who take the time to respond to your questions.
I am completely agree with pkhatri.One thing i would like to tell that bydefault the highest ip of aphysical interface becomes the routerid.However u can configue a loopback interface(bcoz loopback never goes down and hence becomes router id).
or u can configure a router id by using follwing command
It is not what the DR uses to send packets to. As I indicated in the first post, it's just an identifier. One way to think of this is to consider the following example: say you hvae 4 routers in a network. Now, each router has to have some way of identifying the others. The solution OSPF takes here is to give each router a "name" - which happens to be the OSPF Router ID. Now, every router can tell by looking at an LSA the "name" of the router it received it from.
ON a LAN segment, each router will come to find out the router ID of the DR/BDR as well as the other routers.....
Pls do remember to rate posts.
I will add a couple of things to what's said above. Router ID does provide some functions in addition to being a unique identifier.
In a DR/BDR election if the OSPF priorities are the same, the router with the highest router ID becomes the DR. Virtual links between the routers are created using the RID and not the interface addresses.
Pls. rate all helpful posts.
Hi there, thanks for the reply, Firsty so If I did a debug on the ospf would it show packet recieved from xxxx x being the RID of the other router ? also what is the main aim of the DR and BDR, do these just send out all LSA's to the other routers rather than the other routers flooding the networks with advertisements ?
That will only display the RID for the router you ran it on. To get the RIDs for all routers in the area, use the 'sh ip ospf database' command. The first part of the output will show 'Router Link States' - all of the IDs under the Link ID section of this output are the Router IDs of all the routers in that area.
Pls take a moment to rate replies to your queries as this will encourage people to continue responding to your queries...
so when I do a debug on ospf, will the RID of the neighbour come up when it says I am recieving updates, or will the ip of the interface of the adjacent router be on there ?
You will see both.
E.g If you do a 'debug ip ospf events', the output will be as follows:
Router1#debug ip ospf events
OSPF events debugging is on
*Mar 1 04:04:11.926: OSPF: Rcv hello from 172.16.10.1 area 0 from
In the above output, the RID is 18.104.22.168 whereas the interface IP is 10.10.10.2
Pls do remember to rate posts.
thanks for that, so just to Clarify, if we dont configure a RID it just uses the highest ip of an interface or if a loopback is configured it uses that, So its useful for debugging to see where the updates etc are coming from, just to add, am I correct in saying that on an ethernet network, All changes are propagted to the DR and then this sends them to the DRothers ?
The rule for RID is as follows:
- highest address on a loopback interface
- if no loopback interface exists, it's the highest address on any interface that is up
The DR does indeed have the responsibility of sending all LSAs to the DROthers. If the DROthers have any LSAs to send, they send it to the DRs, and the DR then reflects them to the DROthers...
Pls remember to rate posts.