2

I read that limited broadcast addresses will be dropped by the router. So, it's not used in the layer-3 (Network layer), where IP addresses are meant to be used. So, where exactly is it used?

8

The fact that it is dropped by routers (true!) does not mean it is not used in layer-3. Where else could it be used?

You are misunderstanding the use of directed and limited broadcasts. 255.255.255.255 is a limited broadcast: it is not passed on by routers, so it is really useful only to a member of a LAN to contact all other members of the same LAN. But routers will not forward these broadcasts because, if they did, these broadcasts would fill the whole internet. So they are useful, in Layer-3, and limited.

Directed broadcasts are represented by, for instance, 192.168.1.255. These are passed on by routers, because of course they are less invasive than 255.255.255.255, even though this feature is often disabled in real-world routers because it is easily abused (you'll see why in a second). If I am a member of of the subnet 192.168.1.0/24, then it makes little difference whether I use as a broadcast 255.255.255.255or 192.168.1.255.But suppose now I am a member of the subnet 192.168.2.0/24, and I want to send a broadcast to all members of a different subnet, say, 192.168.1.0/24. How can I do that? I cannot use 255.255.255.255 because that is restricted to the LAN of the emitter, 192.168.2.0/24 in this example, and thus it will never reach 192.168.1.0/24 because routers drop these packets. But, aha, I can use 192.168.1.255 from outside 192.168.1.0/24 to reach all members of the network with a single broadcast, because the router separating my subnet, 192.168.2.0/24 from the target subnet, 192.168.1.0/24 will pass these packets on.

You may wonder when a proper use case for directed broadcasts is: the answer is, when you cannot use unicast. For instance, in Wake On LAN (WOL), I cannot send a unicast packet because the pc that must receive it is turned off, and thus has no IP address, so I must use a broadcast. But if I am doing this from outside the sleeping pc subnet, then I need to use a directed broadcast.

As you can see, both limited and directed broadcasts are quite useful, whether routers pass them along or not.

  • 1
    So a broadcast WOL to 192.168.255.255 will wake up all on 192.168.1.0 , 192.168.2.0 and others? – ott-- Nov 29 '15 at 21:32
  • 1
    @ott-- The WOL packet must inlude the MAC address of the pc to be woken up, so no, not all pcs will be wken up,even though all will receive the broadcast message, but then they discard it when they compare the destination MAC with their own. – MariusMatutiae Nov 29 '15 at 22:40

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.