Subnetting

Subnetting is a method of segmenting hosts within
a network and providing additional structure.
Without subnets, an organization operates as a flat
network. These flat topologies result in short routing
tables, but as the network grows, the use of
bandwidth becomes inefficient.

In the figure, a Class B network is flat, with a single
broadcast and collision domain. Collision
domains are explained in more detail in the
Ethernet chapter. For now, just think of them as a
small network segment with a handful of devices.
Adding Layer 2 switches to the network creates
more collision domains but does not control
broadcasts.
In the next figure, the same network has been subdivided
into several segments or subnets. This is
accomplished by using the third octet (part of the
host address space for a Class B network) to segment
the network. Note that the outside world
sees this network the same as in the previous figure.

Subnetting is a bit complex at first pass. Think of
it like a street address. For a house, the street
address may provide the needed addressability to
reach all the house’s occupants. Now consider an
apartment building. The street address only gets
you to the right building. You need to know in
which apartment the occupant you are seeking
resides. In this crude example, the apartment number
acts a bit like a subnet.