What is a Broadcast Address?

A broadcast address is an IP address that you can you to target all systems on a specific subnet instead of single hosts. The broadcast address of any IP address can be calculated by taking the bit compliment of the subnet mask, sometimes referred to as the reverse mask, and then applying it with a bitwise OR calculation to the IP address in question.

Some systems which are derived from BSD use zeros-broadcasts instead of ones-broadcasts. This means that when you create a broadcast address, you fill the host area of the IP address while displayed using binary values with zeros instead of ones. Most operating systems use ones-broadcasts. Changing systems to use zeros-broadcasts will break some communications in the wrong environments, so understand your needs before changing your broadcast address or its type.

Math example

If you have a system with IP address 192.168.12.220 and a network mask of 255.255.255.128, what should the broadcast address for the system be? Remember, to do this calculation, you need to convert all numbers to binary values. For bitwise OR, remember that any two values where at least one value is "1", the result will be "1", otherwise the result is "0".


IP Address: 11000000.10101000.00001100.11011100
Reverse Mask: 00000000.00000000.00000000.01111111
bitwise OR: -----------------------------------------------
Broadcast: 11000000.10101000.00001100.11111111

Convert the binary value back to octal, and you have your resulting value of 192.168.12.255. You can use the tech-faq.com subnet calculator to assist you in calculating network IP address values.

Setting up a broadcast address

In most cases the broadcast address will be properly set up by modern operating system once you enter the IP address and subnet mask. In some older unix systems that use classful definitions of subnets, the broadcast address is improperly formed, and you will need to change it.

Changing windows systems broadcast addresses

Windows systems do not allow you to change the broadcast address by hand. You can, however, choose whether the system uses zeros-broadcasts or ones-broadcasts. To change a windows system to use zeros-broadcasts, use the following procedure:

Changing unix systems broadcast addresses

Unix systems give the administrator a method to change the broadcast address to whatever value that they see fit to change it to. Ensure you know what you are doing before changing your broadcast address. In some cases, when using ifconfig from the command line, the broadcase address gets set to a classful based broadcast instead of the proper broadcast. You can check your results using the "ifconfig" command. Unfortunately, every unix system has differing syntax for the ifconfig command, and not all command options are available for every unix system. Check your ifconfig man page if you get hung up. The sample procedure below is the process you would use on a linux system to change a system broadcast address.




Bookmark What is a Broadcast Address?

Latest Blog Posts


Copyright 2008 Tech-FAQ. All rights reserved.