I have started reading on Computer Networks recently(beginner), and have come across some of the doubts regarding how the broadcasting is handled by routers and switches. Assuming there are no restrictions on the routers for forwarding the packets, these are the queries I am having:-

  1. Since in the case of directed broadcasting to a foreign network, the last router changes the unicast packet to a broadcast one so that it gets delivered to all hosts in the network, does the same procedure happens in the case of directed broadcasting in the same network?

  2. What is the role of Switches in the case of directed broadcasting? In the case of local broadcasting, switches were responsible for sending out the packets to everyone in the network on receiving the packet, do they perform the same way in directed broadcasting too? Like, does the 'last' router which converted the unicast packet to broadcast packet sends out this packet to switch which then forwards it to all the hosts in the network?

  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer.
    – Ron Maupin
    Dec 23, 2021 at 20:47

1 Answer 1

  1. Yes, if directed broadcast is supported across routers[*1], then the last hop gateway uses an L2 broadcast to forward the packet to all subnet nodes. By default, routers drop directed broadcasts. When sent from within the destination subnet, a directed broadcast is sent the same way on L2 as a limited broadcast (to The only difference is the L3 destination address.
  2. Switches simply flood (L2) broadcast frames to all ports in the broadcast domain (VLAN), mimicking a repeater hub (which repeats all data to all ports).

Note that a switch has no notion of L3 addressing and acts on a frame's L2 destination address only. Correspondingly, there's no difference on L2 between L3 limited broadcast and L3 (subnet) directed broadcast.

[*1] Usually, intermediate routers have no idea of (or care for) the destination's subnet mask, so a directed broadcast is just a unicast for them. However, some routers seem to check their routing table and if the destination address matches the directed broadcast address of an explicit route, they might drop the packet even if they're not directly attached. This is quite unusual but happened to me with a P2P link address that was no directed broadcast. Usually, it's only up the last-hop router to decide, of course.

  • In case of limited broadcast switches flood the network with frames on receiving and the router doesn't have any role here, right? But what if there are no switches in the network( that's possible right? ). Also, in my second question, I am trying to know if the router sends the broadcasted packet to Switch which will flood the network? or the router itself 'directly' broadcast it to every node?
    – Mrityu
    Aug 13, 2021 at 5:22
  • @Mrityu Yes - a router receives and potentially originates limited broadcasts but it doesn't ever forward them. If there's no switch, there's just a single node connected to the router port. Packets are sent between L3 nodes which a switch isn't part of - a switch only sees the encapsulating L2 frames. A router has just got a single interface with a subnet, so it requires a switch (or formerly a repeater hub) for distribution.
    – Zac67
    Aug 13, 2021 at 6:24
  • Maybe you should study this Q&A to make layering clearer.
    – Zac67
    Aug 13, 2021 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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