Subnetting

Subnetting is the practice of dividing the network into two or more manageable networks.

Summary

Subnetting is the practice of dividing the network into two or more manageable networks.

Things to Remember

  1. subnet mask assign all the network address as 1's and all the host address as 0's.
  2. 2^H -2 ≥ number of required hosts 

MCQs

No MCQs found.

Subjective Questions

No subjective questions found.

Videos

No videos found.

Subnetting

Subnetting

Subnetting

Subnetting is the technique of logical division of the large network into the smaller manageable sub-networks. It is the practice of dividing the network into two or more networks.

Subnet mask

A subnet mask is a 32-bit number that masks the IP address and divides the IP address into the network address and host address. For obtaining the subnet mask assign all the network address as 1's and all the host address as 0's.
IP address ANDed with the subnet mask gives the network ID.

subnet mask

Problem :

Q. Suppose there are 4 Departments A(23 Hosts), B(16 Hosts), C(28 Hosts), D(13 Hosts). Given a network 202.70.64.0/24, perform subnetting in such way that IP wastage in each sub-network is minimum. Find subnet mask, Network ID, Broadcast ID and usable host range for each network.

Solution:-


Available network is 202.70.64.0/24
i.e. Total range of available IP address 202.70.64.0-202.70.64.255
We proceed sub-netting with the department with highest no. of host i.e. C and then A, B and D respectively.


For Dept. C (Start with network with maximum hosts)

• No. of hosts = 28
• For No. of bits required for host(Suffix) part (H),
• 2^H -2 ≥ 28 => H = 5 (Select minimum value of H)
• ie. Total no. of IP addresses this n/w can provide = 25 = 32
• No. of bits for Network(Prefix) part = 32 – 5 = 27
• No. of Subnets that can be created = 2^(27-24) = 8, which are given below:
• Available Subnets: 202.70.64.0/27 , 202.70.64.32/27, 202.70.64.64/27, 202.70.64.96/27 , 202.70.64.128/27, 202.70.64.160/27, 202.70.64.192/27 , 202.70.64.224/27
• Let us Select Subnet for C as 202.70.64.0/27, then,
• Subnet Mask = 255.255.255.[11100000] = 255.255.255.224
• Network ID = 202.70.64.0 (The first ip address of network)
• Broadcast ID = 202.70.64.31 (The last ip address of network)
• Usable Host IP range = 202.70.64.1/27 – 202.70.64.30/27

For Dept. A


• No. of hosts = 23
• For No. of bits required for host(Suffix) part (H),
• 2^H -2 ≥ 23 => H = 5 (Select minimum value of H)
• ie. Total no. of IP addresses this n/w can provide = 25 = 32
• No. of bits for Network(Prefix) part = 32 – 5 = 27
• No. of Subnets that can be created = 2^(27-24) = 8, which are given below: 202.70.64.0 / 27 is already used for Department C so cannot be used.
• Available Subnets: 202.70.64.32/27, 202.70.64.64/27, 202.70.64.96/27, 202.70.64.128/27, 202.70.64.160/27, 202.70.64.192/27, 202.70.64.224/27
• Let us Select Subnet for A as 202.70.64.32/27, then,
• Subnet Mask = 255.255.255.[11100000] = 255.255.255.224
• Network ID = 202.70.64.32 (The first ip address of network)
• Broadcast ID = 202.70.64.63 (The last ip address of network)
• Usable Host IP range = 202.70.64.33/27 – 202.70.64.62/27

For Dept. B


• No. of hosts = 16
• For No. of bits required for host(Suffix) part (H),
• 2^H -2 ≥ 16 => H = 5 (Select minimum value of H)
• ie. Total no. of IP addresses this n/w can provide = 25 = 32
• No. of bits for Network(Prefix) part = 32 – 5 = 27
• No. of Subnets that can be created = 2^(27-24) = 8, which are given below: 202.70.64.0 / 27 and 202.70.64.32/27 are already used for Departments C and A, so cannot be used.
• Available Subnets: 202.70.64.64 / 27, 202.70.64.96/27, 202.70.64.128/27, 202.70.64.160 / 27, 202.70.64.192/27 , 202.70.64.224/27
• Let us Select Subnet for B as 202.70.64.64 / 27, then,
• Subnet Mask = 255.255.255.[11100000] = 255.255.255.224
• Network ID = 202.70.64.64 (The first ip address of network)
• Broadcast ID = 202.70.64.95 (The last ip address of network)
• Usable Host IP range = 202.70.64.65/27 – 202.70.64.94/27

For Dept. D


•No. of hosts = 13
•For No. of bits required for host(Suffix) part (H),
•2^H-2 ≥ 13 => H = 4 (Select minimum value of H)
•ie. Total no. of IP addresses this n/w can provide = 2^4= 16
•No. of bits for Network(Prefix) part = 32 –4 = 28
•No. of Subnets that can be created = 2^(28-24)= 16
•(IP addresses upto 202.70.64.95 are already occupied)
•Let us Select Subnet for D as 202.70.64.96 / 28, then,
•Subnet Mask = 255.255.255.[11110000] = 255.255.255.240
•Network ID = 202.70.64.96
(The first ip address of network)
•Broadcast ID = 202.70.64.111 (The last ipaddress of network)
•Usable Host IP range = 202.70.64.97/28 –202.70.64.110/28

References:

  1. A.S. Tanenbaum, “Computer Networks”, 3rd Edition, Prentice Hall India, 1997.
  2. W. Stallings, “Data and Computer Communication”, Macmillan Press, 1989.
  3. Kurose Ross, “Computer Networking: A top-down approach”, 2nd Edition, Pearson Education
  4. Larry L. Peterson, Bruce S. Davie, “Computer Networks: A Systems Approach”, 3rd Edition, Morgan Kaufmann Publishers

Lesson

Network Layer

Subject

Computer Engineering

Grade

Engineering

Recent Notes

No recent notes.

Related Notes

No related notes.