3

OSPF RFC describes two different modes of operation of OSPF for (1) point-to-point and (2) broadcast networks (and others).

The operation on (2) involves selecting designated router and backup designated routers, and consequences thereof. Let's call it DR/BDR mode. AFAIK OSPF should be configured with the type for each interface.

If several routers are connected by a switch it makes sense that DR/BDR mode happens.

Recently, I have watched a cisco certification related video: (in particular question at this timestamp and this timestamp). In the video, there was a DR/BDR election on an Ethernet link, which was marked as broadcast, but the link was connecting only two routers? It seems really strange that one wants to have a link between only two routers work as broadcast link.

Does OSPF have to work in DR/BDR mode on Ethernet? Is it rather default configuration of cisco routers that is supposed to be overwritten. Is it bad configuration to still use Ethernet interface as broadcast? Or is it just a certification question that has no relevance in practice.

Edit:

I do understand that multicast addresses in packets make no difference. I am more interested in the added overhead of broadcast network:

  • for broadcast networks, OSPF creates so called network LSAs. This should mean that an extra LSA must be disseminated, stored in the database, and shortest-path calculation (dijkstra) gets an extra node and 2 links to consider.
  • flooding procedure. does having DR and BDR cause extra steps in LSA dissemination? (if I understand the procedure correctly, LSAs from DR do not cause anything extra, but an LSA from BDR should be re advertised back on the link, thus it is sent twice.)
  • how do routers know whether to put network from network LSA in routing table? this network should be marked as transit network (because it has 2+ routers attached and can be used for transit). But neither of the routers knows whether this network has end-systems or not. If it has end-systems, then prefix of these end-systems needs to be in the forwarding table. How does OSPF know whether to do it or not? Does it per-default assume that there are no end-systems on transit networks, or does one need to configure this separately?.

Does this all cause so little overhead for modern routers (with their processing power) that it does not matter at all?

4
  • overhead - in terms of bandwidth? processing? additional delay?
    – Zac67
    Oct 5 at 7:30
  • in term of does all of the above really matter
    – Effie
    Oct 5 at 7:44
  • It is really no big deal, but you can simply use the interface point-to-point command if you have concerns.
    – Ron Maupin
    Oct 5 at 17:14
  • 1
    Consider an LSA message is somewhere between 140 and 256 bytes. On a gigabit or 10-gigabit network, what percentage of bandwidth does it consume? On a router with gigabytes of RAM, how much extra memory is consumed?
    – Ron Trunk
    Oct 5 at 17:18
4

Does OSPF have to work in DR/BDR mode on Ethernet?

No. By default, Ethernet interfaces are broadcast type, and they elect DR/BDR. But you can change it with ip ospf network point-to-point command that eliminates the DR/BDR election.

Is it rather default configuration of cisco routers that is supposed to be overwritten. Is it bad configuration to still use Ethernet interface as broadcast? Or is it just a certification question that has no relevance in practice.

Practically speaking, there is little difference. When OSPF was first created, routers had much, much less processing power and memory than they do now. Modern routers have plenty of compute resources and memory, so unless you have a very large number of interfaces, you won't see a difference.

EDIT

How do routers know whether to put network from network LSA in routing table?

They don't. LSAs are put into a database, NOT the routing table. The SPF process reads the data from the database and then calculates the best path to each network. Those paths (routes) are put into the routing table.

2
  • how is "each" in each network determined? i mean, how does each router knows, what these "each network" need to be?
    – Effie
    Oct 6 at 17:38
  • I think you're confused by the term network LSA. It's not a network, it's a node in the graph. Networks are represented by links, not nodes.
    – Ron Trunk
    Oct 6 at 17:45
1

Cisco has the ip ospf network point-to-point interface command for such situations. You could also use the neighbor statement under the OSPF router configuration to use unicast.

Having a DR/BDR on an ethernet point-to-point link really is not a problem just because the traffic gets sent via multicast. On such a link, unicast or multicast achieves the same thing in a single packet. There is a very tiny delay in setting up the DR/BDR. but that only happens when the link comes up.

2
  • i know that multicast is not a problem. But DR/BDR mode should also create a "network LSA" (should be extra node in input for dijkstra?), and have rules on how LSAs get exchanged and acknowledged, which are different (although I am not sure that it will be different if there is only DR and BDR). Does this make no difference?
    – Effie
    Oct 4 at 17:26
  • 1
    Not really any difference because all routers only send to the DR, and the DR sends to all routers. There will not really be anything you notice. We do use the point-to-point interface command, but I never see a difference if an engineer leaves it out.
    – Ron Maupin
    Oct 4 at 17:32
1

You can use OSPF in P2P mode only on P2P links - e.g. a serial link with PPP on top, or with most kinds of tunnels.

On broadcast networks like Ethernet OSPF needs to use multicast for neighbor discovery - even if two routers are directly connected together since Ethernet requires addressing, it is a broadcast network after all. On some systems you can skip detection and configure neighbors manually, so that the router relationships become similar to P2P mode.

Regarding overhead: there might be ways to optimize OSPF and reduce some overhead, but given (multi-)gigabit links, gigabytes of RAM, and multi-GHz, possibly multi-core CPUs in current (and on-topic) devices, you can very much ignore the total overhead, except for very extreme cases.

Of course, you could adapt OSPF for more use cases but then again, you'd have a new routing protocol that would have to compete against the established protocols.

Not all LSAs end up in the actual forwarding table. All received link-state advertisements (LSAs) and other routing information are compiled into the routing information base (RIB) using Dijkstra's algorithm. From this, only the best routes (one for each destination) are transferred to the forwarding information base (FIB) to speed up processing (for software-based routing) or save precious TCAM space (for hardware-based routing).

7
  • i have another stupid question. does this "link" then end up in the forwarding table? Technically it should, there is no way of knowing if there are no hosts attached. Or can it be configured so it is clear that the network address is not routable?
    – Effie
    Oct 5 at 16:38
  • First of all, the 'link' is just to a neighbor router to exchange data with. Whether any of the exchanged routes end up in the forwarding table depends on the settings and the alternative (and possibly better) routes.
    – Zac67
    Oct 5 at 17:03
  • yes, but if there is a network LSA, it should go in the forwarding table, or am I wrong? (My logic - the router is connected to a network, with potentially end nodes attached. If there are potentially end nodes attached, then OSPF needs to compute routes to these end-nodes. Thus, network address from LSA should end in all router's forwarding tables)
    – Effie
    Oct 5 at 17:08
  • An LSA is just a data item that is exchanged. Routes are then compiled from all LSAs (into the RIB) and if there's a better route, the route based on a specific LSA might not make it to the FIB. Remember that you should make your network redundant, so you may and should have more than one path (route) between any two points.
    – Zac67
    Oct 5 at 17:13
  • yes, but each potential destination (subnet with end-nodes?) must be present in the FIB, if it is not, the router does not know path to it and can't route to it. If there was a host on this link, then the address of this host must be FIBs, so routers can actually forward to this host.
    – Effie
    Oct 5 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.