Networking: A Beginner's Guide
computers on the network, so a broadcast message to address 18.104.22.168 would go
to all addresses within 223.65.101.xxx.
IP addresses are made up of two main components. The first, or leftmost, is the
network ID, also called the netid. The other is the host ID, usually referred to as hostid.
The netid identifies the network, while the hostid identifies each node on that network.
(In IP parlance, every node is called a host, regardless of whether it's a server, client
computer, printer, or whatever.) For a Class C address, for instance, the netid is set in
the first three octets, and the hostids use the fourth octet. For a Class B address, the first
two octets are the netid, and the final two octets are hostids. These address parts are
important for subnetting, as described next.
Suppose that a company has three networks in three different buildings, all connected
by a 64 Kbps ISDN link. Each network has about 25 nodes. Each building has its own
set of servers and printers for the workers in that building. The ISDN link between the
networks is for the occasional need to transmit information between buildings, such
as e-mail messages or accounting transactions. How should the company assign IP
addresses in this situation?
The company could request a single Class C set of addresses, and then assign those
addresses across the three networks in some fashion. This seems like a simple solution,
but it's actually a poor idea for a couple of reasons. Typically, a lot of network traffic
is sent to each hostid within a single netid. The slow ISDN link between the buildings
would become a tremendous bottleneck in this situation, and the entire network would
function very poorly.
Another idea is to use separate Class C addresses (netids) for each building. This is
a relatively simple solution, and it would work just fine, except that the ISP might not
be able to assign three separate Class C addresses. Also, it would be terribly wasteful
of the available pool of IP addresses. In this situation, each building would be wasting
more than 200 addresses for no good reason.
What if there were a way to divide a Class C address so that each building could have
its own virtual netid? Such a solution is what subnetting is all about. Subnetting allows
you to subdivide a hostid range (usually that of a Class C address, but such subnetting
can also be done with Class A or B addresses) across two or more networks. Subnetting is
done through the use of subnet masks, which are discussed in the next section.
To understand subnetting, you first need to understand the binary representation of IP
addresses. For a quick overview of how binary numbers work, see Chapter 2.
If you look at a computer's IP configuration, you'll see that the computer always has
both an IP address (such as 22.214.171.124) and a subnet mask (such as 255.255.255.0).
The subnet mask defines which part of the computer's IP address is the netid and