background image
256 Chapter 5: Network Protocols
Decimal Algorithm for Deriving the Broadcast Address, Difficult Subnetting
The decimal algorithm for deriving the broadcast address when difficult subnetting is used is
shown next. When in doubt, use the binary algorithm. However, the following decimal
algorithm will yield the correct results:
Step 1
Write down the IP address in decimal.
Step 2
Write down the mask in decimal.
Step 3
Examine the mask. One of the four octets will have a value besides
255 or 0; otherwise, this would not be considered to be a
"difficult" case. The octet with the non-255, non-0 value is
considered to be the "interesting" octet. The other three are
considered "boring." Write down the number (1, 2, 3, or 4) of the
interesting octet. (For example, mask 255.255.240.0 has an
interesting third octet.)
Step 4
Subtract the mask's interesting octet's value from 256. Call that
value the multiplier. Write it down.
Step 5
For any boring octets to the left of the interesting octet, copy those
octets from the subnet onto a new line on your paper, leaving
space for the remaining octets. This line will be where you record
the broadcast address.
Address (Step 1)
199.1.1.4
1100 0111 0000 0001 0000 0001 0000 0100
Mask (Step 2)
255.255.255.0
1111 1111 1111 1111 1111 1111 0000 0000
Boolean AND (Step 3)
199.1.1.0
1100 0111 0000 0001 0000 0001 0000 0000
Broadcast address (Steps 4 to 6)
199.1.1.255
1100 0111 0000 0001 0000 0001 1111 1111
Address (Step 1)
172.100.2.2
1010 1100 0110 0100 0000 0010 0000 0010
Mask (Step 2)
255.255.255.0
1111 1111 1111 1111 1111 1111 0000 0000
Boolean AND (Step 3)
172.100.2.0
1010 1100 0110 0100 0000 0010 0000 0000
Broadcast address (Steps 4 to 6)
172.100.2.255
1010 1100 0110 0100 0000 0010 1111 1111
Address (Step 1)
17.9.44.3
0001 0001 0000 1001 0010 1100 0000 0011
Mask (Step 2)
255.255.255.0
1111 1111 1111 1111 1111 1111 0000 0000
Boolean AND (Step 3)
17.9.44.0
0001 0001 0000 1001 0010 1100 0000 0000
Broadcast address (Steps 4 to 6)
17.9.44.255
0001 0001 0000 1001 0010 1100 1111 1111
ch05.fm Page 256 Monday, March 20, 2000 5:06 PM