Saturday, August 21, 2010

Variable Length Subnetmask






Variable Length Subnetmask !!!!!!!!!!!!!



IP ADDRESS : 192.168.20.0/24 Class C Network !!!


Network A : 50 Hosts 

Network B : 27 Hosts

Network c : 12 Hosts

Network D : 12 Hosts

Network E : 2 Hosts

Network F : 2 Hosts                                                                                         

Network G : 2 Hosts

Network H : 2 Hosts                                                                       

So the Number of Networks = 8 Networks

192.168.20. 0
1 1 1 1 1 1 1 1

NN HHHHHH

h
2 - 2 = --

6
2 - 2 = 62

n
2 = Nummber of Subnets

2
2 = 4 Subnets


00 000000 = 0

01 000000 = 64 => this is for Network A

10 000000 = 128

11 000000 = 192

N N 

128 64 32 16 8 4 2 1

Subnet masks for Network A 255.255.255.192 or by CIDr 192.168.20.0/26
( borrowed 2 N from Hosts )
so Network A from 192.168.20.64 to 192.168.20.127




2nd we will subnetting for Network B from 192.168.20.128 to 192.168.20.191


its mean 10 000000 = 128

h
2 - 2 = -- 


5
2 - 2 = 30                                                                                                                

NNN HHHHH

but in Network A we used 2 N

but in Network B we using 3 N so 

1 0 N HHHHH


this N for 0 and for 1

1 0 0 HHHHH so Network B 128

1 0 1 HHHHH

Subnetmask for Network B = 255.255.255.224 or by CIDR = 26 + 1 Extra bit 

192.168.20.128/27

( borrowed 3 N from Hosts )



so its still found two Networks from 128 to 159 and from 160 to 191



Next 2 Network c and d 

from 160 to 191

it means 1 0 1 N HHHH

for Network C = 12 Hosts

its mean
h
2 - 2 = ---                                        
4
2 - 2 = 14 Hosts


NNNN HHHH


1 0 1 0 HHHH 160 this is for Network C to 175

1 0 1 1 HHHH 176 this is for Network D to 191


Subnet mask 255.255.255.240 and by CIDR /28 = 27 + 1 Extra bit

because C and D in the same value of Number of Hosts

Network c : 12 Hosts

Network D : 12 Hosts



about A , B , C , D


this is my Network 

00000000 192.168.20.0/26     Network Address Unvalid

01000000 192.168.20.64/24   Network A

10000000 192.168.20.128/27 Network B

10100000 192.168.20.160/28 Network C

10110000 192.168.20.176/28 Network D

11000000 192.168.20.192/26 Broadcast Address Unvalid


but about this Range from 192.168.20.1 to 192.168.20.63 its Valid IP Addresses

and can use it so we can use this point to point Networks for Network E , Network F , Network G 
Network H

so now lets make network for E, F, G, H

h
2 - 2 = --

2
2 - 2 = 2 we just need 2 hosts so its valid

about first ip 192.168.20.0/26 00000000

00 NNNN 00

but we need just 2 H


so NNNN for represent 4 Extra bits like this :



00 000000 = 0

01 000000 = 64 

10 000000 = 128 001 010 011 0010 0001 0011 00001 00010 00011 ..etc

11 000000 = 192


represent 2 Hosts bits

and about 4N bits u can give it 16 Subnets


its mean you can subnet it for

0000 0000 0/30 0 - 3 first host 1 last one 2

0000 0100 4/30 4 - 7 first host 5 last host 6

0000 1000 8/30 8 - 12 first host 9 last 10 

0000 1100 12/30

0001 0000 16/30
-
-
-
-
0011 1000 56/30

0011 1100 60/30



this is My All Networks

0000 0000 192.168.20.0/30      Network E

0000 0100 192.168.20.4/30     Network F

0000 1000 192.168.20.8/30     Network G

0000 1100 192.168.20.12/30   Network H

0001 0000 192.168.20.16/30   For future Growth

01000000 192.168.20.64/24 Network A

10000000 192.168.20.128/27 Network B

10100000 192.168.20.160/28 Network C

10110000 192.168.20.176/28 Network D


Enjoy !!!                                                                                       

No comments:

Post a Comment