background image
154
Chapter 5: IP Addressing
A.B.C.D = 255. 0 . 0. 0.
·
If the first 16 bits in an IP address are set to 1, a Class B network is formed, and the subnet
mask equals
A.B.C.D. = 11111111 11111111 00000000 00000000
A.B.C.D = 255. 255. 0. 0.
·
If the first 24 bits in an IP address are set to 1, a Class C network is formed, and the subnet
mask equals
A.B.C.D. = 11111111 11111111 11111111 00000000
A.B.C.D = 255. 255. 255. 0.
NOTE
Remember: 1s equal network and 0s equal hosts.
Toggle only as many bits as you need. For more networks, start from the left, toggle that bit,
and then move to the right until a sufficient number of bits have been toggled. For hosts, start
from the right, toggle the bit to 0, and move to the left until a sufficient number of bits have been
toggled. As an example, if a Class A needed 29 extra networks, 5 extra bits would be toggled to
1, providing 2
5
­ 2 networks, or 30 networks.
2
5
­ 2 = 30
255.00000000.0.0 would become 255.11111000.0.0 or 255.248.0.0.
For example, if a Class C network needed 60 hosts, 6 bits would be toggled to 0, providing 2
6
­ 2 hosts, or 62 hosts.
6 mask bits => 11111111 11111111 11111111 11000000 => 255.255.255.192
How many hosts does the following mask provide?
13 mask bits => 11111111 11111111 10000000 00000000 => 255.255.255.128
Answer: 8190, because 2
13
­ 2 = 8190
As an example, let's take a site that has been assigned the network 170.1.0.0. It requires 100
hosts per subnet. Future growth indicates 120 hosts per subnet.
1
Determine the bits required to support at least 100 hosts and future expansion to 120 hosts
per subnet. Because 2
7
= 128, 7 is the minimum number of bits required for 100­126
hosts. To determine hosts, start from the right and move left.
2
Determine the mask.
170.1.0.0/25, or 255.255.255.128
Table 5-5 lists the available network addresses for subnet mask .224.
87200333.book Page 154 Wednesday, August 22, 2001 2:37 PM