Tuesday 25 June 2013

Subnetting : CCNA

Ip Address : 32 bit.

Example :

Ip Address - 192.168.0.1 - 11000000.10101000.00000000.00000001
Subnet mask - 255.255.255.0 - 11111111.11111111.11111111.00000000

In subnetting, subnet mask is very important.  All 1's are network bit(it is remain same for entire network). All0's  are host bit( assign to host)

So, first 24 bit is your network bit. only last eight bit for Host. Your network range is 192.168.1.0 to 192.168.1.255 (Total 256 ip address including 0 and 255)

192.168.1.0 - This is Network Id
192.168.1.1 - This is the First valid in your network
.
.
.
.
192.168.1.254 - This is the last valid ip in your network
192.168.1.255 - This is the broadcast ip.


Total 256 ip's, first one is network id and last one is Broadcast. These two ip address you can not assign to you pc. So total valid ip in this network is 254. (192.168.1.1 - 192.168.1.254)

Decimal to binary calculation
192/2=96 - remaining 0
96/2=48 - remaining 0
48/2=24 - remaining 0
24/2-12 - remaining 0
12/2=6 - remaining 0
6/2=3 - remaining 0
3/2=1 - remaing 1

Now you write from bottom to top = 11000000



Binary to decimal calcularion

128  64  32 16  8   4   2   1
 1     1    0    0   0   0   0   0

Now leave all the 0 values and add only the 1 values = 128 & 64 have 1's and remaining all bits are zero. So 128+64 = 192.

If any doubt, please write comment...

No comments: