Vous êtes sur la page 1sur 9

A Lesson In Subnetting

An IP Address Space is subnetted because there is a need to create multiple networks within the address space of an organization.
Some of the more common reasons are broadcast control and network security.
Subnetting is the process of borrowing bits from the host portion of the Address Space to create more networks. Subnetting an
Address Space should only be done if there is a demonstrated need because it increases the complexity of the network and requires the
purchase network devices that will support this complexity.
Once you have decided that subnetting is required, it is accomplished thusly:
Step 1:
You must first know the scope of your address space. This information may be provided to you or it can be determined if you
know an IP Address and Subnet Mask.
As example, suppose your IP Address and subnet mask were found to be:
IP Address:
Subnet Mask:

96313619.doc, Page 1 of 9

172.16.199.121
255.255.240.0

A Lesson In Subnetting
Step 2:
Your can now determine your address space by applying the binary subnet mask to the binary IP Address.
X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 0 0 0 0 . 0 0 0 0 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 1 1 1 . 0 1 1 1 1 0 0 1

Subnet Mask
IP Address

Notice that the subnet mask is just a pattern of 1s and 0s that begins with a 1 and remains a 1 until it changes to 0, then, it
remains a zero.
The division between the 1s and 0s in the subnet mask is the division between the network bits and the host bits in the IP
address. The network bits the IP address correspond with the 1s in the subnet mask, and, the host bits correspond with the 0s in
the subnet mask.
Replacing the host bits in the IP Address with 0s yields the first address in the IP Address Space. This is called the network
address.
X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 0 0 0 0 . 0 0 0 0 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0

Subnet Mask
Network Address

Replacing the host bits in the IP Address with 1s yields the last address in the IP Address Space. This is called the broadcast
address.
X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 0 0 0 0 . 0 0 0 0 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 1 1 1 1 . 1 1 1 1 1 1 1 1

Subnet Mask
Broadcast Address

The IP Address Space is defined as all the IP Addresses starting the network address and ending with the broadcast address and is
defined by the network address and the subnet mask. So, IP address 172.16.199.121 /20 is in the address space of 172.16.192.0 /
20.

96313619.doc, Page 2 of 9

A Lesson In Subnetting
Step 3:
Now that we know our address space, we can subnet the address space based on our needs.
Suppose we need to create 4 networks within our address space. The number 4 in binary is 100, so we need to borrow three bits
to create 4 networks.
To get started, we write the subnet mask and network address for the address space in binary
X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 0 0 0 0 . 0 0 0 0 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0

Subnet Mask
Network Address

We borrow three bits from the host portion to extend the subnet mask from /20 to /23.

X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 0 . 0 0 0 0 0 0 0 0

Subnet Mask

In these GREEN subnetted bits, we can create our networks. By definition network addresses have all 0s in the host portion, so,
the networks that we create are:
X
1
1
1
1
1
1
1
1
1

X
1
0
0
0
0
0
0
0
0

X
1
1
1
1
1
1
1
1
1

X
1
0
0
0
0
0
0
0
0

X
1
1
1
1
1
1
1
1
1

X
1
1
1
1
1
1
1
1
1

X
1
0
0
0
0
0
0
0
0

96313619.doc, Page 3 of 9

X
1
0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.
.

X
1
0
0
0
0
0
0
0
0

X
1
0
0
0
0
0
0
0
0

X
1
0
0
0
0
0
0
0
0

X
1
1
1
1
1
1
1
1
1

X
1
0
0
0
0
0
0
0
0

X
1
0
0
0
0
0
0
0
0

X
1
0
0
0
0
0
0
0
0

X
1
0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.
.

X
1
1
1
1
1
1
1
1
1

X
1
1
1
1
1
1
1
1
1

X
1
0
0
0
0
0
0
0
0

X
1
0
0
0
0
0
0
0
0

X
1
0
0
0
0
1
1
1
1

X
1
0
0
1
1
0
0
1
1

X
1
0
1
0
1
0
1
0
1

X
0
0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.
.

X
0
0
0
0
0
0
0
0
0

X
0
0
0
0
0
0
0
0
0

X
0
0
0
0
0
0
0
0
0

X
0
0
0
0
0
0
0
0
0

X
0
0
0
0
0
0
0
0
0

X
0
0
0
0
0
0
0
0
0

X
0
0
0
0
0
0
0
0
0

X
0
0
0
0
0
0
0
0
0

Subnet Mask
172.16.192.0
172.16.194.0
172.16.196.0
172.16.198.0
172.16.200.0
172.16.202.0
172.16.204.0
172.16.206.0

/23
/23
/23
/23
/23
/23
/23
/23

A Lesson In Subnetting
Step 4:
For each network that we have created, we can list the network address, broadcast address and valid host address range:
X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 0 . 0 0 0 0 0 0 0 0

Subnet Mask

1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.192.0
172.16.192.1
172.16.193.254
172.16.193.255

NA
FVH
LVH
BA

1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.194.0
172.16.194.1
172.16.195.254
172.16.195.255

NA
FVH
LVH
BA

1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.196.0
172.16.196.1
172.16.197.254
172.16.197.255

NA
FVH
LVH
BA

1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

1
1
1
1

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.198.0
172.16.198.1
172.16.199.254
172.16.199.255

NA
FVH
LVH
BA

1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.200.0
172.16.200.1
172.16.201.254
172.16.201.255

NA
FVH
LVH
BA

1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.202.0
172.16.202.1
172.16.203.254
172.16.203.255

NA
FVH
LVH
BA

96313619.doc, Page 4 of 9

A Lesson In Subnetting
1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.204.0
172.16.204.1
172.16.205.254
172.16.205.255

NA
FVH
LVH
BA

1
1
1
1

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

1
1
1
1

1
1
1
1

1
1
1
1

0
0
1
1

.
.
.
.

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
0
1
1

0
1
0
1

172.16.206.0
172.16.206.1
172.16.207.254
172.16.207.255

NA
FVH
LVH
BA

Remembering that at this point, the addresses where the subnet bits are all 0 or all 1, and the addresses where the host bits are all 0 or 1
are unusable. So, from your address space that contains one usable network containing 212 2 = 4094 usable host addresses
you have created 23 2 = 6 usable networks that contain 29 2 = 510 usable host addresses.

96313619.doc, Page 5 of 9

A Lesson In Subnetting
VLSM (Variable Length Subnet Masking)
In practice, no enterprise is composed of equal sized networks. As example, no enterprise needs 6 networks with 30 hosts on each
network. It is more likely that an enterprise needs 1 network with 30 host addresses, 1 network with 6 host addresses, 1 network with 10
host addresses, etc . . . To address real world networking requirements, and, to conserve the addresses in our address space, we use
variable length subnet masking.
Variable Length Subnet Masking, or VLSM, can be defined as subnetting the subnets.
Consider the following example. An enterprise with headquarters in Atlanta has been assigned an address space of 172.16.192.0 /23.
You are asked to subnet this address space to fulfill the following needs:
Atlanta Headquarters - 60 host addresses
HQ Server Farm
- 6 host addresses
Birmingham Office - 10 host addresses
Nashville Office
- 10 host addresses
Step 1
We must first subnet the address space to fulfill the needs of the largest network, the Atlanta Headquarters. So in order to create
networks with 60 host addresses, we need to reserve 6 host bits.
X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 0 . 0 0 0 0 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 0 0 0 0 0 0 0 0

SM 255.255.254.0
NA 172.16.192.0

1
1
1
1
1
1
1
1

NA
NA
NA
NA
NA
NA
NA
NA

0
0
0
0
0
0
0
0

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

1
1
1
1
1
1
1
1

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.

1
1
1
1
1
1
1
1

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
1
1
1
1

.
.
.
.
.
.
.
.

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

172.16.192.0/26
172.16.192.64/26
172.16.192.128/26
172.16.192.192/26
172.16.193.0/26
172.16.193.64/26
172.16.193.128/26
172.16.193.192/26

We can use one of these subnets for the Atlanta Headquarters:

1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 0 1 0 0 0 0 0 0

96313619.doc, Page 6 of 9

NA 172.16.192.64/26

A Lesson In Subnetting

Step 2
Our remaining addressing requirements are to fulfill the following needs:
HQ Server Farm
- 6 host addresses
Birmingham Office
Nashville Office

- 10 host addresses
- 10 host addresses

The largest remaining requirement is to create networks with 10 host addresses (we need to reserve 4 host bits). We can use one of the
unused subnets created in Step 1 to create these networks. We will subnet the subnet:
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 0 0 0 0 0 0

NA 172.16.192.128/26

X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 0 0 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 0 0 0 0 0 0

SM 255.255.255.192
NA 172.16.192.128

1
1
1
1

NA
NA
NA
NA

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

0
0
0
0

0
0
1
1

0
1
0
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

172.16.192.128/28
172.16.192.144/28
172.16.192.160/28
172.16.192.176/28

We can use 2 of these subnets for the Brimingham and Nashville offices:
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 0 1 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 1 0 0 0 0 0

96313619.doc, Page 7 of 9

NA 172.16.192.144/28
NA 172.16.192.160/28

A Lesson In Subnetting

Step 3
Our remaining addressing requirement is to have 6 addresses for the HQ Server Farm. We have 2 unused subnets remaining from Step 2
that will hold 6 addresses, but, they are the 00 and 11 subnets that are so far unusable. So, we will subnet another network from
Step 1. We will subnet the subnet:
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 1 0 0 0 0 0 0

NA 172.16.192.192/26

X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 0 0 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 1 0 0 0 0 0 0

SM 255.255.255.192
NA 172.16.192.192

1
1
1
1
1
1
1
1

NA
NA
NA
NA
NA
NA
NA
NA

0
0
0
0
0
0
0
0

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

1
1
1
1
1
1
1
1

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.

We can use one of these subnets for the HQ Server Farm:

1
1
1
1
1
1
1
1

1
1
1
1
1
1
1
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

.
.
.
.
.
.
.
.

1
1
1
1
1
1
1
1

1
1
1
1
1
1
1
1

0
0
0
0
1
1
1
1

0
0
1
1
0
0
1
1

0
1
0
1
0
1
0
1

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0

1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 1 0 0 1 0 0 0

96313619.doc, Page 8 of 9

172.16.192.192/29
172.16.192.200/29
172.16.192.208/29
172.16.192.216/29
172.16.192.224/29
172.16.192.232/29
172.16.192.240/29
172.16.192.248/29

NA 172.16.192.200/29

A Lesson In Subnetting

Step 4
That doesnt quite complete our requirements. We need to connect the Birminham and Nashville offices to the Atlanta Headquarters.
These WAN links only need 1 address for each end of the link. WAN links should always be addressed using /30 subnets. This
conserves addresses and provides a level of security. If a rogue router tries to join the network, all available IP addresses will have been
used.
We can use the unused subnets from Step 2 to create our /30 networks for our WAN links: We will subnet the subnet:
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 0 0 0 0 0 0

NA 172.16.192.128/28

X X X X X X X X
X X X X X X X X
X X X X X X X X
X X X X X X X X
1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . 1 1 1 1 0 0 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 0 0 0 0 0 0

SM 255.255.255.240
NA 172.16.192.128/28

1
1
1
1

NA
NA
NA
NA

0
0
0
0

1
1
1
1

0
0
0
0

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

.
.
.
.

0
0
0
0

0
0
0
0

0
0
0
0

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

0
0
0
0

.
.
.
.

1
1
1
1

0
0
0
0

0
0
0
0

0
0
0
0

0
0
1
1

0
1
0
1

0
0
0
0

0
0
0
0

172.16.192.128/30
172.16.192.132/30
172.16.192.136/30
172.16.192.140/30

We can use 2 of these subnets for to address the WAN links between the Birmingham and Nashville offices and the Atlanta
Headquarters:
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 0 0 0 1 0 0
1 0 1 0 1 1 0 0 . 0 0 0 1 0 0 0 0 . 1 1 0 0 0 0 0 0 . 1 0 0 0 1 0 0 0

* * * Congratulations - You have learned to subnet.

96313619.doc, Page 9 of 9

NA 172.16.192.132/30
NA 172.16.192.136/30

Vous aimerez peut-être aussi