IP Addressing and Subnetting

This is the first article of a series on IP Addressing and Subnetting, the understanding of which plays a vital role in designing and troubleshooting networks. Much of the information of this series is taken from the book CCNA Study Guide by Richard Deal. Take a moment to reinforce your understanding of IP address and MAC address before proceeding.

In this post I focus on the

  1. Role of an IP address
  2. IP address classes
  3. Network, Host & Directed broadcast address
  4. Subnet mask
  5. Private and Public IP addresses

Role of an IP Address

IP address is a type of address designed to identify the nodes on the network. It plays the role in logically locating the network and the host in it. A familiar metaphor to IP addressing is home and street address which helps the postman to deliver the post without ambiguity.

IP address as a street address
A street address like “Basavasamithi Main Road” or “Chamundeshwari Nagar, 2nd cross” identifies the branch among many in a layout. Same analogy holds good in case of IP address like “” which identifies the network segment among many in a network of networks.

IP address as a home name
A name such as “Nandagokula Nilaya” identifies the home logically. So does the IP address such as “” in case of a node in the network. There’s a nuance in the analogy of home address pertaining to IP address and MAC address. Nevertheless, IP address’ role is pretty much close to the idea of hierarchy of addressing in the postal system.

IP Address Classes

IPv4 is a 32-bit binary value, usually represented as a dot separated 4 decimal numbers (dotted-decimal notation). The value in each octet is in the range 0 – 255. The decimal value of the first octet defines the class to which the address belongs to. There are five IPv4 address classes, namely A, B, C, D & E.

IPv4 Address Classes

Network, Host & Directed broadcast address

There are three specific types of IP addresses.

  1. Network address : It is the address of the entire network segment and the first IP address in the address space of a network. The last octet of a network address is always an even number ( such as 0, 128, 192, 224 etc. ). The network address is what routers use to make routing decisions to route a packet based on its destination IP address. No host can be assigned with the network address as it belongs to all hosts of the network.
  2. Directed broadcast address : It’s the broadcast address of the network segment and serves the purpose of sending the packet to all the hosts on the segment. It’s last address in the IP address space of the network, the last octet of which is always an odd number.
  3. Host address : The addresses between the network address and the directed broadcast address are host addresses which can be assigned to various nodes of the network.

Three types of IP addresses in a network

Subnet mask

Subnet mask is also an IP address but it’s job is to mark the boundary between the network bits and the host bits. Remember the IP address serves not only to identify the network but also the host (both street no. and home no.). In a subnet mask address,

  • Binary 1 represents the network bit.
  • Binary 0 represents the host bit.

Since Class A address’ first byte is network and last three bytes are host, it’s default subnet mask is Similarly for Class B and for Class C. Surprisingly the mask represents the given IP as the host address. Subnet mask determines the no. of networks and the hosts per network.

  • No. of networks = 2^n, where n is the no. of network bits or ones in the mask
  • No. of hosts = 2^h – 2, where h is the no. of host bits or zeroes in the mask

Classes and default subnet mask

Private and Public IP addresses

Private IP addresses are those that can be used on internal networks such as LANs or home networks without paying the ISP (Internet Service Provider) such as BSNL, Airtel, or Hathway. Three specific ranges of IP address in each class are reserved for private use. ISP routers by default drop any packet having a private IP address as its destination. ( It’s possible to route the private IP address packets across the Internet using SSL VPN.)

Private IP Addresses

Excluding these private IP addresses every other IP address is public and requires to pay to ISP to use them.

About Deepak Devanand

Seeker of knowledge
This entry was posted in IP Addressing and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s