05-31-2013 07:18 AM - edited 03-04-2019 08:04 PM
as far as i know router-id is an ip address used to identify a router on a ospf area.
there are three steps to router-id right?
1)Configured a router-id
2)highest ip address lookback address
3)highest ip address on the active interface
_________________________________________________________
This is the part which makes me confused
- The Router-id is initially selected when ospf is configured with the ospf network commands
- If the ospf router-id command or a loopback address is configured after the ospf network command, the router id comes from the interface with the highest ip address
Can you explain these to me briefly? Thanks a lot
Solved! Go to Solution.
05-31-2013 07:37 AM
Hi,
yes exactly.
Regards
Alain
Don't forget to rate helpful posts.
05-31-2013 07:46 AM
I think this is meant to mean that if a router-id has not been set and no configuration has taken place i.e.
router ospf 1
is the only configuration it will try to select a router id (this is when OSPF becomes active)
[the description is wrong]
The second part means, if i was to do this:
router ospf 1
network 192.168.100.1 0.0.0.0 area 0
Lets say i've established an adjacency now, my router-id being used is the highest IP address I have (i havent got a loopback yet - if i did, it would select the highest IP address of a loopback interface), in my case i only have 192.168.100.1.
It would select 192.168.100.1 as my router-id. If i was to later add the configuration a loopback and router-id like this:
int l1
ip address 1.1.1.1 255.255.255.255
conf t
router ospf 1
router-id 1.1.1.1
But when I do this i'll get:
R1(config-router)#router-id 1.1.1.1
Reload or use "clear ip ospf process" command, for this to take effect
R1(config-router)#
Hope this helps. I like Jeff Doyle's take on Router-ID's. Here's an extract.
Router ID
1. The router chooses the numerically highest IP address on any of its loopback interfaces.
2. If no loopback interfaces are configured with IP addresses, the router chooses the numerically
highest IP address on any of its physical interfaces. The interface from which the Router ID is
taken does not have to be running OSPF.
Using addresses associated with loopback interfaces has two advantages:
The loopback interface is more stable than any physical interface. It is active when the router
boots up, and it only fails if the entire router fails.
The network administrator has more leeway in assigning predictable or recognizable addresses as
the Router IDs.
Cisco's OSPF will continue to use a Router ID learned from a physical interface even if the interface
subsequently fails or is deleted (see "Case Study: Setting Router IDs with Loopback Interfaces," later in
this chapter). Therefore, the stability of a loopback interface is only a minor advantage. The primary
benefit is the ability to control the Router ID.
The OSPF router begins a neighbor relationship by advertising its Router ID in Hello packets.
Please rate useful posts & remember to mark any solved questions as answered. Thank you.
05-31-2013 07:27 AM
Hi,
the router-id is selected when the OSP process starts, not when network command is configured AFAIK
so if there is a loopback it will choose this one and instead it will choose physical if up/up otherwise you'll need to hard-code it with router-id command.
Regards
Alain
Don't forget to rate helpful posts.
05-31-2013 07:36 AM
So it choose Loopback Interface as the router-id unless the loopback wasn't configured, then it will pick the physical?
05-31-2013 07:37 AM
Hi,
yes exactly.
Regards
Alain
Don't forget to rate helpful posts.
05-31-2013 07:51 AM
The statement here:
- The Router-id is initially selected when ospf is configured with the ospf network commands
is misleading, no?
Please rate useful posts & remember to mark any solved questions as answered. Thank you.
05-31-2013 07:46 AM
I think this is meant to mean that if a router-id has not been set and no configuration has taken place i.e.
router ospf 1
is the only configuration it will try to select a router id (this is when OSPF becomes active)
[the description is wrong]
The second part means, if i was to do this:
router ospf 1
network 192.168.100.1 0.0.0.0 area 0
Lets say i've established an adjacency now, my router-id being used is the highest IP address I have (i havent got a loopback yet - if i did, it would select the highest IP address of a loopback interface), in my case i only have 192.168.100.1.
It would select 192.168.100.1 as my router-id. If i was to later add the configuration a loopback and router-id like this:
int l1
ip address 1.1.1.1 255.255.255.255
conf t
router ospf 1
router-id 1.1.1.1
But when I do this i'll get:
R1(config-router)#router-id 1.1.1.1
Reload or use "clear ip ospf process" command, for this to take effect
R1(config-router)#
Hope this helps. I like Jeff Doyle's take on Router-ID's. Here's an extract.
Router ID
1. The router chooses the numerically highest IP address on any of its loopback interfaces.
2. If no loopback interfaces are configured with IP addresses, the router chooses the numerically
highest IP address on any of its physical interfaces. The interface from which the Router ID is
taken does not have to be running OSPF.
Using addresses associated with loopback interfaces has two advantages:
The loopback interface is more stable than any physical interface. It is active when the router
boots up, and it only fails if the entire router fails.
The network administrator has more leeway in assigning predictable or recognizable addresses as
the Router IDs.
Cisco's OSPF will continue to use a Router ID learned from a physical interface even if the interface
subsequently fails or is deleted (see "Case Study: Setting Router IDs with Loopback Interfaces," later in
this chapter). Therefore, the stability of a loopback interface is only a minor advantage. The primary
benefit is the ability to control the Router ID.
The OSPF router begins a neighbor relationship by advertising its Router ID in Hello packets.
Please rate useful posts & remember to mark any solved questions as answered. Thank you.
05-31-2013 08:09 AM
Hi Jason,
just an addition:
as far as i know router-id is an ip address used to identify a router on a ospf area.
1) Replace "area" with "autonomous system".
2) Strictly speaking the RID is not an IP(v4)-Address, it's just a 32-bit value, represented in the format of an IPv4-address.
You even can assign values like this, regardless of the configured IPv4-interfaces:
R1(config-router)#router-id 0.0.0.0
OSPF: 0.0.0.0 is not a valid router-id
R1(config-router)#router-id 0.0.0.1
R1(config-router)#router-id 127.0.0.0
R1(config-router)#router-id 224.0.0.0
R1(config-router)#router-id 255.255.255.255
With OSPFv3 (IPv6) it's still an 32-bit value and you can run it without any active IPv4 interface.
Best regards
Rolf
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