0

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 255.255.255.255 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?

0
  1. Yes, if directed broadcast is supported across routers, 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 255.255.255.255). 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.

3
  • In case of limited broadcast switches flood the network with frames on receiving 255.255.255.255 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 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 at 6:24
  • Maybe you should study this Q&A to make layering clearer.
    – Zac67
    Aug 13 at 6:24

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.