0% found this document useful (0 votes)
110 views

Subnetting (A2Z)

Subnetting involves logically dividing a network into smaller subnetworks or subnets. It can be done in two ways - according to the number of hosts or the number of networks. Variable Length Subnet Mask (VLSM) allows the use of different subnet masks within the same network block to create subnets of various sizes.

Uploaded by

vasu dev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

Subnetting (A2Z)

Subnetting involves logically dividing a network into smaller subnetworks or subnets. It can be done in two ways - according to the number of hosts or the number of networks. Variable Length Subnet Mask (VLSM) allows the use of different subnet masks within the same network block to create subnets of various sizes.

Uploaded by

vasu dev
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

Subnetting:


 Logical division of IP

Network within network

Generally, Subnetting can be done in two ways

I. According to host
II. According to network
1. Given IP: 197.10.10.0, find the Subnet ID for each
department with their respective Broadcast ID.
Depart A: 5 host
Depart B: 10 host
Depart C: 20 host
Depart D: 30 host
Depart E: 40 host

Solution:

Step 1: Finding the types of class of given IP and their


host octet and network octet.
Given IP 197.10.10.0

The range of class C IP is (192.0.1.1) to


(223.255.254.254).
(Note: always check first octet to
find class )
Hence the given IP belongs Class C and it has 3 octet
for Network and 1 octet for host. i.e.
N: N: N: H
197.10.10.0
Step 2: Converting only host octet into binary system
197.10.10.00000000
(Note: Each octet is represented by 8-bits, so that IPv4 is
of 32-bits)
Step 3: Finding the values of n

We have,
2n -2 ≥ maximum no. of host

Where n represents no. of bits

2n -2 ≥ 40
At n=1,
21 -2≥ 40
0≥40, not satisfied

At n=2,
22-2≥ 40
2≥ 40, not satisfied
:
:
:
At n=6,
26-2≥ 40
64-2≥ 40
62≥ 40, satisfied
Hence n=6
Step4: Borrowing host bit to Network bit according
n=6 (from right to left <-------)
197.10.10.00000000
197.10.10.11000000

(Note: representation as
Network bit: 1
host bit : 0 )
Now converting into decimal, we have

197.10.10.192
(It is the LAST IP of given IP)

(The changes occur in first octet from right to left by 64)

Step 5: As we know, the default subnet mask for class


C IP is given by:
255.255.255.0
Hence, the subnet mask for given IP will be
255.255.255.192
Step 6: CIDR =?
(Class Inter Domain Routing)
CIDR = 32-n
CIDR = 32-6
Hence, CIDR= 26

Step 7: Subnet IDs =?

Subnet ID 1: 197.10.10.0/26
Broadcast ID: 197.10.10.63/26

Subnet ID 2: 197.10.10.64/26
Broadcast ID: 197.10.10.127/26

Subnet ID 3: 197.10.10.128/26
Broadcast ID: 197.10.10.191/26

Subnet ID 4: 197.10.10.192/26
Broadcast ID: 197.10.10.255/26

Subnet ID 5: 197.10.10.256/26; Not valid

Hence, we can derive only four subnet ID.


Step 8: Total number of Host per subnet?

The total number of Host bit (n) present in given IP:


n=6
Now, Total number of Host per subnet = 2n
26= 64
Hence, total number of Host per subnet = 64

Step 9: Usable number of Host per subnet?

Usable number of Host per subnet = 2n - 2


Hence, usable number of Host per subnet =62
2. Given IP: 12.0.0.0, find the Subnet ID for each
department with their respective Broadcast ID.
Depart A: 5 host
Depart B: 10 host
Depart C: 20 host
Depart D: 60 host
Depart E: 40 host

Solution:

Step 1: Finding the types of class of given IP and


their host octet and network octet.
Given IP 12.0.0.0

The range of class A IP is (1.0.0.0) to (126.255.255.255)


(Note: always check first octet to find class)
Hence the given IP belongs Class A and it has 3 octet
for Network and 1 octet for host. i.e.
N: H: H: H
12. 0. 0 .0

Step 2: Converting only host octet into binary system


12.00000000. 00000000.00000000
(Note: Each octet is represented by 8-bits, so that IPv4 is
of 32-bits)
Step 3: Finding the values of n

We have,

2n -2 ≥ maximum no. of host

Where n represents no. of bits

At n=6,
26-2≥60
64-2 ≥ 60
62 ≥ 60, satisfied the
condition Hence, n=6

Step 4: Borrowing host bit to Network bit according n=6


(from right to left <-------)
12.00000000. 00000000.00000000
12. 11111111.11111111.11000000

(Note: representation as
Network bit: 1
host bit : 0 )

Now converting into decimal, we have


12.255.255.192(last IP)
(The changes occur in first octet from right to left by 64)

Step 5: As we know, the default subnet mask for class A IP


is given by:
255.0.0.0
Hence, the subnet mask for given IP will be

255.255.255.192

Step 6: CIDR =?
(Class Inter Domain Routing)
CIDR = 32-n
CIDR = 32-6
Hence, CIDR = 26

Step 7: Subnet IDs =?

Subnet ID 1: 12.0.0.0/26
Broadcast ID: 12.0.0.63/26

Subnet ID 2: 12.0.0.64/26
Broadcast ID: 12.0.0.127/26

Subnet ID 3: 12.0.0.128/26
Broadcast ID: 12.0.0.191/26
Subnet ID 4: 12.0.0.192/26
Broadcast ID: 12.0.0.255/26

Subnet ID 5: 12.0.1.0/26
Broadcast ID: 12.0.1.63/26
:
:
:
Subnet ID 8: 12.0.1.192/26
Broadcast ID: 12.0.1.255/26

Subnet ID 9: 12.0.2.0/26
Broadcast ID: 12.0.2.63/26
3. Given IP: 157.110.88.0, find the Subnet ID for each bgd
ccccccccccdepartment with their respective Broadcast ID.
Depart A: 5 host
Depart B: 10 host
Depart C: 20 host
Depart D: 60 host
Depart E: 40 host

Solution:

Step 1: Finding the types of class of given IP and their


host octet and network octet.
Given IP 157.110.88.0
Hence, class B------ N:N:H:H

Step 2: Converting only host octet into binary system

157.110.01011000.00000000

Step 3: Finding the values of n

We have,

2n -2 ≥ maximum no. of host

Where n represents no. of bits


At n=6,
26-2≥60
64-2 ≥ 60
62 ≥ 60, satisfied the
condition Hence, n=6

Step4: Borrowing host bit to Network bit according n=6


(from right to left <-------)

157.110.01011000.00000000
After borrowing, we have,
157.110.11111111.11000000
(The all remaining part of the host is replaced by 1 followed by
0 as n=6)

Now converting into decimal, we


have 157.110.255 .192 (Last IP)

Step 5: As we know, the default subnet mask for class B


IP is given by:
255.255.0.0
Hence, the subnet mask for given IP will be
255.255.255.192
Step 6: CIDR =?
(Class Inter Domain Routing)
CIDR = 32-n
CIDR = 32-6
Therefore, CIDR = 26
Step 7: Subnet IDs =?

Subnet ID 1: 157.110.88.0/26
Broadcast ID: 157.110.88.64/26

Subnet ID 2: 157.110.88.64/26
Broadcast ID: 157.110.88.127/26

Subnet ID 3: 157.110.88.128/26
Broadcast ID: 157.110.88.191/26

Subnet ID 4: 157.110.88.192/26
Broadcast ID: 157.110.88.255/26

Subnet ID 4: 157.110.89.0/26
Broadcast ID: 157.110.89.63/26
4. Given IP: 12.0.0.0, find the Subnet ID for each
department with their respective Broadcast ID.
Depart A: 16 host
Depart B: 32 host
Depart C: 64 host
Depart D: 1024 host
Depart E: 512 host

Solution:

Step 1: Finding the types of class of given IP and their


host octet and network octet.
Given IP 12.0.0.0
Hence, class A------ N: H: H: H

Step 2: Converting only host octet into binary system


12.0.0.0
12.00000000.00000000.00000000

Step 3: Finding the values of n

We have,
2n -2 ≥ maximum no. of host

Where n represents no. of bits


At n= 10,
210 - 2 ≥ 1024
1024 - 2 ≥ 1024
1022 ≥ 1024, not satisfied

At n= 11,
211 - 2 ≥ 1024
2048 -2 ≥ 1024
2046 ≥ 1024, satisfied

Hence n=11

Step4: Borrowing host bit to Network bit according


n=11(from right to left <-------)
12.00000000. 00000000.00000000
12.11111111. 11111000.00000000

(Note: The changes occur in second octet from right to


left by 8)
Now converting into decimal, we
have 12.255.248.0 (Last IP)

Step 5: As we know, the default subnet mask for class A


IP is given by: 255.0.0.0

Hence, the subnet mask for given IP will be


255.255.248.0
Step 6: CIDR =?
(Class Inter Domain Routing)
CIDR = 32-n
CIDR = 32-11
CIDR = 21

Step 7: Subnet IDs =?

Subnet ID 1: 12.0.0.0/21
Broadcast ID 1: 12.0.7.255/21

Subnet ID 2: 12.0.8.0/21
Broadcast ID 2: 12.0.15.255/21

Subnet ID 3: 12.0.16.0/21
Broadcast ID 3: 12.0.23.255/21

Subnet ID 4: 12.0.24.0/21
Broadcast ID 3: 12.0.31.255/21
:
:
:
Subnet ID : 12.0.248.0/21
Broadcast ID: 12.0.255.255/21
Subnet ID : 12.1.0.0/21
Broadcast ID : 12.7.255.255/21
2. According to Network
5. Consider the IP address 157.110.88.0, we need 30
subnet in such a way that each subnet may host upto 64
host.

Step 1: The IP 157.110.88.0 is of class B.


N: N: H: H

Step 2: Only representing network octet i.e. Network


ID

157.110.00000000.00000000

Step 3: Finding the value of n

2n ≥ maximum no. of subnet required


2n ≥ 30

Therefore, n= 5

Step 4: Borrowing host bits to network bits from


(LEFT to RIGHT  )

157.110.00000000.00000000
157.110.11111000.00000000
Converting into decimal
157.110.248.0 (Last IP)

(NOTE: The changes occur in second octet from right to


left by 8)

Step 5: Subnet mask?


255.255.248.0
Step 6: CIDR =?
CIDR = Total no. of network bits + n
CIDR = 16+ 5
CIDR = 21

Step 7: Subnet ID?

Subnet ID 1: 157.110.0.0/21 05:00 05:59 06:00


Broadcast ID 1: 157.110.7.255/21

Subnet ID 2: 157.110.8.0/21
Broadcast ID 2: 157.110.15.255/21

Subnet ID 3: 157.110.16.0/21
Broadcast ID 3: 157.110.23.255/21 and so on.
CCNA Q: The given IP 192.168.15.240/28, find out
that it is which part of the subnet?

Solution:
The given IP is of class C and default subnet of class C is 24
But, subnet: 24+4=28
Now,
192.168.15.11110000
(The changes occurs in first octet by 16 from left to right i.e.
each subnet has difference of 16)
Subnte ID 1192.168.15.0/28
192.168.15.16/28
192.168.15.32/28
192.168.15.48/28
192.168.15.64/28
192.168.15.80/28
192.168.15.96/28
192.168.15.112/28
Subnet ID 9 -----> 192.168.15.128/28
192.168.15.144/28
192.168.15.160/28
192.168.15.176/28
192.168.15.192/28
192.168.15.208/28
192.168.15.224/28
Subnet ID 16 -----> 192.168.15.240/28

Hence, the given IP 192.168.15. 240/28 is 16th part of subnet


#VLSM (Variable Length Subnet Mask)

6. Given IP: 197.10.10.0, find the VSLM each department with


their respective Broadcast ID and subnet mask.
Depart A: 4 host
Depart B: 10 host
Depart C: 20 host
Depart D: 30 host
Depart E: 2 host

Solution:
Step 1: The given IP 197.10.10.0 is of class C and it has:
N:N:N:H

Step 2: Converting only host octet into binary system.

197.10.10.00000000

Step 3: n =?
2n – 2 >= max no. of host
25- 2>= 30
30>=30, satisfied.
Hence, n = 5

Step 4: Borrowing host bit to Network bit


according n = 5
197.10.10.00000000
197.10.10.11100000
Converting into decimal
197.10.10.224

Subnet mask: 255.255.255.224

Step 5: CIDR =?
CIDR = 32- 5
CIDR = 27

Step 6:
Subnet ID 1: 197.10.10.0/27
Broadcast ID: 197.10.10.31/27
Subnet mask: 255.255.255.224

Subnet ID2: 197.10.10.32

2^n - 2 >= 20
n =5
Borrowing host bit to n/w bit according n=5
197.10.10.00000000
197.10.10.11100000
Converting to decimal
197.10.10.224
(The changes occur in first octet from right to left by 32)
Step5: CIDR=?
CIDR= 32-n
CIDR= 32-5=27

Subnet ID 2 : 197.10.10.32/27
Broadcast ID : 197.10.10.63/27
subnet mask : 255.255.225.224
Subnet ID 3: 197.10.10.64
2^n - 2 >= 10
n=4
Borrowing host bit to n/w bit according n=4
197.10.10.00000000
197.10.10.11110000
Converting to decimal
197.10.10.240
(The changes occur in first octet from right to left by
16)

CIDR= 32-4 => 28


Subnet ID 3: 197.10.10.64/28
Broadcast ID: 197.10. 10.79/28
Subnet mask: 255.225.225.240

Subnet ID 4: 197.10.10.80

2^n - 2 >= 4
n=3
197.10.10.00000000
197.10.10.11111000
Converting to decimal
197.10.10.248
(The changes occur in first octet from right to left by
8)
CIDR= 32-3 => 29
Subnet ID 4: 197.10.10.80/29
Broadcast ID: 197.10.10.87/29
Subnet mask: 255.255.255.248

Subnet ID5: 197.10.10.88


2^n - 2 >= 2
n=2
197.10.10.00000000
197.10.10.11111100
Converting to decimal
197.10.10.252
(The changes occur in first octet from right to left by 4)
CIDR= 32-2 => 30

Subnet ID5: 197.10.10.88/30


Broadcast ID: 197.10.10.91/30
Subnet mask: 255.255.255.252
Q: Given IP : 197.10.72. 32, find the
VLSM(Variable Length Subnet Mask) for
each depart

B: 10 host
C: 34 host
D: 44 host
E : 2 host
How to find the Network ID in Classless Routing?

Example 1 : Given IP : 192.0.30.1/26, find its


Network ID.
n= 32 - CIDR
n = 32 - 26
n= 6
Converting the given IP into Binary system.
11000000.00000000.00011110.00000001
Now, making zero as n=6 from right to
left. we have
11000000.00000000.00011110.00000000
Converting into decimal
192.0.30.0/26
Hence, the Network ID of given IP is 192.0.30.0/26
Example 1: Given IP: 192.0.30.1/22, find its Network ID.
n= 32 - CIDR
n = 32 - 22
n= 10
Converting the given IP into Binary system.
11000000.00000000.00011110.00000001
Now, making zero as n=10 from right to
left. We have
11000000.00000000.00011100.00000000
Converting into decimal
192.0.28.0/22

Hence, the Network ID of given IP is 192.0.28.0/22


Subnet ID 1: 157.110.88.0/27
Host bit= 32-27= 5 bit
Total no of host= 25 =32

157.110.88.0/26 netwrok ID
157.110.88.1/26
157.110.88.2/26
157.110.88.3
157.110.88.4
157.110.88.5
157.110.88.6
157.110.88.7
157.110.88.30/26
:
:
157.110.88.31/26 Broadcast ID

You might also like