OSPF Router-ID Not Changing

A friend of mine give me a problem where he was trying to make a router choose a new router-id by configuring a higher IP address on a loopback interface. When he configured it and cleared the ospf process, the router-id did not change. So I built my own lab and saw the exact same problem. I want to know why? The config below shows my router-id is 99.0.0.5. I will walk through my steps at each point.

 

R1#sh ip int brief | ex down
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            10.0.12.1       YES NVRAM  up                    up
FastEthernet0/1            10.0.120.1      YES NVRAM  up                    up
Loopback0                  1.1.1.1         YES NVRAM  up                    up
Loopback1                  99.0.0.1        YES NVRAM  up                    up
Loopback10                 50.0.0.1        YES NVRAM  up                    up
Loopback11                 99.0.0.2        YES NVRAM  up                    up
Loopback13                 99.0.0.4        YES NVRAM  up                    up
Loopback14                 99.0.0.5        YES NVRAM  up                    up
!
!
R1#sh ip ospf | i ID
 Routing Process "ospf 1" with ID 99.0.0.5
!
!
R1#conf t
R1(config)#no int lo14
R1(config)#
*Mar  1 00:06:42.975: %LINK-5-CHANGED: Interface Loopback14, changed state to administratively down
*Mar  1 00:06:43.975: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback14, changed state to down
R1(config)#end
!

### I first see if removing the loopback with the OSPF router-id affects the election, and it does###
!
R1#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
R1#sh ip ospf | i ID
 Routing Process "ospf 1" with ID 99.0.0.4
!

### Next I try and make a loopback with a higher IP on it to try and force a new router-id ###
!
!
R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#int lo16
R1(config-if)#ip address 100.0.0.1 255.255.255.255
R1(config-if)#end
!
!
R1#clear ip ospf process
Reset ALL OSPF processes? [no]: yes
!
!
R1#sh ip ospf | i ID
 Routing Process "ospf 1" with ID 99.0.0.4

 

So the router-id does not change. If i actually manually configure the router-id and clear the ospf process, it does actually change. But simply making a higher loopback IP and clearning the process does not affect the election. Why?

Comments

  • It is well-known and expected behaviour; as the DR and the graph of nodes is created based on the OSPF router-id, and because you don't want zombie LSA's in the topology, you want it to be as stable as possible; thus if you add new loopbacks with higher IP addresses, it will not become the new router-id. If you think about it , what would be the benefit? Of course if you reload the router or remove and re-apply OSPF configuration,  the new higher loopback will become the router-id value; this is why in most good 
    Designs , you always set the router-id manually, following a algorithm you choose: x.y.w.z, where x is the country code, y is the city code, w is the site code and z is the router number, for example.

    Regards,
    Cristian.

    Sent from my iPhone

    On Aug 26, 2015, at 15:16, sg4rb0 <[email protected]> wrote:

    A friend of mine give me a problem where he was trying to make a router choose a new router-id by using a higher IP address on a loopback interface. When he configured it and cleared the ospf process, the router-id did not change. So I built my own lab and saw the exact same problem. I want to know why? The config below shows my router-id is 99.0.0.5. I will walk through my steps at each point.

     

    R1#sh ip int brief | ex down
    Interface                  IP-Address      OK? Method Status                Protocol
    FastEthernet0/0            10.0.12.1       YES NVRAM  up                    up
    FastEthernet0/1            10.0.120.1      YES NVRAM  up                    up
    Loopback0                  1.1.1.1         YES NVRAM  up                    up
    Loopback1                  99.0.0.1        YES NVRAM  up                    up
    Loopback10                 50.0.0.1        YES NVRAM  up                    up
    Loopback11                 99.0.0.2        YES NVRAM  up                    up
    Loopback13                 99.0.0.4        YES NVRAM  up                    up
    Loopback14                 99.0.0.5        YES NVRAM  up                    up
    !
    !
    R1#sh ip ospf | i ID
     Routing Process "ospf 1" with ID 99.0.0.5
    !
    !
    R1#conf t
    R1(config)#no int lo14
    R1(config)#
    *Mar  1 00:06:42.975: %LINK-5-CHANGED: Interface Loopback14, changed state to administratively down
    *Mar  1 00:06:43.975: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback14, changed state to down
    R1(config)#end
    !

    ### I first see if removing the loopback with the OSPF router-id affects the election, and it does###
    !
    R1#clear ip ospf process
    Reset ALL OSPF processes? [no]: yes
    R1#sh ip ospf | i ID
     Routing Process "ospf 1" with ID 99.0.0.4
    !

    ### Next I try and make a loopback with a higher IP on it to try and force a new router-id ###
    !
    !
    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    R1(config)#int lo16
    R1(config-if)#ip address 100.0.0.1 255.255.255.255
    R1(config-if)#end
    !
    !
    R1#clear ip ospf process
    Reset ALL OSPF processes? [no]: yes
    !
    !
    R1#sh ip ospf | i ID
     Routing Process "ospf 1" with ID 99.0.0.4

     

    So the router-id does not change. If i actually manually configure the router-id and clear the ospf process, it does actually change. But simply making a higher loopback IP and clearning the process does not affect the election. Why?




    INE - The Industry Leader in CCIE Preparation

    http://www.INE.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx
  • Cristian, sg4rb0 mentioned that he did cleared the OSPF process. See below.

    "A friend of mine give me a problem where he was trying to make a router
    choose a new router-id by using a higher IP address on a loopback
    interface. When he configured it and cleared the ospf process, the
    router-id did not change. So I built my own lab and saw the exact same
    problem. I want to know why? The config below shows my router-id is
    99.0.0.5. I will walk through my steps at each point."

    sg4rb0, To my knowledge, the Router-ID should change when you restart the OSPF process. So, You did cleared the OSPF process yet the router-id didn't change?

    Thx
    DSU




    On Wed, Aug 26, 2015 at 11:40 PM, cristian.matei <[email protected]> wrote:
    It is well-known and expected behaviour; as the DR and the graph of nodes is created based on the OSPF router-id, and because you don't want zombie LSA's in the topology, you want it to be as stable as possible; thus if you add new loopbacks with higher IP addresses, it will not become the new router-id. If you think about it , what would be the benefit? Of course if you reload the router or remove and re-apply OSPF configuration,  the new higher loopback will become the router-id value; this is why in most good 
    Designs , you always set the router-id manually, following a algorithm you choose: x.y.w.z, where x is the country code, y is the city code, w is the site code and z is the router number, for example.

    Regards,
    Cristian.

    Sent from my iPhone

    On Aug 26, 2015, at 15:16, sg4rb0 <[email protected]> wrote:

    A friend of mine give me a problem where he was trying to make a router choose a new router-id by using a higher IP address on a loopback interface. When he configured it and cleared the ospf process, the router-id did not change. So I built my own lab and saw the exact same problem. I want to know why? The config below shows my router-id is 99.0.0.5. I will walk through my steps at each point.

     

    R1#sh ip int brief | ex down
    Interface                  IP-Address      OK? Method Status                Protocol
    FastEthernet0/0            10.0.12.1       YES NVRAM  up                    up
    FastEthernet0/1            10.0.120.1      YES NVRAM  up                    up
    Loopback0                  1.1.1.1         YES NVRAM  up                    up
    Loopback1                  99.0.0.1        YES NVRAM  up                    up
    Loopback10                 50.0.0.1        YES NVRAM  up                    up
    Loopback11                 99.0.0.2        YES NVRAM  up                    up
    Loopback13                 99.0.0.4        YES NVRAM  up                    up
    Loopback14                 99.0.0.5        YES NVRAM  up                    up
    !
    !
    R1#sh ip ospf | i ID
     Routing Process "ospf 1" with ID 99.0.0.5
    !
    !
    R1#conf t
    R1(config)#no int lo14
    R1(config)#
    *Mar  1 00:06:42.975: %LINK-5-CHANGED: Interface Loopback14, changed state to administratively down
    *Mar  1 00:06:43.975: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback14, changed state to down
    R1(config)#end
    !

    ### I first see if removing the loopback with the OSPF router-id affects the election, and it does###
    !
    R1#clear ip ospf process
    Reset ALL OSPF processes? [no]: yes
    R1#sh ip ospf | i ID
     Routing Process "ospf 1" with ID 99.0.0.4
    !

    ### Next I try and make a loopback with a higher IP on it to try and force a new router-id ###
    !
    !
    R1#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    R1(config)#int lo16
    R1(config-if)#ip address 100.0.0.1 255.255.255.255
    R1(config-if)#end
    !
    !
    R1#clear ip ospf process
    Reset ALL OSPF processes? [no]: yes
    !
    !
    R1#sh ip ospf | i ID
     Routing Process "ospf 1" with ID 99.0.0.4

     

    So the router-id does not change. If i actually manually configure the router-id and clear the ospf process, it does actually change. But simply making a higher loopback IP and clearning the process does not affect the election. Why?




    INE - The Industry Leader in CCIE Preparation

    http://www.INE.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx



    INE - The Industry Leader in CCIE Preparation

    http://www.INE.com



    Subscription information may be found at:

    http://www.ieoc.com/forums/ForumSubscriptions.aspx

  • JoeMJoeM ✭✭✭





    sg4rb0 mentioned that he did cleared the OSPF process....




    Clearing the OSPF process is not the same thing. 

    Cristian gave the two ways to make the change:

    1. reload the router completely
    2. remove all of the OSPF config...and re-apply it. This will be a brand-new configuration....and it will look for a router-id.

    This does make sense for stability purposes.  Once the OSPF process has its router-id, we probably do not want it changing, right?

Sign In or Register to comment.