Tuesday, 17 December 2013

Subnetting


Each subnet address at Cornell is assigned a "subnet mask." A subnet mask defines how many bits are used for the network address and how many for the host address.
The subnet mask address is 255.255.255.0, and it currently is the same for all LANs. If you convert the subnet mask address to its binary form, it looks like this:
Subnet mask: 11111111 11111111 11111111 00000000
If you convert our example host address (128.253.21.58) to its binary form, it looks like this:
Host address: 10000000 11111101 00010101 00111010
Together they look like this:
Subnet mask: 11111111 11111111 11111111 00000000
Host address: 10000000 11111101 00010101 00111010
The subnet mask when shown this way, as an overlay on the host address, essentially tells the computer which part of the IP address is a network address and which part is a host address. Everything in the host address that corresponds to a 1 in the subnet mask is a network address and everything in the host address that corresponds to a 0 in the subnet mask is a host address.

Sub-subnetting

Many LANs at Cornell are sub-subnetted.
Sub-subnetting is based on the same concept as subnetting. With sub-subnetting, the mask will be 255.255.255.192. In binary form, this address looks like this:
Sub-subnet mask: 11111111 11111111 11111111 11000000
When you compare the sub-subnet mask to the example IP host address (128.253.21.58), they look like this:
Sub-subnet mask: 11111111 11111111 11111111 11000000
Host address: 10000000 11111101 00010101 00111010
Like the old subnet mask, the sub-subnet mask tells the computer which part of the IP address is the network address and which part is a host address. As explained above, everything in the host address that corresponds to a "1" in the sub-subnet mask is a network address and everything in the host address that corresponds to a 0 in the sub-subnet mask is a host address.
As you can see, there are now ones (1's) in the last byte of the sub-subnet mask. (This is the part, in the subnet mask, that was all zeros (0's) and that identified the host portion of an address.) The ones (1's) that appear in this byte of the sub-subnet mask identify the first two bits of the last byte of an IP address as part of the network portion of the address. The remaining zeros (0's) identify the host portion of the address. By increasing the number of bits assigned to network addressing, the number of possible network addresses increases and the number of possible host addresses for each LAN decreases.

Consider that we are having a LAN connection of 192.168.1.0/24 network
where 24 is the CIDR


ie:
pc0 192.168.1.1
pc1 192.168.1.2
pc2 192.168.1.3
pc3 192.168.1.4
pc4 192.168.1.5

all the computers are having subnet mask 255.255.255.0
we know that all computers in the figure will  communicate with each other .
because it is having same subnet .

lets find out the basic structure of subnetting by the same figure above 
simpler way to study subnetting is that just remeber in mind the following steps 
In a subnetting we have to find out basically 4 answer in that  one will be mentioned in the question itself


1 subnetmask
2 CIDR
3 Number of networks 
4 Number of hosts(how many hosts be connected in one network)



so  here we are having the network 192.168.1.0 /24


from the qouestion 192.168.1.0 /24 the CIDR is mentioned 

yes it is 24

so the other three factor has to be found out 
1.subnet
2. Number of networks 
3 .Number of host

first step

only thing which we are having is the CIDR ==24
just find out how this 24 came in this particular IP??

that is :
11111111.11111111.11111111.00000000
    N               N              N           H 


other wise just put 24 ones and 8 zeros all togethr there has to 32 bits

from  
11111111.11111111.11111111.00000000 we could find out the subnet mask right ??count all the portion where 1 lies and exclude the values of zero's

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

which gives an output of 255.255.255.0

this is the subnet mask 

of 192.168.1.0/24 =255.255.255.0

so from here we found the first ans

1.subnet = 255.255.255.0  
2.number of network==??
3.number of hosts==??


second step

for finding the no: network we could use an equation 
ie:

2n= where n is no of ones in the host portion of  the binary bit of CIDR
11111111.11111111.1111111.00000000

Here there are only 0;s

So, number of one’s =  0
       Number of zero’s= 8 

                               
So according to the  equation
Number of network = 2n
                                = 2 0
                                = 1 network


thrid step


for finding the no: network we could use an equation


2n -2 = where n is no of zero’s in the host portion of  the binary bit of CIDR

11111111.11111111.1111111.00000000.

Here there are only 0’s


So, Number of zero’s= 8  


So according to the  equation
Number of network = 2n -2
                                = 2 8 - 2   
                                                = 256 – 2
                                = 254 Valid host




lets sum up 

1.subnet                        255.255.255.0

2.CIDR                          /24

3.Number of network    1

4.Number of hosts          254



192.168.1.0 RANGE IP ADDRESS WILL BE CAPABLE OF CONNECTING 254 COMPUTER WHEN 255.255.255.0 IS USED AS THE SUBNET



192.168.1.0---------------------àNETWORK ADDRESS
192.168.1.1
192.168.1.2           
              .3
              .4
.

.
.                                   VALID IP ADDRESS
.
.
.
.
.
192.168.1.253
192.168.1.254
192.168.1.255----------------------àBROADCAST ADDRESS