3

I understand that limited broadcasting happens locally and can be done by using destination address as 255.255.255.255. The directed broadcasting happens across networks.

To be precise, i want to know if following two broadcasting will have the same result -

1) I am at IP address 10.2.2.0 and I have broadcasted the packet to 255.255.255.255 (local limited broadcasting).

2) I am at same IP address 10.2.2.0 and this time I have broadcasted packet to 10.255.255.255 (i.e. directed broadcast address of this network).

I know that we should use limited broadcasting in such case but I want to know if (2) will work or not. Also, will it produce same result as above.

1
  • it may well depends on the operating system / device used. Run wireshark/tcpdump and test it :)
    – JFL
    Commented Nov 19, 2017 at 9:33

2 Answers 2

3

As well as the IP addressing, covered already by other answer, you have to consider the level 2 behaviour. What makes a packet broadcast is really whether it is sent to "all hosts within range". I'm speaking about the mechanism by which the signal actually arrives on the hosts. In the case of a broadcast medium such as radio, coax, or hub, it just goes to all hosts by the property of the medium.

But in the typical deployment of twisted-pair ethernet, the intervening switches need to see the destination broadcast address ff:ff:ff:ff:ff:ff to forward to all ports. (Same would be true of most bridges.)

Additionally, once the frame arrives on the target nodes, most interfaces do ethernet address filtering themselves. So unless the incoming frame is for this interface or the broadcast, it won't be sent off the interface to the CPU for processing by the IP layer, which decides if this packet is for this host.

It's up to the detail of the OS and its configuration to know whether such directed broadcast IP addresses are actually broadcast at L2. (Ie, at the stage of deciding whether to look in ARP cache for the ether address.) As far as I am aware, all modern OS will correctly L2-broadcast the L3-directed broadcast address. But I've certainly seen older ones which do not.

And clearly, if the packet arrives via a router, it's the router which decides whether to broadcast it, or more usually, throw it away.

2

Any traffic sent to the Limited Broadcast address will be processed by all hosts on the broadcast domain.

If there are hosts on the broadcast domain in a different IPv4 network than the Network Broadcast address, then the IPv4 modules of the hosts on an IPv4 network other than the network of the Network Broadcast address will drop the packets sent to the Network Broadcast address.

The difference is that the IPv4 module of a host looks at the destination address, and it will process packets sent to the Limited Broadcast address, but it will drop packets sent to a Network Broadcast address for a different network.

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.