I have a misconception in basic theory of OSPF Router ID.
I know that by configuring Loopback Interface, that will become the OSPF Router ID. It will always stay up particularly during Router boots up its interface comes up before ospf starts. That is the advantage.
How about configuring "router-id x.x.x.x" command in "router ospf 15" process.
Does it also behaves similarly or it differs?
Kindly help me
Then what is the advantage of choosing router-id command in OSPF process.
As said by others, it provides consistency in the network in the event the router is rebooted and you have another loopback created in the interim.
The router-id value is used when building virtual-links. If the router-id information is changed between reboot w/o modifying the virtual-link, the virtual-link will never come up.
Hello R.B. Kumar,
the OSPF router-id is used to indicate the advertising router in the LSAs.
Having a loopback address as router-id that is also advertised in OSPF allows to telnet to it after having seen the address in the sh ip ospf database on another node.
To be noted that using the ospf router-id assures consistency over time: a second loopback with an highest ip address can be defined after some time and without the ospf router-id the OSPF RID can change over time after a reload or after a clear ip ospf process.
So because Cisco routers allow to define multiple loopbacks there is no guarantee that the OSPF router-id will not change over time.
So my suggestion is to use both:
use ospf router-id to reference a loopback address that is advertised in OSPF.
Hope to help