What is IP?
An IP (Internet Protocol) address is a unique numeric identifier assigned to each device connected to a network. It allows devices to communicate with each other and to send and receive data over the Internet or a local network.
IPv4 (Internet Protocol Version 4)
Definition:
IPv4 is the fourth version of the Internet Protocol and the first version widely used. It is the backbone of the Internet and still carries a significant portion of Internet traffic today.
Format:
- IPv4 is a 32-bit address.
- It is divided into four octets, each consisting of 8 bits.
- Written in decimal format, separated by periods (dots).
- Example:
192.168.1.1
Address Range:
- Minimum:
0.0.0.0
- Maximum:
255.255.255.255
Total Addresses:
- Total possible unique addresses: 2³² = 4,294,967,296
IPv4 Address Classes:
Class | Range (1st Octet) | Subnet Mask | Purpose | Example IP |
---|---|---|---|---|
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 | N/A (Multicast) | Multicasting | 224.0.0.1 |
E | 240 – 255 | Reserved | Research and experimental use | 250.0.0.1 |
Class A, B, and C are used for unicast addressing.
Class D is for multicast, and Class E is reserved for future or experimental use.
Types of IPv4 Addresses:
Type | Description | Example |
---|---|---|
Public IP | Routable over the internet; assigned by ISPs. | 8.8.8.8 |
Private IP | Used within private networks; not routable on internet. | 192.168.0.1 |
Static IP | Manually assigned and doesn’t change. | 203.0.113.5 |
Dynamic IP | Automatically assigned by DHCP; can change over time. | 192.168.0.100 |
Loopback IP | Used to test network configurations locally. | 127.0.0.1 |
Broadcast IP | Used to send data to all devices in a subnet. | 192.168.1.255 |
Multicast IP | Used for one-to-many communication. | 224.0.0.9 |
APIPA | Automatic Private IP Addressing when DHCP fails (169.254.x.x). | 169.254.1.1 |
IPv6 (Internet Protocol Version 6)
Definition:
IPv6 is the latest version of the Internet Protocol developed to replace IPv4 due to the exhaustion of IPv4 addresses.
Format:
- IPv6 is a 128-bit address.
- Written as eight groups of four hexadecimal digits, separated by colons (
:
). - Example:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Consecutive zeros can be compressed using
::
once in an address.
Example:2001:0db8:0000:0000:0000:0000:1428:57ab
→2001:db8::1428:57ab
Address Range:
- The number of unique addresses: 2¹²⁸ ≈ 3.4 × 10³⁸ (340 undecillion addresses)
Types of IPv6 Addresses:
Type | Description | Example |
---|---|---|
Unicast | Identifies a single device/interface. | 2001\:db8::1 |
Multicast | One-to-many communication. | ff00::/8 |
Anycast | One-to-nearest communication from multiple interfaces with the same address. | Depends on routing |
Link-local | Used for communication within the same physical or logical link. | fe80::1 |
Global Unicast | Routable and unique; similar to IPv4 public IPs. | 2000::/3 |
Loopback | Refers to the local host, similar to 127.0.0.1 in IPv4. | ::1 |
Unique Local | For local communication within sites; similar to IPv4 private addresses. | fc00::/7 |
Differences Between IPv4 and IPv6
Feature | IPv4 | IPv6 |
---|---|---|
Address Length | 32-bit | 128-bit |
Address Format | Decimal (e.g., 192.168.1.1) | Hexadecimal (e.g., 2001\:db8::1) |
Address Space | ~4.3 billion addresses | 340 undecillion addresses |
Header Size | 20 bytes | 40 bytes |
Security | Optional (IPSec optional) | Built-in (IPSec mandatory) |
NAT Support | Required in many networks | Not required (end-to-end connectivity) |
Configuration | Manual or via DHCP | Auto-configuration using SLAAC or DHCPv6 |
Broadcasting | Supported | Not supported (uses multicast instead) |
Routing Efficiency | Less efficient | More efficient due to simplified header |
Fragmentation | Routers & Hosts | Hosts only |
Checksum | Included | Not used (handled by upper layers) |
Compatibility | Widely used | Growing adoption |
Summary
Category | IPv4 | IPv6 |
---|---|---|
Bit Length | 32-bit | 128-bit |
Total Addresses | 4.3 Billion | 340 Undecillion |
Notation | Dotted Decimal | Hexadecimal with colons |
Usage | Still dominant | Gradually replacing IPv4 |
Security | Optional | Built-in |
Configuration | Manual/DHCP | Stateless or Stateful (DHCPv6) |
Broadcasting | Yes | No (uses Multicast & Anycast) |