IP Networking
In Internet Protocol Version 4 (IPv4) networks, broadcast addresses are formed by a distinguished value for the host identification field, traditionally called the rest field, of an IP address. The all-ones rest field was established in RFC 919 as the standard broadcast address for networks that support broadcast. This method of using the all-ones address was first proposed by R. Gurwitz and R. Hinden in 1982 (IEN-212). 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.
The broadcast address for an IPv4 host can be obtained by performing a bitwise OR operation between the bit complement of the subnet mask and the host's IP address.
Example: For broadcasting 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 172.16.0.0 | 0.15.255.255 = 172.31.255.255.
A special definition exists for the IP broadcast address 255.255.255.255. It is the broadcast address of the zero network or 0.0.0.0, which in Internet Protocol standards stands for this network, i.e. the local network. Transmission to this address is limited by definition, in that it is never forwarded by the routers connecting the local network to other networks.
IP broadcasts are used by BOOTP and DHCP clients to find and send requests to their respective servers.
Internet Protocol Version 6 (IPv6), the next generation Internet Protocol, does not implement the method of broadcast, and therefore does not define broadcast addresses. Instead, IPv6 uses multicast addressing to the all-hosts multicast group. No IPv6 protocols are defined to use the all-hosts address, though; instead, they send and receive on particular link-local multicast addresses. This results in higher efficiency, because network hosts which are not listening for the particular multicast protocol(s) in use are not disturbed or interrupted, as they would be by broadcasts.
Read more about this topic: Broadcast Address