Before the subnetting first we have to understand IPV4..

1  IPV4 have 32 bit ?

  • ipv4 have four octet
  • each octet have 8 bit 

Hierarchical Addressing Scheme

IPv4 uses hierarchical addressing scheme. An IP address, which is 32-bits in length, is divided into two or three parts as depicted:
IP Addressing A single IP address can contain information about the network and its sub-network and ultimately the host. This scheme enables the IP Address to be hierarchical where a network can have many sub-networks which in turn can have many hosts.

we can see here ?

we have 4 octet and each octet 8 bit

 8 * 4 = 32 bit

RANGE OF IP ADDRESS

The range of  IP address started from 0-255 

0-255.0-255.0-255.0-255


Binary Representation

The positional value method is the simplest form of converting binary from decimal value. IP address is 32 bit value which is divided into 4 octets. A binary octet contains 8 bits and the value of each bit can be determined by the position of bit value '1' in the octet.
Binary Representation Positional value of bits is determined by 2 raised to power (position – 1), that is the value of a bit 1 at position 6 is 2^(6-1) that is 2^5 that is 32. The total value of the octet is determined by adding up the positional value of bits. The value of 11000000 is 128+64 = 192. Some examples are shown in the table below:


For example :-

we have IP 

" 192.168.1.0 "
find out there binary conversion 

let see ..

192.
look now chart and see 192...

11000000

168.
look now chart and see 168..

10101000

1.
look now chart and see 1

00000001

0
is allways..

00000000

now finally we have solution

192.168.1.0
11000000.10101000.00000001.00000000

clear..

for try it...

172.16.2.0
200.1.1.100
16.20.100.1

Find the binary of all this and type comment box ...

Subnet Mask

The 32-bit IP address contains information about the host and its network. It is very necessary to distinguish both. For this, routers use Subnet Mask, which is as long as the size of the network address in the IP address. Subnet Mask is also 32 bits long. If the IP address in binary is ANDed with its Subnet Mask, the result yields the Network address. For example, say the IP Address is 192.168.1.152 and the Subnet Mask is 255.255.255.0 then:
IP Subnet Mask This way the Subnet Mask helps extract the Network ID and the Host from an IP Address. It can be identified now that 192.168.1.0 is the Network number and 192.168.1.152 is the host on that network.




next slide..... understanding classes...