OSPF: DR election

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:

formatting link
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

Reply to
sebastian.fey
Loading thread data ...

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.

Reply to
Merv

hey Merv,

thanks for your help!

yes sure. what i meant was: here

formatting link
are 2 types of networks.

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

Reply to
sebastian.fey

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).

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

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).

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

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.

Reply to
stephen

ok, its again about this network:

formatting link
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?

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)

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 :)

Reply to
sebastian.fey

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.

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

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...

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.

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.

Reply to
stephen

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

Reply to
Merv

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.