OSPF: DR election

Discussion in 'Cisco' started by sebastian.fey@dialup.fh-aachen.de, Jan 21, 2006.

  1. -aachen.de

    -aachen.de Guest

    hi there,

    im having some trouble with OSPF basics.
    (Sadly i dont have access to real cisco hardware right now but only
    BosonNetsim 5.27)

    i got this network:

    http://www4.upload2.net/file22/DNaz1/k1HqksdquzIfrz4/ospf.GIF

    I understand, that there are 2 kinds of networks:
    1 broadcast (110.100.100.0/29)
    3 Point to Point (the 120.X.X.X/30)

    DR is chosen in broadcast nets only, so the rtr with the highest ip is
    not rtr6 (ID 221.100.100.1) but rtr3 (ID 120.100.100.1). This is what
    our teacher says.
    But Boson Netsim 5.27 selects rtr6 as DR and says that 221.100.100.0/24
    was a broadcast net. (sure it is a broadcast net because it is
    ethernet, but for OSPF only nets between routers are (relevant)
    broadcast-nets)

    OK lets say my teacher is right, so rtr6 and rtr4 arent in a broadcast
    net and they cant be chosen as (B)DR.
    So what do they do with theis LSAs? Do they send them to the DR that is
    chosen in the 110.100.100.0/29 broadcast net?


    thx in advance,

    Sebastian
     
    -aachen.de, Jan 21, 2006
    #1
    1. Advertising

  2. -aachen.de

    Merv Guest

    There are 4 types of networks from an OSPF perspective:
    1. Broadcast
    2. Non-Broadcast Multi-Access (NBMA) (i.e. Frame-Relay or ATM)
    3. Point-to-Point
    4. Point-to-Multipoint

    A Designated router (DR) is elected for EACH broadcast and NBMA
    network.

    A DR and BDR will always be elected on a broadcast network even if a
    router is the ONLY router on the subnet.

    The DR election mechanism uses OSPF router priority first (if
    configured) then high IP address; rembering that this is per network
    link.

    Please note that the order that router come up in also affects
    election. If a router comes up after othere routers, it may NOT be
    elected teh DR or BDR until the exisitng DR or BDR fails.
     
    Merv, Jan 21, 2006
    #2
    1. Advertising

  3. -aachen.de

    -aachen.de Guest

    hey Merv,

    thanks for your help!

    >There are 4 types of networks from an OSPF perspective:
    > 1. Broadcast
    > 2. Non-Broadcast Multi-Access (NBMA) (i.e. Frame-Relay or ATM)
    > 3. Point-to-Point
    > 4. Point-to-Multipoint


    yes sure. what i meant was: here
    http://www4.upload2.net/file22/DNaz1/k1HqksdquzIfrz4/ospf.GIF are 2
    types of networks.

    >A Designated router (DR) is elected for EACH broadcast and NBMA
    >network.

    Thats new to me. When i build this net in boson, there is only ONE DR!?
    and it is the one with ID 221.100.100.1 (when i start the routers about
    the same time).
    Is this a bug or what?

    So do you mean by theory there should be a DR for the net
    110.100.100.0/29 AND ALL the stub nets? (like 25.100.100.0/24,
    117.100.100.0/24, ...)

    what about the routers that are not connected to a broadcast net, but
    propagate their nets to that net and get routes from that net. do they
    send their LSA to the DR of the broadcast net?

    thank you for your help :)
    its really hard to start with all this network stuff having no real
    documentation :/

    cu,
    Sebastian
     
    -aachen.de, Jan 21, 2006
    #3
  4. -aachen.de

    stephen Guest

    Re: DR election

    <-aachen.de> wrote in message
    news:...
    > hi there,
    >
    > im having some trouble with OSPF basics.
    > (Sadly i dont have access to real cisco hardware right now but only
    > BosonNetsim 5.27)
    >
    > i got this network:
    >
    > http://www4.upload2.net/file22/DNaz1/k1HqksdquzIfrz4/ospf.GIF
    >
    > I understand, that there are 2 kinds of networks:
    > 1 broadcast (110.100.100.0/29)
    > 3 Point to Point (the 120.X.X.X/30)


    you could have some others - it depends if you are running OSPF on the other
    LANs.

    when you config OSPf you choose which interfaces run OSPF

    the way to tell is to look in the routing table - if it is an internal OSPf
    route OSPF is running on that interface, and so a DR should be elected.

    If it isnt, then the associated route will get propagated as an external (if
    it gets propagated by OSPF).
    >
    > DR is chosen in broadcast nets only, so the rtr with the highest ip is
    > not rtr6 (ID 221.100.100.1) but rtr3 (ID 120.100.100.1).


    The router ID is not always the highest IP address - loopbacks are
    preferred, and this is one reason why many who use OSPF give a router a
    loopback.

    you can get complications if interfaces go down which host the ID, or if you
    add another interface with a higher address when OSPF is running.

    This is what
    > our teacher says.
    > But Boson Netsim 5.27 selects rtr6 as DR and says that 221.100.100.0/24
    > was a broadcast net. (sure it is a broadcast net because it is
    > ethernet, but for OSPF only nets between routers are (relevant)
    > broadcast-nets)


    No - you are confusing the interface type and the OSPF interface. Eg - you
    can set up point to point OSPF interfaces on an Ethernet (or you can on
    other boxes at least - never tried on a cisco).

    it is worth thinking about processing cost. keeping OSPF adjacencies
    maintained requires memory, processor and other resources, and is expensive
    compared to externals. So a router should run OSPF only on interfaces that
    need it.

    think of 2 central switches in a resilient network with 100 interfaces. You
    could run OSPF on all interfaces - each switch then has 100 adjacencies, all
    with the same partner, and 100 DR / BDRs get elected, 1 per subnet.

    An adjacency is really a path over which 2 routers are willing to forward
    traffic to an remote subnet, so you use that to limit the networks which
    need to build an adjacency.

    Usually you only want transit traffic to go between the 2 switches by a few
    specific paths - so those are the ones you run OSPF on - others can be
    external routes (no OSPF), or run in passive mode (so they cant form
    adjacencies).
    >
    > OK lets say my teacher is right, so rtr6 and rtr4 arent in a broadcast
    > net and they cant be chosen as (B)DR.


    DR / BDR is a per interface decision, not a per router decision.

    > So what do they do with theis LSAs? Do they send them to the DR that is
    > chosen in the 110.100.100.0/29 broadcast net?


    No - they flood them to adjacent routers, which in turn flood them to theirs
    and so on.

    The flooding makes sure that the LSDB in each router is consistent. All
    routers in the area should have a copy of the same set of LSDB entries when
    the area is stable.
    >
    >
    > thx in advance,
    >
    > Sebastian

    --
    Regards

    - replace xyz with ntl
     
    stephen, Jan 21, 2006
    #4
  5. -aachen.de

    -aachen.de Guest

    Re: DR election

    >when you config OSPf you choose which interfaces run OSPF

    >the way to tell is to look in the routing table - if it is an internal OSPf
    >route OSPF is running on that interface, and so a DR should be elected.


    >If it isnt, then the associated route will get propagated as an external (if
    >it gets propagated by OSPF).


    ok, its again about this network:
    http://www4.upload2.net/file22/DNaz1/k1HqksdquzIfrz4/ospf.GIF
    Router 1 runs OSPF on the network 117.100.100.0, Router 2 on the
    network 25.100.100.0 ... But they are the only routers in that
    networks, so why should there be a DR elected?

    >The router ID is not always the highest IP address - loopbacks are
    >preferred, and this is one reason why many who use OSPF give a router a
    >loopback.

    OK. but what if there is no loopback set and all the routers come up at
    the same time.
    In this case the router with the highest IP becomes DR. Who becomes DR
    in the network 110.100.100.0? Do only interfaces in this network count
    while election, so rtr3 with 110.100.100.3 becomes DR or would another
    router become DR in this network if it has any interface with a higher
    IP? (eg rtr 1 has an interface with IP 117.x.x.x)

    >> So what do they do with theis LSAs? Do they send them to the DR that is
    >> chosen in the 110.100.100.0/29 broadcast net?

    >No - they flood them to adjacent routers, which in turn flood them to theirs
    >and so on.


    whats an DR for then?? i learned that they decrease the flooding over
    the network!?

    after all i dont understand why there is a DR elected for each network.
    All the routers in one OSPF area share the same LSDB, so why dont they
    all use the same DR??

    thanx for your help :)
     
    -aachen.de, Jan 22, 2006
    #5
  6. -aachen.de

    stephen Guest

    Re: DR election

    <-aachen.de> wrote in message
    news:...
    > >when you config OSPf you choose which interfaces run OSPF

    >
    > >the way to tell is to look in the routing table - if it is an internal

    OSPf
    > >route OSPF is running on that interface, and so a DR should be elected.

    >
    > >If it isnt, then the associated route will get propagated as an external

    (if
    > >it gets propagated by OSPF).

    >
    > ok, its again about this network:
    > http://www4.upload2.net/file22/DNaz1/k1HqksdquzIfrz4/ospf.GIF
    > Router 1 runs OSPF on the network 117.100.100.0, Router 2 on the
    > network 25.100.100.0 ... But they are the only routers in that
    > networks, so why should there be a DR elected?


    no diagrams at the link right now...

    because OSPF always elects a DR on a broadcast network. as far as the DR can
    tell, other OSPF routers could appear at any time....

    Otherwise it would be much more complex to characterise the protocol, alter
    the topology when a 2nd router appears on a network and so on.
    >
    > >The router ID is not always the highest IP address - loopbacks are
    > >preferred, and this is one reason why many who use OSPF give a router a
    > >loopback.

    > OK. but what if there is no loopback set and all the routers come up at
    > the same time.
    > In this case the router with the highest IP becomes DR. Who becomes DR
    > in the network 110.100.100.0?


    if the interfaces come up at the same time (or within the election time of
    the 1st coming up), then the "official" tie break is used. the only way this
    usually happens is if they connect to a common hub or router and someone
    powers it up.

    Do only interfaces in this network count
    > while election, so rtr3 with 110.100.100.3 becomes DR or would another
    > router become DR in this network if it has any interface with a higher
    > IP? (eg rtr 1 has an interface with IP 117.x.x.x)


    Elections dont overrule existing an DR that is already operating - an
    election only takes place if there is an issue - so a DR is "sticky" -
    whatever got elected earlier stays until that routers interface goes down
    for some reason.

    NB - there is also an election priority to allow the designer to bias where
    the DR / BDR go - main use to to force a router to never become DR / BDR...
    >
    > >> So what do they do with theis LSAs? Do they send them to the DR that is
    > >> chosen in the 110.100.100.0/29 broadcast net?

    > >No - they flood them to adjacent routers, which in turn flood them to

    theirs
    > >and so on.

    >
    > whats an DR for then?? i learned that they decrease the flooding over
    > the network!?


    i may have misled you here - there are (at least) 2 effects.

    The DR and BDR have adjacencies with each of the other routers on a LAN, 3rd
    and later routers only have adj to DR and BDR. So you get a linear increase
    in adjacencies as you add routers to a broadcast net, not a square law
    increase.

    The DR for that broadcast net generates LSAs to represent the broadcast net
    it is connected to - others dont. So you only get 1 LSA per broadcast net,
    even if 50 routers are attached.
    >
    > after all i dont understand why there is a DR elected for each network.
    > All the routers in one OSPF area share the same LSDB, so why dont they
    > all use the same DR??


    They do - but there is 1 DR per broadcast net. All routers attached to that
    net agree and let the DR proxy for them. So 1 router may be DR for several
    nets, BDR for others, and "just" an attached router on yet more.

    But your network has at least 1 broadcast net (where there were 3 routers
    attached to a LAN), and potentially several more where single routers attach
    to a stub LAN.
    >
    > thanx for your help :)
    >

    --
    Regards

    - replace xyz with ntl
     
    stephen, Jan 22, 2006
    #6
  7. -aachen.de

    Merv Guest

    Re: DR election

    The following output demonstates that a DR is always elected on a OSPF
    network even if there is only one router.


    GigabitEthernet0/5/0/0 is unknown, line protocol is up
    Internet Address 12.8.1.3/24, Area 0
    Process ID merv, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State WAITING, Priority 1
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Waiting 40
    sec wait period before electing DR
    No designated router on this network
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:08
    Wait time before Designated router selection 00:00:29
    Index 1/1, flood queue length 0
    Next 0(0)/0(0)
    Last flood scan length is 0, maximum is 0
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0

    Suppress hello for 0 neighbor(s)



    #sh ospf merv nei

    Neighbors for OSPF merv

    #sh ospf merv201 int

    GigabitEthernet0/5/0/0 is up, line protocol is up
    Internet Address 12.8.1.3/24, Area 0
    Process ID merv, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    <<<<<<<<<<<<<<<<<<< Elect myself as DR
    Designated Router (ID) 3.3.3.3, Interface address 12.8.1.3
    No backup designated router on this network
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:07
    Index 1/1, flood queue length 0
    Next 0(0)/0(0)
    Last flood scan length is 0, maximum is 0
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0
    <<<<<<<<<<<<<<<<<< NO neighbours on this Ethernet
    segment; home alone
    Suppress hello for 0 neighbor(s)



    #sh ospf merv int

    GigabitEthernet0/5/0/0 is up, line protocol is up
    Internet Address 12.8.1.3/24, Area 0
    Process ID merv, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
    Transmit Delay is 1 sec, State DR, Priority 1
    Designated Router (ID) 3.3.3.3, Interface address 12.8.1.3
    No backup designated router on this network
    <<<<<<<<<<<<<<<<<<<<<<<< Notice no backup DR
    in this scenario
    Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Index 1/1, flood queue length 0
    Next 0(0)/0(0)
    Last flood scan length is 0, maximum is 0
    Last flood scan time is 0 msec, maximum is 0 msec
    Neighbor Count is 0, Adjacent neighbor count is 0
    Suppress hello for 0 neighbor(s)
     
    Merv, Jan 22, 2006
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. E.Finlayson
    Replies:
    0
    Views:
    1,704
    E.Finlayson
    Sep 10, 2004
  2. D Flint

    Real Election Reform

    D Flint, Jan 8, 2005, in forum: Computer Support
    Replies:
    1
    Views:
    391
    WormWood
    Jan 8, 2005
  3. Sparrow

    ELECTION: thoughts of a JFK/McCain ticket?

    Sparrow, May 20, 2004, in forum: Digital Photography
    Replies:
    22
    Views:
    668
    nappy
    Jun 12, 2004
  4. Ron Hunter

    Vote for Bloc Quebecois in next election

    Ron Hunter, Jun 24, 2004, in forum: Digital Photography
    Replies:
    22
    Views:
    807
    THE original Johnny
    Jun 30, 2004
  5. Replies:
    4
    Views:
    834
Loading...

Share This Page