Subdividing a Network into Subnets
Class A networks contain more than 16,000,000 IP addresses, and Class B networks contain more than 65,000 addresses. Out of context, those might seem like large numbers. When you consider the fact that all
provides one solution by reducing a lot of the waste. Subnetting refers to a process by which the network engineer in charge of a particular TCP/IP network number, in effect, changes the rules. Next, the chapter shows you an example in which lots of IP addresses are
The Problem: Wasting IP Host Addresses
As an example of the possibility of excessive IP address waste, examine Figure 10-8, which uses three Class B networks.
Figure 10-8. Wasting IP Addresses: Room for a Ton, Only Need a Few
The design in Figure 10-8 requires three networksin this case, three different Class B networks. Each Class B network has 2 16 2 host addresses (65,534) in itfar more than you will ever need for each LAN. Only a few IP addresses have been used so farone for each computer, plus one each for the router interfaces. (Remember: Each network interface has an IP address. So, in network 220.127.116.11, two addresses are used by the two computers, another is used by R1's right-side Ethernet interface, and a fourth is used by R2's left-side Ethernet interface.)
IP routing processes still work well, based on the fact that all hosts in the same network are in the same place. For instance, all hosts with addresses that start with 150.1 need to be on the Ethernet on the left side of Figure 10-8. However, more than 65,000 IP addresses exist for each of the three networks that are sitting around, unused.
The Solution: Subnetting Saves IP Host Addresses
IP subnetting relaxes the rules a little bit. Without subnetting, the following rules apply:
These two rules might have been somewhat intuitive to you, based on the earlier examples. However, to make sure routing works well, in Figure 10-8, all addresses that start with 150.1 need to be on the left-side Ethernetthat's Rule 1. Hannah and Dean, in networks 18.104.22.168 and 22.214.171.124, must be separated from each other by a routerin this case, R1. That's
Subnetting allows the network engineer to
This concept is better explained with an example. In Class B network 126.96.36.199, all hosts whose addresses begin with 150.1 are in the same network. An IP network is just a
Although all the addresses are still in Class B network 188.8.131.52, the networking devices will not think of the network as one big group, but instead, as a lot of smaller groups, called subnets. A
is just a subdivision of a larger Class A, B, or C network. The
Figure 10-9. Using One Network with Multiple Subnets
As in Figure 10-8, the design in Figure 10-9 requires three groups of IP addresses. Unlike Figure 10-8, this figure uses three subnets, each of which is a subnet of a single Class B network (network 184.108.40.206). Notice from Figure 10-9 that each subnet is much smaller than the original Class B network, but there are lots of subnets.
IP network numbers represent networks, and similarly, IP subnet numbers represent each subnet. The subnet number has the same value in the first part of the number as all the host addresses, and 0s in the last part. For instance, 220.127.116.11 is one of the subnet numbers in Figure 10-9. All addresses in the subnet begin with 150.1.1, so the subnet number includes those numbers as well. Because the fourth octet can be any valid number, the subnet number is simply 0 in the last octet.
Using subnets in the Figure 10-9 network saves IP addresses. This same internetwork of three Ethernet LANs only uses a part of Class B network 18.104.22.168, as opposed to the internetwork in Figure 10-8, which fully uses three Class B networks (22.214.171.124, 126.96.36.199, and 188.8.131.52). Also, if you add another LAN, instead of needing a brand new Class A, B, or C network, you have lots of unused subnets such as 184.108.40.206, 220.127.116.11, and so on.
This example shows just one way to use subnetting. You can subnet in many ways, including subnetting Class A, Class B, and even Class C networks. For now, you understand the basic concepts; just be aware that IP subnetting can get a fair amount more complicated than what's covered here.