Query on OSPF Router ID

Discussion in 'Cisco' started by rajesh.premachandran, Mar 4, 2005.

  1. Hi

    I had a regarding OSPF Router ID concept. Assume that we have a router
    with three WAN interfaces s0/0, s0/1 and s0/2 and OSPF is configured on
    all the three interfaces. Let the IP address configured for the
    interfaces be
    s0/0 ---
    s0/1 ---
    s0/2 ---

    By default the RID in this case would be since this is the
    highest interface IP address.

    Let us assume that the link connected to S0/2 is down. In this case
    will the OSPF work. That is all the other interfaces are up. Will those
    interfaces exchange rotuing information(and hello packets).
    Or will the router be considered to be down since interface S0/2(Router
    ID) is down.

    If the OSPF works what will be the RID in the hello packet.

    rajesh.premachandran, Mar 4, 2005
    1. Advertisements

  2. rajesh.premachandran

    Ivan Ostreš Guest

    If interface was down during OSPF startup, then the router-id is the
    next biggest address ( in this case). If s0/2 was up when ospf
    was starting and later it was shut, the OSPF will use it's initial
    ( router-id until process was cleared (clear ip ospf proc) or
    until router is reloaded.

    The thing is that RID does not have to be any real IP address on your
    network. You can specify just any RID using router-id command but it has
    to be uniqe in your OSPF routing domain.

    And just to mention.. ospf will not start if all interfaces on the
    router are down.
    Ivan Ostreš, Mar 4, 2005
    1. Advertisements

  3. Victor Cappuccio, Mar 4, 2005
  4. rajesh.premachandran

    ws00sw Guest

    OSPF like BGP always preffer the highest loopback address rather than a
    highest physical interface address if they are configured.
    ws00sw, Mar 4, 2005
  5. rajesh.premachandran

    Toby Guest

    Hi Raj

    The OSPF router-id is not a network IP address but a unique number within an
    OSPF area allocated to a router in a OSPF area to enable all routers within
    that area to build a topological view of the area.

    There are several ways to allocate this "OSPF ROUTER-ID" but all forms use
    a 32 bit dotted decimal format simular to an IP address.

    This ID is taken at the time the OSPF process starts and follows the
    following rules in order.

    If a OSPF ROUTER-ID x.x.x.x command is issued then this will be the ID
    The highest IP address of active loopback interfaces.
    The highest active Physical interface IP address.

    Once the OSPF Router-ID has been selected it does not change even if it was
    allocated from a physical interface that has subsequently failed. The
    reasoning here is to give stability to the rest of the area. i.e. other
    routers do not have to re-build their topological database due to a
    router-id change. i.e will just react to actual network failures etc.

    Most network administrators tend to use the second option, the loopback
    address method as most networks tend to use loopback interfaces to supply IP
    addresses to multiple point-point interfaces "IP UNNUMBERED" to save on IP
    addresses along with other uses, and as these loopback addresses have to be
    unique anyway, why create a seperate OSPF ROUTER-ID manually.


    Toby, Mar 4, 2005
  6. rajesh.premachandran

    Toby Guest

    So to continue to your actual question which I forgot during composing my

    As you have not set the router-id manually or set up any loopback
    interfaces, and assuming all three of your interfaces were up/up before you
    started the ospf process then the router id would be (taken from

    As I said in my last post this is the id and just happens to be the same as
    the highest ip address of your pysical interfaces so if the interface S0/2
    goes down, this would not be a problem as far as the OSPF process is
    concerned as this is just the router-id and although is the same number as
    interface S0/2 it treated independantly. i.e. as stated before this id
    would not change and OSPF would function correctly over your other 2 links.

    Toby, Mar 4, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.