IP Broadcast Addresses

Broken Code
3 min readJan 6, 2022

--

Introduction

A Broadcast is any data that is meant to be delivered to every host of a subnet. Broadcast could be considered as one-to-all communication. This is different from unicast where data is meant to be delivered to a single destination host.

Unlike layer 2 (Data Link Layer) where one single broadcast address (FF.FF.FF.FF.FF.FF) exists, we have two broadcast addresses at layer 3 (Network Layer). One of them is known as Local Broadcast Address and the other is known as Directed Broadcast Address.

Local Broadcast Address: IP address 255.255.255.255 is known as local broadcast address. Local broadcast address is used to communicate with all the hosts of the same subnet. Technically, the broadcast should be sent to all the IP addresses that exist. However, it actually serves as an address for the broadcast within the local network as a router does not forward such a packet. Local Broadcast IP address is also known as Limited Broadcast IP address.

When the destination IP address is 255.255.255.255 then the destination MAC address is ff.ff.ff.ff.ff.ff which makes this packet both a Layer 2 and a Layer 3 broadcast.

Fig: PC1 sending data at 255.255.255.255

Directed Broadcast Address: Broadcast IP of each subnet i.e the last IP of each subnet is known as directed broadcast address. For example, the directed broadcast address for subnet 192.168.1.0 / 24 is 192.168.1.255. Like the local broadcast address, the directed broadcast address can also be used by a host to communicate to every host of the same subnet. When the destination IP address is directed broadcast address then the destination MAC address is ff.ff.ff.ff.ff.ff.

Fig: PC1 sending data at 192.168.1.255

Local vs Directed Broadcast Address

Now what makes directed broadcast address different from local broadcast address? Well the answer lies in the fact that the directed broadcast address can also be used to communicate with all hosts of a foreign subnet. If the destination is not located in host’s own network, a router forwards the data packet. This functionality can’t be achieved by local broadcast address as local broadcasts are always dropped by layer 3 devices.

Fig: PC1 sending data to 192.168.2.255

In directed broadcast (when it is for a foreign network) the packet travels from sender to destination router as unicast packet with source IP as IP of sender and destination IP as directed broadcast address. When the packet reaches the destination router, the router converts the unicast packet into broadcast packet with

Destination IP = 255.255.255.255Destination Mac = ff.ff.ff.ff.ff.ffSource IP = Sender IP

Summary:

Local Broadcast IP = 255.255.255.255

  • used to communicate to every host of the same subnet

Directed Broadcast IP = “Broadcast IP of a Subnet”

  • used to communicate to every host of the same subnet
  • used to communicate to every host of a foreign subnet

--

--