

This makes the broadcast address the largest possible IP address (and host address, since the host address portion is all 1s) for any given network address.)Ī special definition exists for the IP address 255.255.255.255. Bit Complement (Bitwise NOT) of the Subnet MaskĤ. This reserves the left 12 bits for the network address (prefix) and the right 32 - 12 = 20 bits for the host address (suffix).)ģ. Subnet Mask, or just "Netmask" for short (The '/12' in the IP address in this case means only the left-most 12 bits are 1s, as shown here.


To obtain the broadcast address, the host bits get set to all 1's, while the network address prefix bits remain intact.Ģ. In bold below is shown the host part (suffix) of the IP address, with the network address prefix being the non-bold bits to its left. Network IP address breakdown for 172.16.0.0 / 12 A shortcut to this process is to simply take the host's IP address and set all bits in the host identifier portion of the address (any bit positions which hold a 0 in the subnet mask) to 1.Īs shown in the example below, in order to calculate the broadcast address to transmit a packet to an entire IPv4 subnet using the private IP address space 172.16.0.0 / 12, which has the subnet mask 255.240.0.0, the broadcast address is calculated as 172.16.0.0 bitwise ORed with 0.15.255.255 = 172.31.255.255. The broadcast address for any IPv4 host can be obtained by taking the bit complement (bitwise NOT) of the subnet mask and then performing a bitwise OR operation with the host's IP address. The later introduction of subnets and Classless Inter-Domain Routing changed this slightly, so that the all-ones host address of each subnet is that subnet's broadcast address. This method of using the all-ones address was first proposed by R. The all-ones value was established as the standard broadcast address for networks that support broadcast. In Internet Protocol version 4 ( IPv4) networks, broadcast addresses are special values in the host-identification part of an IP address.
