Major Nets and Subnet Masks

Every major net has two fields: the network field, which uniquely identities the major net, and the host field, which uniquely identifies hosts within the major net. Figure 1-1 illustrates the number of bits in the network and host fields for each class.

As mentioned in the previous section, subnetting is the process of dividing a major net into smaller (and generally more useful) subnets. This is accomplished by "stealing" some bits from the host field of the major net and using those bits to designate the subnet addresses. The host field varies in length, depending on the class of major net being subnetted (see Figure 1-1).

Figure 1-1 Lengths of the Network and Host Fields by Class

Class A

Network field

8 bits

Host field

24 bits

Class B

Network field

Host field

"V 16 bits

16 bits

Class C

"V 16 bits

16 bits

Class C

24 bits

When you consume some of the bits in the host field for subnets, you are left with three fields: the original network field, a newly created subnet field, and a reduced-size host field. Figure 1-2 illustrates the three fields you get after subnetting.

Figure 1-2 Subnetting Results in Network, Subnet, and Host Fields

Network field

Subnet field

Host field

Number of bits determined by class

Bits stolen from host field

Host bits remaining

You declare the number of bits you are stealing from the host field with a 32-bit subnet mask. The subnet mask contains a contiguous series of ones that start from the left-most bit (also called the most significant bit). Where the ones end and the zeros begin is the boundary between the subnet field and the host field. Figure 1-3 describes a subnet mask and provides an example.

Figure 1-3 Defining the Subnet and Host Fields with a Subnet Mask

Original major net:

Fields after subnetting:

Subnet mask:

Example mask:

Original major net:

Fields after subnetting:

Subnet mask:

Example mask:

Network field

Host field

Network field

Subnet field

Host field

ONES

ZEROS

11111111 11111111 11111111

00000000

Example mask in dotted decimal notation: 255.255.255.0

The example mask in Figure 1-3 has 24 one bits that start from the far left and 8 zero bits that fill out the remaining bits to the far right. This mask defines a host field of 8 bits because the boundary between the ones and the zeros is between the 24,h and 25th bits (bits 25 through 32 are zero and represent the host field). The size of the subnet field depends on whether this mask is applied to a class A, class B, or class C major net. Recall from Figure 1-1 that the network field is defined by the class of the major net.

When you convert the mask from Figure 1-3 into dotted decimal notation, you get 255.255.255.0. because

• The first octet (the first group of 8 bits) is all ones (255 in decimal)

• The second octet is all ones (255 in decimal)

• The third octet is all ones (255 in decimal)

The example in Figure 1-3 is a rather straightforward example because each octet is either all ones or all zeros. Things get more interesting when the boundary between the ones and zeros falls within an octet. Consider another mask:

11111111111111111111111111000000

To make this mask easier to read, separate the octets like this:

11111111.11111111.11111111.11000000

Now, convert each octct into decimal: 255.255.255.192

The preceding mask defines the subnet-host field boundary between the 26th and 27th bits, resulting in a host field of 6 bits (bits 27 through 32). Again, the size of the subnet field depends on the class of the major net to which you apply this mask. It's time for an example.

0 0

Post a comment

  • Receive news updates via email from this site