Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Structure and Types of IP Address
The Internet has become an integral part of our lives, and we rely on it for communication, entertainment, and information. Every device that connects to the internet requires an IP address.
An IP (Internet Protocol) address is a unique numerical identifier assigned to every device connected to a network that uses the Internet Protocol for communication. It consists of four numbers separated by periods (dots), such as 192.168.0.1. Each number can range from 0 to 255, giving us over 4 billion possible combinations for IPv4 addresses.
Structure of IP Address
An IP address structure varies depending on the version being used. IPv4 addresses use 32 bits grouped into four octets, while IPv6 addresses use 128 bits grouped into eight hexadecimal segments.
Binary Representation
An IPv4 address consists of 32 bits grouped into four octets (8 bits each). Each bit is either '0' or '1'. For example, the IP address 192.168.1.100 in binary is:
11000000.10101000.00000001.01100100
Decimal Representation
The decimal representation uses four numbers separated by dots, where each number ranges from 0 to 255. This format is human-readable and commonly used in network configuration.
IPv4 vs IPv6
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address Length | 32 bits | 128 bits |
| Format | 192.168.1.1 | 2001:0db8:85a3::8a2e:0370:7334 |
| Address Space | ~4.3 billion addresses | ~340 undecillion addresses |
Types of IP Addresses
IP addresses are categorized into different types based on their scope and assignment method. The main classifications include public vs private and static vs dynamic addressing.
Public IP Addresses
A public IP address is globally unique and directly accessible from the Internet. It identifies a device on the public internet and can be reached from anywhere worldwide.
Assignment: Internet Service Providers (ISPs) assign public IP addresses from their allocated address pools. These can be assigned dynamically or statically.
Example: 216.58.194.174 (Google's public IP address)
Private IP Addresses
A private IP address is used within private networks and cannot be routed over the public Internet. These addresses are reserved for internal network communication.
Reserved Ranges:
10.0.0.0to10.255.255.255(Class A)172.16.0.0to172.31.255.255(Class B)192.168.0.0to192.168.255.255(Class C)
Dynamic vs Static IP Addresses
| Type | Dynamic IP | Static IP |
|---|---|---|
| Definition | Changes each connection | Permanently assigned |
| Cost | Lower cost | Higher cost |
| Configuration | Automatic (DHCP) | Manual setup required |
| Best Use | Regular internet browsing | Servers, remote access |
Subnetting and CIDR Notation
Subnetting is the process of dividing a large network into smaller, manageable subnetworks. This improves network performance, security, and administration by creating logical network segments.
CIDR (Classless Inter-Domain Routing) notation represents IP addresses and subnet masks in a compact format using a slash followed by the number of network bits. For example, 192.168.1.0/24 indicates that the first 24 bits represent the network portion.
CIDR Examples
192.168.1.0/24 = Network: 192.168.1.0, Subnet mask: 255.255.255.0 10.0.0.0/8 = Network: 10.0.0.0, Subnet mask: 255.0.0.0 172.16.0.0/16 = Network: 172.16.0.0, Subnet mask: 255.255.0.0
Conclusion
IP addresses serve as unique identifiers for devices on networks, with IPv4 using 32-bit addresses and IPv6 providing vastly expanded 128-bit addressing. Understanding the structure, types (public/private, static/dynamic), and subnetting concepts is essential for effective network design and management in modern computing environments.
