background image
262 Chapter 5: Network Protocols
difficult subnetting, the binary algorithm will be useful, at least until you become comfortable
with the decimal algorithm. The following binary algorithm is valid for basic subnetting as well.
Step 1
Reserve space to record a series of 32-bit numbers, one over the
other. Also leave space between each nibble and byte on each line
for better readability.
Step 2
Write down the 8, 16, or 24 bits of the network part of the address,
in binary, on each line.
Step 3
Write down binary 0s in the host field on each line. This should
result in a long list of binary numbers, with the subnet bits
unrecorded at this point.
Step 4
Write down all binary 0s in the subnet bit positions of the first
number in the list. This is the first subnet number, in binary. This
is also the zero subnet.
Step 5
Add binary 1 to the subnet field in the previous line, and record the
result in the subnet field of the next line.
Step 6
Repeat Step 5 until the subnet field is all binary 1s. That is the last
subnet number, which is also the broadcast subnet.
Step 7
Convert any of these 32-bit numbers back to decimal, 8 bits at a
time. IGNORE THE BOUNDARIES BETWEEN THE SUBNET
AND HOST FIELDS--do the conversion 8 bits at a time.
As usual, an example is better than a generic algorithm. First, a repeat of the 150.150.0.0,
255.255.255.0 example will be shown. Then network 150.150.0.0, with a different mask
of 255.255.248.0, will be shown. Table 5-20 shows the first several iterations of 150.150.0.0,
mask 255.255.255.0, but with a few of the intermediate subnet numbers not shown.
Table 5-20
Valid Subnet Numbers
Step 2 (only one line shown)
1001 0110 1001 0110
Step 3 (only one line shown)
1001 0110 1001 0110 0000 0000
Step 4
1001 0110 1001 0110 0000 0000 0000 0000
150.150.0.0
Step 5
1001 0110 1001 0110 0000 0001 0000 0000
150.150.1.0
Step 6
1001 0110 1001 0110 0000 0010 0000 0000
150.150.2.0
Step 6
1001 0110 1001 0110 0000 0011 0000 0000
150.150.3.0
Step 6
1001 0110 1001 0110 0000 0100 0000 0000
150.150.4.0
Step 6
1001 0110 1001 0110 0000 0101 0000 0000
150.150.5.0
Skipped a few for brevity
Step 6
1001 0110 1001 0110 1111 1111 0000 0000
150.150.255.0
ch05.fm Page 262 Monday, March 20, 2000 5:06 PM