2 Replies Latest reply: Sep 7, 2011 11:39 AM by Scott Morris - CCDE/4xCCIE/2xJNCIE RSS

    OSPF and Loopback interface

    Darlington

      I have 2 loopback interfaces configured on a router. None of the 2 comes up as the router ID for OSPF. Instead the highest IP address on the physical interface becomes the router ID. I have reloaded the router and even entered the command: clear ip ospf. But still it returns the router ID as the physical interface. So my question is does configuring 2 loopacks in ospf changes the default behave of router ID. If I disable one of the loopbacks and do reload the router the other loopback turns up as the router ID.

        • 1. Re: OSPF and Loopback interface
          Keith Barker - CCIE RS/Security, CISSP

          Darlington wrote:

           

          I have 2 loopback interfaces configured on a router. None of the 2 comes up as the router ID for OSPF. Instead the highest IP address on the physical interface becomes the router ID. I have reloaded the router and even entered the command: clear ip ospf. But still it returns the router ID as the physical interface. So my question is does configuring 2 loopacks in ospf changes the default behave of router ID. If I disable one of the loopbacks and do reload the router the other loopback turns up as the router ID.

           

          Hello-

           

          It is possible, that in the "router ospf" configuration mode, that the ospf router-id is manually set, and that is why it continues to use that router ID.

           

          Issue the command:

           

          show run | include section router

           

          and see if it is there.

           

           

          If that isn't the case, then your loopbacks are probably "shutdown".    If you bring the loopbacks out of shutdown, and save the config and reload, then the router id should be the highest IP of the two loopbacks.

           

           

          R1#conf t

          R1(config)#no router ospf 1

          R1(config)#interface loop 0

          R1(config-if)#shutdown

          R1(config-if)#do show ip interface brief | exclude unassigned

          Interface                  IP-Address      OK? Method Status                Protocol

          FastEthernet0/0            10.0.0.1        YES NVRAM  up                    up     

          Loopback0                  1.1.1.1         YES NVRAM  administratively down down  

          R1(config-if)#router ospf 1

          R1(config-router)#network 0.0.0.0 255.255.255.255 area 0

          R1(config-router)#do show ip ospf | include Routing Process

          Routing Process "ospf 1" with ID 10.0.0.1

          R1(config-router)#exit

          R1(config)#no router ospf 1

          R1(config)#interface loop 0

          R1(config-if)#no shutdown

          R1(config-if)#router ospf 1

          R1(config-router)#network 0.0.0.0 255.255.255.255 area 0

          R1(config-router)#do show ip ospf | include Routing Process

          Routing Process "ospf 1" with ID 1.1.1.1

          R1(config-router)#

           

          Keith

           

          Message was edited by: Keith Barker - CCIE RS/Security, CISSP, CCSI

          • 2. Re: OSPF and Loopback interface
            Scott Morris - CCDE/4xCCIE/2xJNCIE

            I'd agree with keith.  Do a "show run | section ospf" and see what's there.  If there is more than one OSPF process already using those loopbacks as RIDs, that would also prevent them from being used, but short of that or what Keith pointed out, there should be no reason they aren't chosen.

             

            Also, use "show interface" just to be sure that your loopback isn't "shutdown" for some reason.  That too would cause the problem you're seeing but that would be very odd.

             

            Scott