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
could any body please give me example?
thanks a lot!
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 :)
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.
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:
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
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.
I agree with Mohammad. I always put the loopback IP Address (/32).
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 -
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 22.214.171.124, and the show ip ospf command displays the setting:
router(config-router)#ospf router-id 126.96.36.199