There are two types of addressing in networking: Physical addressing and logical addressing. Physical address is the MAC address (Media access control) which is fixed for a particular computer. Logical address is the IP (Internet Protocol) address. In this CCNA tutorial, you will get to know Internet Protocol version 4 (IPv4) and different network classes explained in a simple way.
What is an IP address?
Network IP address is used to identify a host (PC or any network device) in a network. IP is a 32 bit binary number divided into 4 octet groups, each octet giving a maximum of 255 in decimal. For easier addressing of these IP address octet, they are written as dotted decimals.
Must Read: [Complete Guide] Class A IP Address, Subnet Mask, and Subnetting
Note: How to find out a host IP address? You can go for the command prompt IP address check by typing ipconfig as shown in the screenshot below
Classes of IP address in networking
IP is divided into 5 classes of network addresses based on the range of first octet.
Out of the total valid addresses in each class, two dedicated IP address is reserved for;
- Network address
- Broadcast address
Public and Private IP addresses
To communicate over an internet, a device must have a public IP address which is provided by IANA (Internet Assigned Numbers Authority). Private range of IP addresses are used in an intranet (an internal network that uses internet technology). IANA also provides address for private networks in each class as follows:
Private Network Address Ranges in each Class
Before going in detail to IP classes we need to know about subnet masks and how to find subnet mask for IP addresses.
What is Subnet Mask?
If you’re a newbie to networking then the concept of Subnet mask may seem a little bit confusing, I also had a tough time struggling with subnet mask during my earlier days. By definition subnet mask is a 32 bit address used with an IP in order to identify its network and host portions.
Well, here I am going to put the simplest explanation for subnet mask. Please refer the network diagram below for better understanding. Let’s say you’ve got an IP address 220.127.116.11 with a subnet mask 255.255.255.0, it means that 200.1.1 is the network portion and last octet is the host portion. So any IP which starts with 200.1.1 goes to the same network (Network A), like 18.104.22.168, 22.214.171.124, 126.96.36.199 upto 188.8.131.52. And hence they don’t require a router to communicate with each other.
In Network A the first IP 184.108.40.206 is used to indicate network address and last IP 220.127.116.11 is used to send broadcast messages to all host computers in the network A.
Now another IP 18.104.22.168 which also has the same subnet mask cannot communicate with Network A without using a router because there’s a change in the network part. It belongs to another network with network address 22.214.171.124(Network B). Hope you got the point.
Another IP 10.1.1.2 with subnet mask 255.0.0.0 makes you understand that it belongs to the network 10.0.0.0(Network C), where only the first octet indicates network.
So subnet mask let’s you understand the IP belongs to which network. By default the following subnet masks are used.
Note: All host bits ‘0’ is a network address.
All host bits ‘1’is a broadcast address.
Now let us see network classes A B C D of internet protocol a little deeper.
Network Class Ranges with Subnet Mask
Class A Network
Class A network range starts from 126.96.36.199 to 188.8.131.52. See the screenshot for easier understanding.
Class A network subnet mask is 255.0.0.0, which means it has 8 network bits of which the first bit is fixed as ‘0’. And hence a total of 7 network bits and 24 host bits.
Hence total no. of network will be
Here 2 is subtracted as 0.0.0.0 is the default network and 127.0.0.0 is the loopback ip address used for checking proper functionality (self testing).
And total number of hosts per network will be
Here 2 is subtracted for network and broadcast address.
Class A network example:
Network address -184.108.40.206
Subnet Mask -255.0.0.0
First host IP address -220.127.116.11
Last host address -18.104.22.168
Broadcast address -22.214.171.124
Class B Network
Now class B network range starts from 126.96.36.199 to 188.8.131.52. Default subnet mask is 255.255.0.0, which means it has 16 network bits of which first two bits are fixed as ‘10’. And hence a total of 14 network bits and 16 host bits.
Let us take an example:
Network address -184.108.40.206
Subnet Mask -255.255.0.0
First host address -220.127.116.11
Last host address -18.104.22.168
Broadcast address -22.214.171.124
Class C Network
IP range starts from 192.0.0.0 to 126.96.36.199. Class C network subnet mask is 255.255.255.0 that means it has 24 network bits of which the first three bits are fixed as ‘110’. So a total of 21 network bits and 8 host bits.
Hence total no. of network will be
And the total number of hosts per network will be
Here also 2 IP’s are subtracted, one for network and other for broadcast address.
Class C network example:
Network address -192.0.0.0
Subnet Mask -255.255.255.0
First host address -192.0.0.1
Last host address -188.8.131.52
Broadcast address -184.108.40.206