A broadcast address is an IP address that targets 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 that are derived from BSD use zeros-broadcasts instead of ones-broadcasts. This means that when a broadcast address is created, the host area of the IP address is filled 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 the user should understand his/her needs before changing the broadcast address or type.
If a system has the IP address 192.168.12.220 and a network mask of 255.255.255.128, what should the broadcast address for the system be? To do this calculation, convert all numbers to binary values. For bitwise, remember that any two values where at least one value is 1, the result will be 1, otherwise the result is 0.
Convert the binary value back to octal and the resulting value is 192.168.12.255. The tech-faq.com subnet calculator can assist 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 systems once the IP address is entered and subnet masked. In some older unix systems that use classful definitions of subnets, the broadcast address is improperly formed, and the user will need to change it.
Changing Windows Systems Broadcast Addresses
Windows systems do not allow users to change the broadcast address by hand. Users 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:
- Log into the windows system with an administrator account.
- Open the registry editor. If unfamiliar with using the Windows registry editor, please do not perform these steps. A mistake can make the system unusable.
- Find the registry key “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices TcpipParametersInterfaces[Adapter ID]”. Replace [Adapter ID] with the actual adapter ID the broadcast address should be changed for. Get a list of all the adapter IDs in the Windows system by opening a command line prompt and executing a “ipconfig /all” command.
- Create a new DWORD value called “UseZeroBroadcast.” Set its inital value to 1. Use a hex or binary value in this case, since 1 is the same for both numbering systems.
- Reboot the system for the changes to take effect.
Zeros-broadcast for that adapter is now enabled.
Changing Unix Systems Broadcast Addresses
Unix systems give the administrator a method to change the broadcast address to whatever value he/she sees fit to change it to. The user should be familiar with the process before changing his/her broadcast address. In some cases, when using ifconfig from the command line, the broadcast address is set to a classful based broadcast instead of the proper broadcast. Check the results with 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 the ifconfig main page for help. The sample procedure below is the process used on a Linux system to change a system broadcast address.
- Open a terminal window, telnet, or ssh into the unix system in question, and log into the system.
- “Su” or “sudo” commands properly to get root privileges.
- Determine which adapter to change the broadcast address on the system to by checking the output of “ifconfig -a.”
- Execute “ifconfigbroadcast”. Replaceandwith the proper values.
- Test the configuration.
Got Something To Say: