What is Subnetting/Supernetting?

What is Subnetting/Supernetting? 

Note : IP addresses are designed with 
two levels of hierarchy.

What is Subnetting/Supernetting?



Addresses in a network with
and without subnetting..

Subniting



Hierarchy concept in a telephone number

Subnetting

Subnetting

Finding the Subnet Address

Given an IP address, we can find the 
subnet address by applying the mask to the 
address. We can do this in two ways: 
straight or short-cut.


Straight Method
In the straight method, we use binary 
notation for both the address and the 
mask and then apply the AND operation 
to find the subnet address.

Example 1
What is the subnetwork address if the 
destination address is 200.45.34.56 and the 
subnet mask is 255.255.240.0?

Solution
11001000  00101101  00100010  00111000
11111111  11111111  11110000 00000000
11001000  00101101  00100000  00000000
The subnetwork address is 200.45.32.0.

Short-Cut Method
** If the byte in the mask is 255, copy 
the byte in the address.
** If the byte in the mask is 0, replace 
the byte in the address with 0.
** If the byte in the mask is neither 255 
nor 0, we write the mask and the address 
in binary and apply the AND operation

Example 2
What is the subnetwork address if the 
destination address is 19.30.80.5 and the 
mask is 255.255.192.0?

Solution
See Figure 5.6
Subnetting



IP address


The number of subnets must be 
a power of 2. 

Example 3
A company is granted the site address 
201.70.64.0 (class C). The company needs 
six subnets. Design the subnets. 

Solution
The number of 1s in the default 
mask is 24 (class C).


The company needs six subnets. This number 
6 is not a power of 2. The next number that is 
a power of 2 is 8 (23
). We need 3 more 1s in 
the subnet mask. The total number of 1s in 
the subnet mask is 27 (24 + 3).
There is 5 ,  0s  (32 - 27). 
The mask is

11111111 11111111 11111111 11100000
or 
255.255.255.224
The number of subnets is 8.
The number of addresses in each subnet 
is 25
 (5 is the number of 0s) or 32.
See Figure 5.8

Supernetting


Example 4
A company is granted the site address 
181.56.0.0 (class B). The company needs 
1000 subnets. Design the subnets.

Solution
The number of 1s in the default mask is 16 
(class B).
The company needs 1000 subnets. This 
number is not a power of 2. The next number 
that is a power of 2 is 1024 (210). We need 10 
more 1s in the subnet mask.
There are 26 ,  1s in the subnet mask  (16 + 10).
The total 0s is 6 (32 - 26).
The mask is
    11111111 11111111 11111111 11000000
                                 or 
                    255.255.255.192.
The number of subnets is 1024.
The number of addresses in each subnet is 2
6
(6 is the number of 0s) or 64.
See Figure 5.9

Supernetting



Subnetting

  


SUPERNETTING

Supernetting



Rules:
** The number of blocks must be a power of 2 (1, 2, 
4, 8, 16, . . .).
** The blocks must be contiguous in the address 
space (no gaps between the blocks).
** The first address's third byte in the 
superblock must be evenly divisible by the number 
of blocks. In other words, if the number of blocks is 
N, the third byte must be divisible by N. 

Example
A company needs 600 addresses. Which of 
the following set of class C blocks can be 
used to form a supernet for this company?
198.47.32.0 198.47.33.0 198.47.34.0
198.47.32.0 198.47.42.0 198.47.52.0 198.47.62.0
198.47.31.0 198.47.32.0 198.47.33.0 198.47.52.0
198.47.32.0 198.47.33.0 198.47.34.0 198.47.35.0

Solution
1: No, there are only three blocks. 
2: No, the blocks are not contiguous.
3: No, 31 in the first block is not divisible by 4. 
4: Yes, all three requirements are fulfilled. 

In subnetting, 
we need the first address of the 
subnet and the subnet mask to 
define the range of addresses.

In supernetting
we need the first address of 
the supernet
and the supernet mask to 
define the range of addresses.

Supernetting


Example
We need to create a 16-member supernetwork.
class C blocks. What is the supernet mask?

Solution
We need 16 blocks. For 16 blocks we should
place four 1s to 0s in the default mask. So the 
mask is 
11111111 11111111 11110000 00000000
or
255.255.240.0

Example
A supernet has a first address of 205.16.32.0 and a 
supernet mask of 255.255.248.0. A router receives three 
packets with the following destination addresses:
205.16.37.44
205.16.42.56
205.17.33.76
Which packet belongs to the supernet?

Solution
The supernet mask is used to see if we can locate
the beginning address.
205.16.37.44 AND 255.255.248.0  205.16.32.0
205.16.42.56 AND 255.255.248.0  205.16.40.0
205.17.33.76 AND 255.255.248.0  205.17.32.0
Only the first address belongs to this supernet. 

Example
A supernet has a first address of 205.16.32.0 and a 
supernet mask of 255.255.248.0. How many blocks are in 
this supernet, and what is its address range?

Solution
The supernet has 21 1s. The default mask has 24 1s. 
Since the difference is 3, there are 2
3 or 8 blocks in 
this supernet. The blocks are 205.16.32.0 to 
205.16.39.0. The first address is 205.16.32.0. The 
last address is 205.16.39.255.


No comments:

Ads

Powered by Blogger.