IPv4 address

Length of ipv4 is 32 bits

It has 4 octets of 8 bits each

In decimal number the range of each octet is 0 to 255

0.0.0.0 means no IP address or the machine is not on network

255.255.255.255 is used for broadcasting

There are 5 different classes of IPv4

Class Name First Octet Range Network and Host ID Default Subnet Mask No. Of Network No. of Computers No. of Valid Computers
A 0-126 N.H.H.H 255.0.0.0 126 16777216 16777214
B 128-191 N.N.H.H 255.255.0.0 16382 65536 65534
C 192-223 N.N.N.H 255.255.255.0 2097150 256 254
D 224-239   Reserved for Multicasting
E 240-254   Experimental; used for research

 Where N stands for network and H stands for Host(Computer)

 255 represent Network

 0 represent Host or Computer

 Private IP addresses 

Class Private Networks Subnet Mask Address Range
A 10.0.0.0 255.0.0.0 10.0.0.0-10.255.255.255
B 172.16.0.0-172.31.0.0 255.240.0.0 172.16.0.0-172.31.255.255
C 192.168.0.0 255.255.255.0 192.168.0.0-192.168.255.255

 

classdiagram

IP-Header-v4