Basics of Internet Protocol (IP) AND IP Addressing

Basics of Internet Protocol (IP) AND IP Addressing

The Internet Protocol (IP) is a fundamental set of rules and conventions that define how data is transmitted and routed over the Internet. It is the backbone of modern networking, ensuring that every piece of data finds its correct destination, whether between two computers in a local lab or between continents.

Visit the detailed course on Computer Networks for more tutorials and visual explanations.

Introduction to the Internet Protocol (IP)

The Internet Protocol provides the addressing and routing system that connects billions of devices globally. It defines the structure of data packets, how these packets are addressed, and how they move from one device to another. Think of IP as the digital postal system. It adds sender and receiver addresses to every data packet and ensures that each packet reaches the right destination.

Basics of the Internet Protocol (IP)

Here are some essential terminologies and concepts related to IP.

Addressing

IP assigns a unique numerical address to each device connected to the Internet. These are called IP addresses, and they serve as the logical identity of a device.

Example IPv4: 192.168.1.1
Example IPv6: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses to support a vastly larger number of devices.

Packet Structure

Before transmission, data is divided into small packets. Each packet includes the source IP address, the destination IP address, and the actual data (payload). This helps routers and switches determine where to send each packet next.

Example of packet components:
| Source: 192.168.1.10 | Destination: 172.217.0.46 | Data: <content> |

Routing

Routers read the destination IP address in each packet and use routing tables to decide the best path for forwarding it. Packets may pass through multiple routers before reaching their final destination.

Version 4 (IPv4)

IPv4 has been the standard for decades, offering around 4.3 billion unique addresses. However, due to the massive growth of connected devices, the IPv4 pool is not able to address.

Example IPv4 Address: 192.168.0.1

Version 6 (IPv6)

IPv6 was introduced to overcome IPv4 limitations. It provides trillions of unique addresses, supports efficient routing, and ensures every IoT device can have a unique identifier.

Example IPv6 Address: 2001:0db8:85a3::8a2e:0370:7334

End-to-End Connectivity

IP ensures that packets can travel from any source to any destination across multiple networks — a concept known as end-to-end communication. However, IP does not guarantee reliability; it simply forwards packets.

Stateless Protocol

IP is a stateless protocol. It treats each packet independently. If one packet fails to arrive, IP itself does not retry. Higher-layer protocols like TCP handle reliability and sequencing.

Internet Governance

IP address allocation and management are overseen by:

  • IANA – Internet Assigned Numbers Authority
  • RIRs – Regional Internet Registries
  • LIRs – Local Internet Registries

They ensure that IP addresses are unique and fairly distributed globally.

IP Addressing

One of IP’s most important roles is addressing, assigning logical addresses to devices so that data can find its destination.

Each IPv4 address consists of 32 bits, usually represented in dotted-decimal format and divided into four octets (8 bits each).

Example IP Address: 192.168.112.100
Binary Form: 11000000.10101000.01110000.01100100

Each number between dots represents 8 bits (one octet).

DecimalBinaryBits
192110000008
168101010008
112011100008
100011001008

Every time you connect to the Internet, your device receives one such logical address that uniquely identifies it within the global network.

In short, IP addressing gives every device a digital “house number.” Without it, routers wouldn’t know where to send your packets.

Working of IP and IP Addressing

Packetization

Before data travels across the Internet, it is divided into smaller packets. Each packet carries both the source and destination IP address.

Example:
Source: 192.168.1.2 → Destination: 172.217.0.46

Routing

Routers analyze each packet’s destination IP address and choose the best next hop. They rely on routing tables and network topology information to make decisions.

Hop-by-Hop Routing

Packets often pass through several routers. Each router reads the destination IP, forwards the packet to the next router, and so on, until it reaches the destination.

End-to-End Communication

Even though data may pass through many routers, the source and destination IPs remain the same throughout the journey. IP ensures that packets eventually reach the right host.

Stateless Behavior

Each packet travels independently. IP does not remember previous connections. That’s why it’s called a connectionless or stateless protocol.

Classes of IP Networks

Historically, IPv4 addresses were grouped into five classes (A to E) for different network sizes.

ClassRange (First Octet)Default MaskUseExample
A1 – 126255.0.0.0Large networks10.0.0.1
B128 – 191255.255.0.0Medium networks172.16.0.1
C192 – 223255.255.255.0Small networks192.168.1.1
D224 – 239Multicast224.0.0.1
E240 – 255Research250.1.1.1

Example of private ranges:

  • Class A: 10.0.0.0/8
  • Class B: 172.16.0.0/12
  • Class C: 192.168.0.0/16

Modern networks now use Classless Inter-Domain Routing (CIDR), which allows flexible subnetting instead of fixed classes.

IP Subnetting

Subnetting divides one large network into multiple smaller subnetworks for better organization and address utilization.

Structure of Subnetting

An IP address has two parts:

  • Network part → identifies the network
  • Host part → identifies a specific device

The subnet mask defines how many bits belong to the network and host.

Example:
IP: 192.168.10.0
Subnet Mask: 255.255.255.0/24 in CIDR notation

This means 24 bits are for the network and 8 bits for the hosts.

Subnetting Example (Class C)

Let’s divide a Class C network into four subnets for different departments.

Base Network: 192.168.10.0/24

Departments: Computer Science (CS), IT, Software Engineering (SE), and Artificial Intelligence (AI).

Step 1 – Decide how many bits to borrow
We need 4 subnets → 2² = 4
So, we borrow 2 bits from the host portion.
New subnet mask = 255.255.255.192/26

Step 2 – Find the subnet increment
Increment = 256 – 192 = 64

Step 3 – List of Subnets

DepartmentNetwork AddressFirst HostLast HostBroadcast
CS192.168.10.0192.168.10.1192.168.10.62192.168.10.63
IT192.168.10.64192.168.10.65192.168.10.126192.168.10.127
SE192.168.10.128192.168.10.129192.168.10.190192.168.10.191
AI192.168.10.192192.168.10.193192.168.10.254192.168.10.255

By subnetting, we divided one large network into four smaller networks, each with 62 usable hosts. This structure improves efficiency, management, and security.

Why Subnetting is Important

  • Efficient use of IP addresses
  • Reduced network congestion
  • Better organization of departments
  • Easier management and improved security

IP Supernetting

While subnetting divides a network into smaller parts, supernetting (or route aggregation) combines several smaller networks into a larger one. This helps Internet Service Providers (ISPs) and large organizations simplify routing tables and optimize address allocation.

Example: combining
192.168.10.0/26, 192.168.10.64/26, 192.168.10.128/26, and 192.168.10.192/26
results in one supernet:
192.168.10.0/24

Benefits of Supernetting

  • Reduces routing table entries
  • Simplifies routing decisions
  • Improves network efficiency
  • Optimizes address space utilization

Leave a Reply

Your email address will not be published. Required fields are marked *