How to Calculate The Broadcast Address on Netmask
The Internet Protocol (IP) is at the core of all computer communications over the Internet. Participants in IP exchanges are identified by their IP addresses; an IP address is a sequence of four numbers, all between 0 and 255. A network mask (or "netmask") is a special IP address that does not identify any host, but defines how many bits of IP addressing are available to hosts in the same subnet. A broadcast address is another special IP address; a message addressed to the broadcast address is received by all hosts in the subnet.
Instructions
-
-
1
Determine the IP address of the computer that intends to send the broadcast, and the corresponding netmask. The specific way of performing this operation depends on your computer's operating system. For example, on Microsoft Windows, click "Start," then "Run." Enter "cmd" into the text field in the Run window, then press "Enter." Enter "ipconfig /all" on the Command window, then press "Enter." The IP address will be listed after the "IPv4 Address" header in the output; the netmask will be listed after the "Subnet Mask" header.
-
2
Calculate the bitwise reverse of the netmask by evaluating this formula:
reverseNetmask = NOT(netmask)
The NOT operator substitutes ones by zeros and zeros by ones in the binary representation of the netmask. For example, if netmask equals 255.255.252.0 (11111111.11111111.11111100.00000000 in binary), then reverseNetmask equals 0.0.3.255 (00000000.00000000.00000011.11111111).
-
-
3
Calculate the broadcast address by evaluating the following formula:
broadcastAddress = IPaddress OR reverseNetmask
The OR operator returns a one if either of its inputs is a one, and zero otherwise. For example, if IPaddress equals 192.168.12.6 (11000000.10101000.00001100.00000110 in binary), then broadcastAddress equals 192.168.15.255 (11000000.10101000.00001111.11111111).
-
1