What is a Broadcast Address?
A broadcast address is simply 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 which is referred to as the reverse mask and then applying it with a bitwise OR calculation to the IP address in question.
The systems at times are derived from BSD use zeros-broadcasts instead of ones-broadcasts. What this simply means is 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. The majority and most operating systems use ones-broadcasts. The problem with changing systems to use zeros-broadcasts is that it will break some communications in the wrong environments. So it is best to fully understand your needs before changing your broadcast address or its type.
Here is a Simple 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, in order to do this calculation, you will simply need to convert all numbers to binary values. That is the first step. For bitwise OR, also 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 |
Then finally 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
Most broadcast address in most instances and most cases are properly set up by modern operating system. That is once you enter the IP address and subnet mask it is done. In some older UNIX systems that use classful definitions of subnets, the broadcast address is likely to be improperly formed and you will have to change it.
Changing windows systems broadcast addresses
One can choose whether the system uses zeros-broadcasts or ones-broadcasts. In order to change a windows system to use zeros-broadcasts do the following:
• Log into the windows system with an account with administrator rights.
• Open your registry editor. If you do not know how to use the editor then skip this step.
• Find the registry key
“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ Tcpip\Parameters\Interfaces\[Adapter ID]“. Replace [Adapter ID] with the actual adapter ID you want to change the broadcast address for. You can get a list of all the adapter IDs in your 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″. You can use a hex or binary value in this case, since 1 is the same for both numbering systems.
• Reboot your system for the changes to take effect and you would have enabled zeros-broadcast for that adapter.
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. When using ifconfig from the command line, the broadcast address gets set to a classful based broadcast instead of the proper broadcast. Unfortunately, every UNIX system has differing syntax for the ifconfig command, and not all command options are available for every UNIX system. The sample procedure below is the process you would use 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 priviledges.
• Determine which adapter you want to change the broadcast address on the system by checking the output of “ifconfig -a”.
• Execute “ifconfig broadcast “. Replace and with the proper values.
• Test your configuration.
