background image
Calculating the Subnets and the Number of Hosts Per Subnet
153
Subnetting
A
subnet
is a network in a multiple-segment environment that uses IP addresses derived from a
single network ID. Dividing the network into subnets requires that each subnet use a different
network ID. Partitioning the bits in the host ID into two parts, one for the extended network and
one for the hosts, creates a unique subnet ID. A subnet mask blocks a portion of the IP address
to separate the network ID from the host. A subnet mask specifies whether the host's IP address
is located on a local network or needs to be routed. Even in cases where there is no subnetting,
each host address requires a subnet mask.
Subnetting allows the CCDP to provide connectivity when the design must do the following:
·
Mix different technologies, such as Ethernet and Token Ring
·
Reduce network congestion by redirecting traffic and reducing broadcasts
·
Exceed the maximum number of hosts per segment
To design a subnetted network, determine the number of required network IDs and the number
of required host IDs for each subnet.
NOTE
If more than one route matches a particular destination, the longest prefix match is used. If
several routers might match one destination, the longest matching prefix is always used. The
route that has the longest match is considered the most-specific route.
NOTE
Save those addresses! Use the 255.255.255.252 "serial mask" 30-bit mask for efficient IP
address allocation for WAN links. Table 5-2, shown earlier, lists subnet masks, the number of
subnets, and the number of hosts per subnets associated with each subnet mask.
Calculating the Subnets and the Number of Hosts Per
Subnet
A total of 32 bits comprise an IP address. An IP address A.B.C.D. consists of 8 bits per octet.
In a network mask:
·
If a bit is set to 0, it should be considered a host.
·
If a bit is set to 1, it should be considered a network.
·
If the first 8 bits in an IP address are set to 1, a Class A network is formed, and the subnet
mask equals
A.B.C.D. = 11111111 00000000 00000000 00000000
87200333.book Page 153 Wednesday, August 22, 2001 2:37 PM