Thursday, 2 June 2011

Subnetting in very easy way !







Here is very simple way to learn subnetting, 

You have to just remember few things by heart to make it easy as the following:

Step 1) Remember the different Classes of IP that is

Class A           1  to 127              1.0.0.0. to 127.0.0.0

Class B           128 to 191           128.0.0.0 to 191.255.0.0 

Class C           192 to 223           192.0.0.0 to 223.255.255.255.0 


Step 2)       
             128      64     32      16     8       4        2        1
             
             2^7     2^6   2^5    2^4  2^3   2^2    2^1    2^0
        


Step 3)  
            1000 0000        128
            1100 0000        192 
            1110 0000        224
            1111 0000        240
            1111 1000        248
            1111 1100        252
            1111 1110        254
            1111 1111        255


Now For example we want to create 10 network from 192.168.10.0 which is Class C, that you have to must know before you start. 

Now think In which number this 10 is fit from the Second step. So 16 is fit in which is 2^4. So take 4 bit here.

Now see the Class C bits which is 1111 1111 .1111 1111 . 1111 1111 . 0000 0000,  255.255.255.0,
If you reserve 1 bit from this then what we get? Lets see.... 

1111 1111 .1111 1111 . 1111 1111 . 1111 0000 that is 255.255.255.240 as per Step 3.

We have 4 bit left. you can do 2^4 that means again 16.

Now, you can add 16 in each IP:

1) 192.168.10.0           192.168.10.15          
2) 192.168.10.16         192.168.10.31
3) 192.168.10.32         192.168.10.47
4) 192.168.10.48         192.168.10.63
5) 192.168.10.64         192.168.10.79
6) 192.168.10.80         192.168.10.95
7) 192.168.10.96         192.168.10.111
8) 192.168.10.112       192.168.10.127
9) 192.168.10.128       192.168.10.143
10)192.168.10.144      192.168.10.159
11)192.168.10.160      192.168.10.175
12)192.168.10.176      192.168.10.191
13)192.168.10.192      192.168.10.207
14)192.168.10.208      192.168.10.223
15)192.168.10.224      192.168.10.239
16)192.168.10.240      192.168.10.255   

In this example we want 10 network but we get 16, but not to worry about cause we can use extra 6 for future purpose.

This is very easy example to understand.


Now you can try other complicated as well. 
   
  

2 comments:

Unknown said...

Nice explanations Hardik...keep it up...!

Unknown said...

Thank you very much