background image
IP Addressing and Subnetting 247
be copied from the binary version of the address. The last 16 bits of the mask are all binary 0s;
any value ANDed with a binary 0 yields a 0. So, no matter what value is in the last 16 bits of
the address, once ANDed with the mask, the result will be all binary 0s, as shown in the example
result. The result is called the network number when no subnetting is used; the result is the
subnet number when subnetting is used.
Decimal Algorithm for Deriving the Subnet Number, Basic Subnetting
The decimal algorithm, when basic subnetting is in use, is as follows:
Step 1
Write down the IP address in decimal.
Step 2
Copy below the IP address either the first one, two, or three dotted
decimal numbers of the address, based on whether the subnet
mask is 255.0.0.0, 255.255.0.0, or 255.255.255.0, respectively.
Step 3
For the remaining dotted decimal numbers, record decimal
value 0.
This algorithm is very similar to the algorithm that is used when there is no subnetting. The only
difference is in Step 2. In fact, this later version of the algorithm would work fine when there is
no subnetting in use. Table 5-15 lists several examples.
*
The third column of Table 5-15 can be thought of as Step 2 in the decimal algorithm.
**
This example shows a Class C address, with default mask. No subnetting is in use in this case.
Binary Algorithm for Deriving the Subnet Number, Basic Subnetting
The binary algorithm to determine the subnet number, when using basic subnetting, is
practically identical to the algorithm used when there is no subnetting. Again, the key is in
knowing what subnet mask is in use. The binary process, with basic subnetting, is as follows:
Step 1
Write down the IP address in binary.
Step 2
Write down the subnet mask used in this network, in binary,
beneath the binary IP address from Step 1.
Table 5-15
Subnetting Examples
IP Address
Subnet Mask
Network and
Subnet Part*
Full Subnet Number
8.1.4.5
255.255.0.0
8.1
8.1.0.0
130.4.100.1
255.255.255.0
130.4.100
130.4.100.0
199.1.1.4
255.255.255.0
199.1.1
199.1.1.0**
172.100.2.2
255.255.255.0
172.100.2
172.100.2.0
17.9.44.3
255.255.255.0
17.9.44
17.9.44.0
ch05.fm Page 247 Monday, March 20, 2000 5:06 PM