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:
I understand, that there are 2 kinds of networks:
1 broadcast (18.104.22.168/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 22.214.171.124) but rtr3 (ID 126.96.36.199). This is what our teacher says. But Boson Netsim 5.27 selects rtr6 as DR and says that 188.8.131.52/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 184.108.40.206/29 broadcast net?
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.
1 runs OSPF on the network 220.127.116.11, Router 2 on the network 18.104.22.168 ... 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 22.214.171.124? Do only interfaces in this network count while election, so rtr3 with 126.96.36.199 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??
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.
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 188.8.131.52/24, Area 0 Process ID merv, Router ID 184.108.40.206, Network Type BROADCAST, Cost: 1 Transmit Delay is 1 sec, State WAITING, Priority 1