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)
Contents
- Introduction to the Internet Protocol (IP)
- Basics of the Internet Protocol (IP)
- Addressing
- Packet Structure
- Routing
- Version 4 (IPv4)
- Version 6 (IPv6)
- End-to-End Connectivity
- Stateless Protocol
- Internet Governance
- IP Addressing
- Working of IP and IP Addressing
- Packetization
- Routing
- Hop-by-Hop Routing
- End-to-End Communication
- Stateless Behavior
- Classes of IP Networks
- IP Subnetting
- Structure of Subnetting
- Subnetting Example (Class C)
- Why Subnetting is Important
- IP Supernetting
- Benefits of Supernetting
- Share this:
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).
Decimal | Binary | Bits |
---|---|---|
192 | 11000000 | 8 |
168 | 10101000 | 8 |
112 | 01110000 | 8 |
100 | 01100100 | 8 |
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.
Class | Range (First Octet) | Default Mask | Use | Example |
---|---|---|---|---|
A | 1 – 126 | 255.0.0.0 | Large networks | 10.0.0.1 |
B | 128 – 191 | 255.255.0.0 | Medium networks | 172.16.0.1 |
C | 192 – 223 | 255.255.255.0 | Small networks | 192.168.1.1 |
D | 224 – 239 | – | Multicast | 224.0.0.1 |
E | 240 – 255 | – | Research | 250.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
Department | Network Address | First Host | Last Host | Broadcast |
---|---|---|---|---|
CS | 192.168.10.0 | 192.168.10.1 | 192.168.10.62 | 192.168.10.63 |
IT | 192.168.10.64 | 192.168.10.65 | 192.168.10.126 | 192.168.10.127 |
SE | 192.168.10.128 | 192.168.10.129 | 192.168.10.190 | 192.168.10.191 |
AI | 192.168.10.192 | 192.168.10.193 | 192.168.10.254 | 192.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
, and192.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