cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8279
Views
0
Helpful
6
Replies

Router-ID

S9539245H
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

Hi,

yes exactly.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

View solution in original post

Bilal Nawaz
VIP Alumni
VIP Alumni

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.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

View solution in original post

6 Replies 6

cadet alain
VIP Alumni
VIP Alumni

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.

Don't forget to rate helpful posts.

So it choose Loopback Interface as the router-id unless the loopback wasn't configured, then it will pick the physical?

Hi,

yes exactly.

Regards

Alain

Don't forget to rate helpful posts.

Don't forget to rate helpful posts.

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.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Bilal Nawaz
VIP Alumni
VIP Alumni

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.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

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

Review Cisco Networking for a $25 gift card