An IP Address (Internet Protocol Address) is a unique identifier assigned to each device connected to a computer network that uses the Internet Protocol for communication. It serves two main purposes:
- Host or network interface identification
- Location addressing
When a device connects to the internet (like your computer, smartphone, or router), it is assigned an IP address that allows it to send and receive data.
Types of IP Addresses
IP addresses are mainly categorized into two major types based on the version of the IP:
- IPv4 (Internet Protocol version 4)
- IPv6 (Internet Protocol version 6)
Each version has its own formats and classifications.
1. IPv4 (Internet Protocol Version 4)
- IPv4 is the most commonly used IP address format.
- It is a 32-bit address, divided into four octets, each ranging from 0 to 255.
- Example:
192.168.1.1
IPv4 Address Classes
IPv4 addresses are divided into five classes (A to E):
Class | Starting Bit | Range (1st Octet) | Default Subnet Mask | Purpose | Example |
---|---|---|---|---|---|
A | 0 | 1 – 126 | 255.0.0.0 | Large networks | 10.0.0.1 |
B | 10 | 128 – 191 | 255.255.0.0 | Medium networks | 172.16.0.1 |
C | 110 | 192 – 223 | 255.255.255.0 | Small networks | 192.168.1.1 |
D | 1110 | 224 – 239 | N/A | Multicasting | 224.0.0.1 |
E | 1111 | 240 – 255 | N/A | Research & Reserved | 250.1.1.1 |
Note: IP address ranges
127.x.x.x
are reserved for loopback (used for testing).
IPv4 Address Types
Type | Description | Example |
---|---|---|
Public IP | Routable on the internet. Assigned by ISP. | 8.8.8.8 |
Private IP | Not routable on the internet. Used within private networks. | 192.168.1.10 |
Static IP | Manually configured. Does not change. | 203.0.113.1 |
Dynamic IP | Assigned automatically by DHCP. May change over time. | 192.168.0.2 |
Loopback IP | Used to test network configuration of local machine. | 127.0.0.1 |
APIPA | Assigned when DHCP fails. Range: 169.254.0.1 – 169.254.255.254 | 169.254.1.1 |
Broadcast IP | Used to send data to all hosts in a subnet. | 192.168.1.255 |
Multicast IP | Used for one-to-many communication. | 224.0.0.0+ |
2. IPv6 (Internet Protocol Version 6)
- IPv6 was introduced to overcome the shortage of IPv4 addresses.
- It is a 128-bit address, written in eight groups of four hexadecimal digits.
- Example:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
IPv6 Address Types
Type | Description | Example |
---|---|---|
Unicast | Identifies a single interface. | 2001\:db8::1 |
Multicast | One-to-many communication (similar to IPv4 multicast). | ff00::/8 |
Anycast | Assigned to multiple interfaces. Packet delivered to the nearest interface. | Depends on topology |
Link-local | Used for communication within a local subnet. | fe80::1 |
Global Unicast | Routable on the global internet. Similar to public IPv4 addresses. | 2000::/3 |
Loopback | Used by a host to send packets to itself. | ::1 |
Unique local | Used within a local site (like private IPs in IPv4). | fc00::/7 |
Difference Between IPv4 and IPv6
Feature | IPv4 | IPv6 |
---|---|---|
Address Length | 32-bit | 128-bit |
Format | Decimal, separated by dots | Hexadecimal, separated by colons |
Example | 192.168.0.1 | 2001:0db8:85a3::8a2e:0370:7334 |
Address Space | ~4.3 billion addresses | 340 undecillion addresses |
Header Size | 20 bytes | 40 bytes |
Security | Optional | Mandatory (IPSec) |
NAT Requirement | Required | Not required |
Summary
Category | Types/Classes |
---|---|
IP Versions | IPv4, IPv6 |
IPv4 Classes | A, B, C, D, E |
IP Types | Public, Private, Static, Dynamic, Loopback, etc. |
IPv6 Types | Unicast, Multicast, Anycast, Link-local, etc. |