Rabu, 25 Oktober 2017

221

These bits are borrowed bits by changing the corresponding subnet mask bits to 1s to indi-cate that these bits are now being used as network bits. The last octet of the mask is then represented in binary by 11100000, which is 224. The new mask of 255.255.255.224 is rep-resented with the /27 notation to represent a total of 27 bits for the mask.

In binary, this subnet mask is represented as 11111111.11111111.11111111.11100000. After borrowing 3 of the host bits to use as network bits, this leaves 5 host bits. These 5 bits will allow up to 30 hosts per subnet.

Although you have accomplished the task of dividing the network into an adequate number of subnets, it was done with a significant waste of unused addresses. For example, only two addresses are needed in each subnet for the WAN links. There are 28 unused addresses in each of the three WAN subnets that have been locked into these address blocks. Furthermore, this limits future growth by reducing the total number of subnets available. This inefficient use of addresses is characteristic of fixed-block sizes that is a carryover from practices with classful addressing.

Applying a standard subnetting scheme to this scenario is inefficient. In fact, this example is a good model for showing how subnetting a subnet can be used to maximize address utilization.

Getting More Subnet for Less Hosts

Recall in previous examples that the original subnets were divided to gain additional, smaller subnets to use for the WAN links. Creating smaller subnets, each subnet is able to support two hosts, which leaves the original subnets free to be allotted to other devices and prevents many addresses from being wasted.

To create these smaller subnets for the WAN links in the network in Figure 6-24, begin with 192.168.20.192. You can divide this subnet into many smaller subnets. To provide address blocks for the WANs with two addresses each, you will borrow 3 additional host bits to be used as network bits:

Address 192.168.20.192 is 11000000.10101000.00010100.11000000 in binary.

Mask 255.255.255.252 is 11111111.11111111.11111111.11111100 in binary.


This addressing plan breaks up the 192.168.20.192 /27 subnets into smaller /30 subnets to provide addresses for the WANs. Doing this reduces the number of addresses per subnet to a size appropriate for the WANs. With this addressing, you have subnets 4, 5, and 7 avail-able for future networks, as well as several other subnets available for WANs.

220

With a single bit pattern, you can produce two unique bit patterns, 1 and 0. If you borrow 2 bits, you can provide four unique patterns to represent networks 00, 01, 10, and 11. Three bits would allow eight blocks, and so on.

Determine the Total Number of Hosts

Recall from the previous section that as you divide the address range into subnets, you lose two host addresses for each new network. These are the network address and broadcast address.

The formula for calculating the number of hosts in a network is

Usable hosts = 2n – 2

where n is the number of bits remaining to be used for hosts.

Subnetting a Subnet

Subnetting a subnet, or using variable-length subnet mask (VLSM), was designed to maxi-mize addressing efficiency. VLSM is a practice associated with classless addressing. When identifying the total number of hosts using traditional subnetting, you allocate the same number of addresses for each subnet. If all the subnets have the same requirements for the number of hosts, these fixed-size address blocks would be efficient. However, that is most often not the case.

For example, the topology in Figure 6-24 shows a subnet requirement of seven subnets, one for each of the four LANs and one for each of the three WANs. With the given address of 192.168.20.0, you need to borrow 3 bits from the host bits in the last octet, which provides eight subnets, to meet your subnet requirement of seven subnets.

Figure 6-24  VLSM Subnetting



192.168.20.32/27









192.168.20.0/27
192.168.20.196/30
192.168.20.200/30



Building A

Building B



Building C

Building D

192.168.20.192/30







192.168.20.96/27







192.168.20.64/27





Subnet Number

Subnet Address



Subnet Number

Subnet Address



























Subnet 0

192.168.20.0/27





Subnet 0


192.168.20.192/30


















Subnet 1

192.168.20.32/27





Subnet 1


192.168.20.196/30


















Subnet 2

192.168.20.64/27





Subnet 2


192.168.20.200/30



Subnet 3

192.168.20.96/27





Subnet 3


192.168.20.204/30



Subnet 4

192.168.20.128/27





Subnet 4


192.168.20.208/30



Subnet 5

192.168.20.160/27





Subnet 5


192.168.20.212/30


















Subnet 6

192.168.20.192/27





Subnet 6


192.168.20.216/30























Subnet 7

192.168.20.224/27





Subnet 7


192.168.20.20/30


















219

Figure 6-22  Subnets Planned on a Spreadsheet


Corporate Net
HQ
Sales
HR

Legal

WAN1
WAN2
WAN3
Unused

172.16.0.0/22
172.16.0.0/23
172.16.2.0/24
172.16.3.0/26

172.16.3.64/27
172.16.3.128/30
172.16.3.132/30
172.16.3.136/30


172.16.0.1
172.16.0.1

































































































172.16.1.255














172.16.2.0




































































172.16.2.255














172.16.3.0



























172.16.3.63















172.16.3.64













172.16.3.127














172.16.3.128












172.16.3.131














172.16.3.132












172.16.3.135














172.16.3.136













172.16.3.139














172.16.3.140















172.16.3.255











172.16.3.255














Figure 6-23  Additional Subnetting of the HQ Location























HQ

HQ1

HQ2








172.16.0.0/23
172.16.0.0/24

172.16.1.0/24







172.16.0.1
172.16.0.0



















































172.16.0.255















172.16.1.0











































172.16.1.255



172.16.1.255





















As previously presented, the creation of new, smaller networks from a given address block is done by extending the length of the prefix, that is, adding 1s to the subnet mask. Doing this allocates more bits to the network portion of the address to provide more patterns for the new subnet. For each bit you borrow, you double the number of networks you have. For example, if you use 1 bit, you have the potential to divide that block into two smaller networks.