cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
12345
Views
9
Helpful
16
Replies

OSPF router-id

Hi All,

I am in a strange situation here. I understand that the highest IP address assigned to any interface becomes the router-id and it gets beaten by the loop back even if the ip is lower. Please let me know if I am wrong.

But here I am not able to find that out. I have two routers

R1

===============

Router(config)#do sh ip int bri

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            unassigned      YES unset  administratively down down   

FastEthernet0/1            unassigned      YES unset  administratively down down   

Serial1/0                  10.10.13.1      YES manual up                    down   

Serial1/1                  10.10.12.1      YES manual up                    up     

Serial1/2                  unassigned      YES unset  administratively down down   

Serial1/3                  unassigned      YES unset  administratively down down   

Loopback1                  1.1.1.1         YES manual up     up

Router(config)#do sh run | s ospf

router ospf 10

log-adjacency-changes

network 1.1.1.1 0.0.0.0 area 0

network 10.10.12.0 0.0.0.255 area 0

network 10.10.13.0 0.0.0.255 area 0

R2

=========

Router(config)#

*Mar  1 00:09:40.999: %OSPF-5-ADJCHG: Process 10, Nbr 10.10.13.1 on Serial1/0 from LOADING to FULL, Loading Done

The router-id still seems to be the higher IP address configured on physical interfaces. Any reason why?

Cheers!

Ravi

1 Accepted Solution

Accepted Solutions

Hi Rick,

To my personal experience, the clear ip ospf process command does clear and reevaluate the OSPF Router ID in these two instances:

  1. A new router-id X.X.X.X command was configured in the respective OSPF process just before calling the clear ip ospf process command
  2. An existing router-id X.X.X.X command was removed from the respective OSPF process just before calling the clear ip ospf process command

When the clear ip ospf process is called without manual manipulation with the router-id command, it indeed does not touch the OSPF RID.

Best regards,

Peter

View solution in original post

16 Replies 16

burleyman
Level 8
Level 8

Please show the config on the loopback interface.

did you do this....   ip address 1.1.1.1 255.255.255.255

if not try that.

Mike

you could also define it as it would be more comtrollable.

router ospf 10

router-id 1.1.1.1

Mike

Router(config)#do sh ip int loop 1

Loopback1 is up, line protocol is up

  Internet address is 1.1.1.1/32

  Broadcast address is 255.255.255.255

  Address determined by setup command

  MTU is 1514 bytes

  Helper address is not set

  Directed broadcast forwarding is disabled

  Multicast reserved groups joined: 224.0.0.5

  Outgoing access list is not set

Yeah its surely is /32. Yes, we can define the static as well by router-id but I wanted to check this up. Any reason why its not doing it automatically.

Any assistance will be appreciated.

Cheers!

Ravi

Ravi

Please post the output of show ip ospf from the first router.

HTH

Rick

HTH

Rick

Hi Rick,

Please find the below output

Router#clear ip ospf pr

Router#clear ip ospf process

Reset ALL OSPF processes? [no]: y

Router#

*Mar  1 01:26:29.399: %OSPF-5-ADJCHG: Process 10, Nbr 10.10.34.1 on Serial1/0 from FULL to DOWN, Neighbor Down: Interface down or detached

*Mar  1 01:26:29.403: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from FULL to DOWN, Neighbor Down: Interface down or detached

*Mar  1 01:26:30.287: %OSPF-5-ADJCHG: Process 10, Nbr 10.10.34.1 on Serial1/0 from LOADING to FULL, Loading Done

*Mar  1 01:26:30.291: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done

Router#sh

Router#show ip os

Router#show ip ospf

Routing Process "ospf 10" with ID 10.10.13.1

Start time: 00:02:24.244, Time elapsed: 01:24:22.016

Supports only single TOS(TOS0) routes

Supports opaque LSA

Supports Link-local Signaling (LLS)

Supports area transit capability

Router is not originating router-LSAs with maximum metric

Initial SPF schedule delay 5000 msecs

Minimum hold time between two consecutive SPFs 10000 msecs

Maximum wait time between two consecutive SPFs 10000 msecs

Incremental-SPF disabled

Minimum LSA interval 5 secs

Minimum LSA arrival 1000 msecs

LSA group pacing timer 240 secs

Interface flood pacing timer 33 msecs

Retransmission pacing timer 66 msecs

Number of external LSA 0. Checksum Sum 0x000000

Number of opaque AS LSA 0. Checksum Sum 0x000000

Number of DCbitless external and opaque AS LSA 0

Number of DoNotAge external and opaque AS LSA 0

Number of areas in this router is 1. 1 normal 0 stub 0 nssa

Number of areas transit capable is 0

External flood list length 0

    Area BACKBONE(0)

        Number of interfaces in this area is 3 (1 loopback)

        Area has no authentication

        SPF algorithm last executed 00:00:02.900 ago

        SPF algorithm executed 2 times

        Area ranges are

        Number of LSA 4. Checksum Sum 0x04F226

        Number of opaque link LSA 0. Checksum Sum 0x000000

        Number of DCbitless LSA 0

        Number of indication LSA 0

        Number of DoNotAge LSA 0

        Flood list length 0

Router#sh ip int bri

Router#sh ip int brief

Interface                  IP-Address      OK? Method Status                Protocol

FastEthernet0/0            unassigned      YES unset  administratively down down   

FastEthernet0/1            unassigned      YES unset  administratively down down   

Serial1/0                  10.10.13.1      YES manual up                    up     

Serial1/1                  10.10.12.1      YES manual up                    up     

Serial1/2                  unassigned      YES unset  administratively down down   

Serial1/3                  unassigned      YES unset  administratively down down   

Loopback1                  1.1.1.1         YES manual up                    up     

Router#

Ravi

Thanks for posting the information. Could you also post the output of show ip ospf interface loopback1 from the first router?

HTH

Rick

HTH

Rick

Hi Rick,

I rebooted the router and it worked. Now the router ID is 1.1.1.1

Quite strange. But it works.

Anyways thanks!

Cheers!

Ravi

It's not a strange behaviour, it is by design. Imagine someone configures a loopback and ospf automatically resets the adjacencies and re-originates new LSAs. So to keep the protocol stable it does not change the RID immediately. Clear ospf process should do it but it seems like it does not work effectively. You should be able to open up a TAC case and get this fixed in the IOS.

Sent from Cisco Technical Support iPhone App

Hi Rick,

But what exact information were you looking for in the sh ip ospf int loop 1? I will check if I come across similar challenge.

Cheers!

Ravi

Ravi

I am glad that it now is working as you expect. I had wondered about suggesting a reboot of the router but thought there were some things to check before we got to that.

There are several things that might cause the OSPF router ID to not be the loopback interface address. One of them is that the loopback might be participating in a second OSPF process (where it perhaps is the router ID). If an interface is used as a router ID in one process it can not also be the router ID in a second process. The second process must choose a different address as its router ID.

- another possibility is that the loopback interface might have been shut down at the time that the OSPF process was configured. OSPF can not use an address for router ID of an interface that is not in the up state.

- another possibility is that the loopback inteface might have been configured after the OSPF process was configured and had already chosen its router ID address.

HTH

Rick

HTH

Rick

Hello,

Every time you change the router-id, follow it with clear ip ospf pr so that it takes affect, its easier and faster than rebooting.

Also, to get rid of the int loopback appearing as /32, define the loopback int as point-to-point with ip ospf net point-to-point.

A

A

In one of the posts in this thread is an example of using clear ip ospf process. But it does not change the router ID. The reliable way to change the router ID is either to reboot the router or to remove the OSPF configuration and then re-configure OSPF.

Router#clear ip ospf process

Reset ALL OSPF processes? [no]: y

Router#

*Mar   1 01:26:29.399: %OSPF-5-ADJCHG: Process 10, Nbr 10.10.34.1 on Serial1/0  from FULL to DOWN, Neighbor Down: Interface down or detached

*Mar   1 01:26:29.403: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1  from FULL to DOWN, Neighbor Down: Interface down or detached

*Mar  1 01:26:30.287: %OSPF-5-ADJCHG: Process 10, Nbr 10.10.34.1 on Serial1/0 from LOADING to FULL, Loading Done

*Mar  1 01:26:30.291: %OSPF-5-ADJCHG: Process 10, Nbr 2.2.2.2 on Serial1/1 from LOADING to FULL, Loading Done

Router#sh

Router#show ip os

Router#show ip ospf

Routing Process "ospf 10" with ID 10.10.13.1

HTH

Rick

HTH

Rick

Hi Rick,

To my personal experience, the clear ip ospf process command does clear and reevaluate the OSPF Router ID in these two instances:

  1. A new router-id X.X.X.X command was configured in the respective OSPF process just before calling the clear ip ospf process command
  2. An existing router-id X.X.X.X command was removed from the respective OSPF process just before calling the clear ip ospf process command

When the clear ip ospf process is called without manual manipulation with the router-id command, it indeed does not touch the OSPF RID.

Best regards,

Peter

Peter

Yes. Thanks for the clarification. As you and A have suggested, there are circumstances where clearing the OSPF process will change the router ID. And when it works clearing the OSPF process is quicker and less intrusive than reboot. And if clearing the OSPF process does not change the router ID, as in the case that begins this thread, the reliable way to change the router ID is to reboot the router or to remove the configuration of OSPF and re-configure OSPF.

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco