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, 2021 at 7:30
  • in term of does all of the above really matter
    – Effie
    Oct 5, 2021 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, 2021 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, 2021 at 17:18

4 Answers 4

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, 2021 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, 2021 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, 2021 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, 2021 at 17:32
1

On broadcast networks like Ethernet OSPF by default uses 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. Using the default multicast over Ethernet can decrase overhead though, in comparison to point-to-point meshing connections.

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, 2021 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, 2021 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, 2021 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, 2021 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, 2021 at 17:17
0

Since there was quite a lot of discussion spread between comments and chats, here is a summary of the discussion for reference.

Preamble:

(1) OSPF defines several modes of operation over three basic types of network: point-to-point, broadcast (multiaccess) network, and non-broadcast multiaccess network. The latter is presumably not relevant now.

Broadcast multiaccess link (or network) is a layer 2 domain which interconnects N devices, where N can be larger than 2. That is, such "link" can interconnect more than two routers. Broadcast means that one device can send a message to a broadcast/multicast address which reaches all other devices. This can be used for e.g., neighbor discovery.

The special DR/BRD mode is there to hanle "interconnect more than 2 router. Broadcast capabilities of the network are used for communication.

(2) Currently, dominant layer 2 technology is Ethernet. One could connect two routers directly with an ethernet cable (this essentially creating a point-to-point link), or (at least in theory) interconnect several routers with a switch, this creating a broadcast link which interconnects more than two routers.

Apparently, since Ethernet is a broadcast medium (well, CSMA/CD is broadcast medium and everything else emulates this broadcast medium), the routers per-default treat Ethernet as such, even if the link is indeed point-to-point. The question asks, whether it is worth specially configuring point-to-point ethernet cables as point-to-point links.

Questions/Answers:

addressing

OSPF defines different means to address packets on different types of medium. On broadcast medium, packets are addressed to multicast addresses AllSPFRouters.

If the link is actually point-to-point, it does not really matter what address is written in the packet. So, this would not make a difference.

However, for Ethernet links, OSPF also requires that interfaces on both sides of the link are assigned IP addresses. This will be the case independent of whether the interface is configured as point-to-point or broadcast link.

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.

and

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

An extra LSA is 140-256 bytes. For routers with several Gb of RAM interconnected by 1Gb or 10Gb links this is negligeable. Also routers have enough processing power, so the extra cost in calculating Dijkstra.

how do routers know whether to put network from network LSA in routing table? [check the question for the rest of this sentence]

The question is whether having a broadcast link will result in extra entries in a forwarding table.

Space in a forwarding table can be viewed as a constraint resource, since TCAM is power hungry. This led me to ask a question on which IP addresses do end in forwarding table, and whether addresses on point-to-point links can be omitted.

The short answer - every configured IP address ends up in the forwarding table. And since Ethernet requires addresses to be configured irrespectively of whether it is a point-to-point or multiaccess link, the amount of addresses that go in the forwarding table is unaffected by this configuration option.

[This is where my assumption was wrong. I thought that only addresses of stub networks (from router LSAs) and transit networks (from network LSAs) go into forwarding table, since these are networks where potential end-systems could reside. If it was the case, an interface configured as broadcast would result in extra transit network LSA and thus extra address.]

2
  • One correction: Ethernet also requires that interfaces on both sides of the link are assigned IP addresses. Ethernet, being a layer 2 protocol, has no concept of IP addresses.
    – Ron Trunk
    Dec 14, 2021 at 13:57
  • If you change Ethernet to OSPF, I think it will read better.
    – Ron Trunk
    Dec 14, 2021 at 14:11

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.