03-22-2009 08:19 PM - edited 03-06-2019 04:44 AM
Hi every body!
My book says something as to how to configure router id under ospf process without giving any example.
For example book shows:
router ospf 1
router-id ---------
could any body please give me example?
thanks a lot!
Solved! Go to Solution.
03-22-2009 08:24 PM
This is just copy and paste from some website:
Description: Router ID is the tie-breaker for OSPF path selection. The path selection process uses a variety of metrics to select a route. If all other metrics (accessibility, administrative weight, local preference, etc.) are equal, OSPF determines the router ID using the following priority:
Use the address configured by the ospf router-id command
Use the address of the loopback 0 interface
Use the highest IP address of any interface
If no interface exists, set the router-ID to 0.0.0.0
If no OSPF router ID is explicitly configured, OSPF computes the router-ID based on the items 2, 3, and 4 and restarts OSPF (if the process is enabled and router-ID has changed).
Example: In the following example, the ospf router-id ip-address command configures the router ID as 5.1.1.49, and the show ip ospf command displays the setting:
router(config-router)#ospf router-id 5.1.1.49
router(config-router)#end
Thanks,
Mohamad
03-22-2009 08:25 PM
Hi Zeeshan,
I understand that your question is what comes after the router-id command?
It should be an IP Address, which you want to designate as the router ID while configuring OSPF.
In such scenarios try to look for Command Reference Guide, where all the detals about the usage of a command is given.
Have a look at this for details on router-id -
http://www.cisco.com/en/US/docs/ios/12_2/iproute/command/reference/1rfospf.html#wp1049279
-> Sushil
03-22-2009 09:51 PM
I agree with Mohammad. I always put the loopback IP Address (/32).
03-22-2009 10:25 PM
Hi,
I have some views please correct if I am wrong.
This router ID is used to identify neighbour router in the network to build adjacency. By default it is highest IP address on any loopback.( L0,L1...)
If there is no loopback then highest iP address on any physical interface
But if there is no ip address defined on loopback or physical interface then you cannot start OSPF (as I know) but yop are saying it will take 0.0.0.0
Also this id will be used when DR/BDR selection take place if all routers have same priority.
03-23-2009 02:28 AM
Hello Sarah,
I guess you are also interested on why we should configure an OSPF router-id:
the main reason is to assure consistency over time.
Without an explicit configuration the OSPF Router-ID can change:
example :
after some time a new loopback address with an higher ip address is added.
no changes is observed until the OSPF process is restarted or the whole router is reloaded.
After that, OSPF at startup picks the highest loop ip address as router id.
This is not desirable: we want to trace a node with a specific ip address.
To be noted that the router-id argument is an ip address but doesn't need to be an ip address associated to a real interface on the router.
Also the router-id could be an ip address that is not advertised in OSPF or other manner (doesn't need to be routed and reachable)
However, one of the best practices is to use a /24 space taken from address plan and to allocate a /32 ip address to each router and to advertise them in OSPF.
Other note: if using BGP and OSPF to have a successful redistribution of OSPF into BGP the two router-id must be the same.
Hope to help
Giuseppe
03-23-2009 07:47 AM
If yes, then how could i just change the reference bandwidth for one ospf enabled interface without changing the reference
bandwidth for all ospf-enabled interfaces?
You can't selectively use 'auto reference bandwidth'. It's all or nothing. If you want to modify the 'cost' of the interface (that's what the auto reference bandwidth actually does), then you can use the ip ospf cost command or the bandwidth command under the intended interface.
The ip ospf cost command is ideal on this type of task since it only affects the OSPF calculation while the bandwidth command affects not only OSPF but other routing protocols and QoS.
HTH,
__
Edison.
03-23-2009 07:51 AM
Sarah
auto-cost reference-bandwidth as you say affects all OSPF interfaces on the router.
If you want to change an individual interface then you can use the "ip ospf cost" interface command.
Edit - sorry Edison was posting while you posted and anyway your answer is better than mine :)
Jon
03-22-2009 08:24 PM
This is just copy and paste from some website:
Description: Router ID is the tie-breaker for OSPF path selection. The path selection process uses a variety of metrics to select a route. If all other metrics (accessibility, administrative weight, local preference, etc.) are equal, OSPF determines the router ID using the following priority:
Use the address configured by the ospf router-id command
Use the address of the loopback 0 interface
Use the highest IP address of any interface
If no interface exists, set the router-ID to 0.0.0.0
If no OSPF router ID is explicitly configured, OSPF computes the router-ID based on the items 2, 3, and 4 and restarts OSPF (if the process is enabled and router-ID has changed).
Example: In the following example, the ospf router-id ip-address command configures the router ID as 5.1.1.49, and the show ip ospf command displays the setting:
router(config-router)#ospf router-id 5.1.1.49
router(config-router)#end
Thanks,
Mohamad
03-22-2009 10:25 PM
Hi,
I have some views please correct if I am wrong.
This router ID is used to identify neighbour router in the network to build adjacency. By default it is highest IP address on any loopback.( L0,L1...)
If there is no loopback then highest iP address on any physical interface
But if there is no ip address defined on loopback or physical interface then you cannot start OSPF (as I know) but yop are saying it will take 0.0.0.0
Also this id will be used when DR/BDR selection take place if all routers have same priority.
03-22-2009 08:25 PM
Hi Zeeshan,
I understand that your question is what comes after the router-id command?
It should be an IP Address, which you want to designate as the router ID while configuring OSPF.
In such scenarios try to look for Command Reference Guide, where all the detals about the usage of a command is given.
Have a look at this for details on router-id -
http://www.cisco.com/en/US/docs/ios/12_2/iproute/command/reference/1rfospf.html#wp1049279
-> Sushil
03-22-2009 09:51 PM
I agree with Mohammad. I always put the loopback IP Address (/32).
03-23-2009 02:28 AM
Hello Sarah,
I guess you are also interested on why we should configure an OSPF router-id:
the main reason is to assure consistency over time.
Without an explicit configuration the OSPF Router-ID can change:
example :
after some time a new loopback address with an higher ip address is added.
no changes is observed until the OSPF process is restarted or the whole router is reloaded.
After that, OSPF at startup picks the highest loop ip address as router id.
This is not desirable: we want to trace a node with a specific ip address.
To be noted that the router-id argument is an ip address but doesn't need to be an ip address associated to a real interface on the router.
Also the router-id could be an ip address that is not advertised in OSPF or other manner (doesn't need to be routed and reachable)
However, one of the best practices is to use a /24 space taken from address plan and to allocate a /32 ip address to each router and to advertise them in OSPF.
Other note: if using BGP and OSPF to have a successful redistribution of OSPF into BGP the two router-id must be the same.
Hope to help
Giuseppe
03-23-2009 07:22 AM
Thanks all of you for such awesome replies.
If you guys don't mind, i have more question
book shows a router subcommand
auto-cost reference-bandwidth
This command set the reference bandwidth for the interface.
Since this is configured "under router ospf 1" , i believe this sets the reference bandwidth for all ospf -enabled interfaces.
If yes, then how could i just change the reference bandwidth for one ospf enabled interface without changing the reference
bandwidth for all ospf-enabled interfaces?
Thanks a lot!
03-23-2009 07:47 AM
If yes, then how could i just change the reference bandwidth for one ospf enabled interface without changing the reference
bandwidth for all ospf-enabled interfaces?
You can't selectively use 'auto reference bandwidth'. It's all or nothing. If you want to modify the 'cost' of the interface (that's what the auto reference bandwidth actually does), then you can use the ip ospf cost command or the bandwidth command under the intended interface.
The ip ospf cost command is ideal on this type of task since it only affects the OSPF calculation while the bandwidth command affects not only OSPF but other routing protocols and QoS.
HTH,
__
Edison.
03-23-2009 07:51 AM
Sarah
auto-cost reference-bandwidth as you say affects all OSPF interfaces on the router.
If you want to change an individual interface then you can use the "ip ospf cost" interface command.
Edit - sorry Edison was posting while you posted and anyway your answer is better than mine :)
Jon
03-23-2009 02:44 PM
Thanks for the rating Sarah.
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