You are on page 1of 24

Subnetting

Subnetting and Supernetting

Subnetting
• In subnetting, a network is divided into several smaller subnetwork with each
subnetwork(or subnet) having its own subnetwork address.

SUBNETTING
• Class A, B, C in IP addressing are designed with two levels of hierarchy.(netis and
hostid)

• The organization has two-level hierarchical addressing, but it cannot have more than one
physical network./ The host cannot be organized into groups, and all of the hosts are at
the same level./ The organization has one network with many hosts.

• One solution to this problem is subnetting, the further division of a network into smaller
networks called subnetworks.
A network with two levels of hierarchy (not subnetted)
A network with three levels of hierarchy (subnetted)

The router R1 uses the first two octet(141.14)as the netid, the third
octet(2) as the subnetid, and the fourth octet(21) as the hostid.
Subnetting and Supernetting

Three Levels of Hierarchy

• Adding subnetworks creates an intermediate level of hierarchy in the IP


addressing system.
– Netid: It defines the site.
– Subnetid : It defines the physical subnetwork
– Hostid: It defines the connection of the host to the network.
Addresses in a network with and without subnetting
Hierarchy concept in a telephone number
Subnetting and Supernetting

MASKING
• Masking is a process that extracts the address of the physical network from an
IP address.
• Masking can be done whether we have subnetting or not.
– Not subnetted the network: Masking extracts the network address an IP
address.
– Subnetted the network: Masking extracts the subnetwork address an IP
address.

• In masking, we perform a mathematical operation on a 32-bit IP address at the


bit level using another 32-bit number called the mask.
• To get the network or subnetwork address, we must apply the bit-wise-and
operation on the IP address an the mask.
• The part of the mask containing 1s defines the netid(network portion) or
combination of netid and subnetid(subnetwork portion), The part of the mask
containing 0s defines the hostid.
Masking
Applying bit-wise-and operation to achieve masking
Subnetting and Supernetting

Special Addresses in Subnetting

• A subnetid of all 1s or all 0s is not assigned to any host.


• The address with the hostid of all 1s is reserved for broadcasting to all hosts in a specific
subnet.
• The address with the hostid of all 0s is also reserved to define the subnetwork itself.
Special addresses in subnetting
Subnetting

EXAMPLES OF SUBNETTING

( Example 1 / Class A)
An organization with a class A address at least 1,000 subnetworks. Find the subnet mask and
configuration of each subnetwork.

(Solution)
1. There is a need for at least 1,000 subnetworks.(we need at least 1,002 subnetworks to
allow for the all-1s and all-0s subnetids)
2. This means that the minimum number of bits to be allocated for subnetting should be
10, (29 < 1,002 < 210).
3. 14 bits are left to define the hostids. Subnet mask (11000000 = 192).
Masks in example 1
Range of addresses in example 1
Subnetworks in example 1
Subnetting

( Example 2 / Class B)
An organization with a class B address needs at least 12 subnetworks. Find the subnet mask
and configuration of each subnetwork.

(Solution)
1. There is a need for at least 14 subnetworks.(we need at least 14 subetworks to allow
for the all-1s and all-0s subnetids)
2. This means that the minimum number of bits to be allocated for subnetting should be
4, (23 < 14 < 24).
3. 12 bits are left to define the hostids. Subnet mask (11110000 = 240).
Masks in example 2
Range of addresses in example 2
Subnetworks in example 2
Subnetting

( Example 3 / Class C)
An organization with a class C address needs at least 5 subnetworks. Find the subnet mask
and configuration of each subnetwork.

(Solution)
1. There is a need for at least 7 subnetworks.(we need at least 14 subetworks to allow
for the all-1s and all-0s subnetids)
2. This means that the minimum number of bits to be allocated for subnetting should be
3, (22 < 7 < 23).
3. 5 bits are left to define the hostids. Subnet mask (11100000 = 224).
Masks in example 3
Range of addresses in example 3
Subnetworks in example 3

You might also like