It means to split a network or to break a large network into
small networks. it is use to stop broadcasting, to manage IP addressing, to
save IP addresses etc. It is use for Intranet,
not for Internet. Number of hosts
will be reduce after the subnetting is done.
Subnetting can be done by 2 ways, CLSM and VLSM.
CLSM (Constant Length Subnet Mask) means every subnet will
have same subnet mask and requirement for networks will be given.
VLSM (Variable Length Subnet Mask) means every subnet will have different subnet
mask and requirement for hosts will be given. No IP address will be wasted and
we must start from largest network.
NOTE:
To calculate number of networks 2x
To calculate number of hosts
2n
-2
Formula for subnetting 2n -2
X
where n = number of host bit and
X = number of networks
Example of
CLSM :-
We have
150.160.10.20 (150.160.0.0) and
we need 5 subnets or networks
Step1 Calculate the minimum value of n, 2n -2
X
=> 2n
-2
5
8-2
5
n
= 3
Step2 Calculate the subnetted mask
NOTE: Subnet Mask tell the number of network bits
Subnetted Mask increase the number of network
bits
Default Subnet Mask =
255 . 255
. 0 . 0
Binary => 11111111.11111111.00000000.00000000
W X Y Z
Subnetted Mask = 11111111.11111111. 11100000.00000000
Decimal => 255.
255. 224.0 /19
Step3 Calculate the range of subnets
NOTE:
Check value of
last network bit in subnetted mask ( 32 )
Check the octet
in which the change has been occur ( Y )
150.160.0.0 ( or 150.160.0.1 to 150.160.255.254 )
1. 150.160.0.1 - 150.160.31.254
2. 150.160.32.1 - 150.160.63.254
3. 150.160.64.1 - 150.160.95.254
4. 150.160.96.1 - 150.160.127.254
5. 150.160.128.1 - 150.160.159.254
6. 150.160.160.1 - 150.160.191.254
7. 150.160.192.1 - 150.160.223.254
8. 150.160.224.1 - 150.160.255.254
NOTE: In every
question of subnetting, first and last subnets are invalid or useless but we can use IP-SUBNET ZERO command in router to
utilize first and last subnets. Some OS are manipulated to utilize it.
----------------------------------------------------------------------------------------
172.16.25.35 20
subnets
100.100.10.10 60
subnets
10.120.240.34 1000
subnets
Example of VLSM :-
We have 192.168.25.0
and we need 80 hosts in
Mumbai, 50 hosts in London and 30 hosts
in Delhi.
Mumbai :-
2n
-2
X =>
2n -2
80 => n=7 (host
bit)
32
bit - 7 = 25 (network bit) or /25
192.168.25.1 to 192.168.25.80 /25 ( 255.255.255.128 )
London :-
2n
-2
X
2n
-2
50
n=
6 32-6 =
/26
192.168.25.81 to 192.168.25.130 /26
Delhi :-
2n
-2
X
2n
-2
30
n =
5
32-5
= /27 192.168.25.131 to
192.168.25.160
No comments:
Post a Comment