An IP Address (Internet Protocol Address) is a unique numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. It serves two main purposes:
- Identifying a device on the network.
- Locating the device to enable communication with other devices over a network like the Internet.

Components of an IP Address
- Network Portion: Identifies the network to which the device belongs.
- Host Portion: Identifies the individual device on the network.
- Subnet Mask (for IPv4): Defines which part of the IP is network and which part is host.
Example: IP 192.168.1.10 with subnet mask 255.255.255.0
Network ID: 192.168.1.0
Host ID: 10
Subnetting
Subnetting is the process of logically dividing a single large IP network into smaller, distinct sub-networks (subnets) at Network Layer of the OSI model. It works by borrowing bits from the host portion of an IP address and reallocating them to the network portion, a boundary defined using a subnet mask or CIDR notation (such as /24).
Types of IP Address
IP addresses can be classified in several ways based on their structure, the type of network they are used in, and how they are assigned to devices.
Classes of IPv4 Address
IPv4 addresses were traditionally divided into five classes under classful addressing. For easier management and assignment IP addresses are organized in numeric order and divided into the following 5 classes:
| IP Class | Address Range | Maximum number of networks |
|---|---|---|
| Class A | 1-126 | 126 (27-2) |
| Class B | 128-191 | 16384 |
| Class C | 192-223 | 2097152 |
| Class D | 224-239 | Reserve for multitasking |
| Class E | 240-255 | Reserved for Research and development |
How Do IP Addresses Work?
An IP address (Internet Protocol address) serves as a unique identifier for every device connected to a network, enabling communication and data exchange across local and global networks. The Internet Protocol governs how data is packaged, addressed, transmitted, routed, and received.
1. Unique Identification: Every device-such as a computer, smartphone, or server-connected to a network is assigned an IP address.
- This address acts like a digital home address, allowing the device to be uniquely identified within the network.
- Without an IP address, a device cannot send or receive data on the network.
2. Communication Protocol: The Internet Protocol (IP) defines how data is transmitted between devices. When data is sent over a network, it is divided into smaller units called packets. Each packet contains:
- The source IP address (the sender’s device)
- The destination IP address (the receiver’s device)
Note: Routers and switches use these addresses to ensure that each packet reaches its correct destination.
3. Data Routing: When a device sends data to another device on the internet, the following steps occur:
- The data is divided into packets.
- Each packet includes the IP address of its destination.
- Routers examine the destination IP on each packet and determine the best route to forward it.
- Routers communicate with each other to update routing tables and maintain the most efficient paths for data transmission.
4. LAN and WAN Communication
- Local Area Network (LAN): A Local area network (LAN) is a network that is used to link devices in a single office, building, or campus of up to a short distance.
- Wide Area Network (WAN): When communicating across different networks, data travels through multiple routers over the internet.
5. Network Address Translation (NAT): NAT (Network Address Translation) allows multiple devices in a private network to share a single public IP address when accessing the internet.
Real World Scenario: Sending an Email from New York to Tokyo
Let's explore how IP addresses work through a real-world example that involves sending an email from one person to another across the globe:
Step 1: Assigning IP Addresses
- Alice in New York has a laptop with a private IP, e.g., 192.168.1.5, assigned by her home router.
- Bob in Tokyo has a computer with a private IP, e.g., 192.168.2.4, assigned by his office router
Step 2: Connecting to the Internet
- Both routers have public IP addresses provided by their ISPs (Internet Service Providers).
- These public IPs are used for all communications over the internet.
Step 3: Sending the Email
- Alice composes an email and clicks "Send."
- Her email client (e.g., Gmail or Outlook) converts the email into data packets that contain: Source IP -> Alice’s public IP (her router’s address) & Destination IP -> Bob’s mail server’s public IP
Step 4: Routing the Packets
- The packets move from Alice’s laptop to her router.
- The router detects that the destination IP is external and forwards the packets to Alice’s ISP.
- The ISP’s routers analyze the destination IP and determine the optimal route.
- Packets travel across several intermediate routers -perhaps through data centers in North America, Europe, and Asia -before reaching Japan.
Step 5: Reaching Bob
- The packets arrive at Bob’s email server’s ISP in Tokyo.
- The server’s router forwards them to Bob’s email server.
- The server reassembles the packets into the original email message.
Step 6: Email Retrieval
- Bob’s computer requests the email from the server using his local IP.
- The server sends the email to Bob’s device, completing the communication.
How to Look Up IP Addresses?
1. In Windows
- Open the Command Prompt.
- Type ipconfig and press Enter.
- Look for your IP under your network connection.
2. On Mac
- Open System Preferences > Network.
- Select your active connection.
- You’ll see your IP address in the connection details.
3. On iPhone
- Go to Settings > Wi-Fi.
- Tap the (i) icon next to your network.
- Find your IP under "IP Address."
IP Address Security Threats
IP addresses are essential for connecting devices on the internet, but they also come with various security risks. Understanding these threats can help you protect your network and personal information more effectively. Common IP address security threats are:
- IP Spoofing: Attackers fake a trusted IP address to bypass security and gain unauthorized access.
- DDoS Attacks: Multiple infected systems flood a target with traffic, causing slowdowns or crashes.
- Man-in-the-Middle (MitM): Hackers intercept or alter data between two parties to steal sensitive information.
- Port Scanning: Attackers scan for open ports to find vulnerabilities and exploit system weaknesses.
How to Protect and Hide Your IP Address
- Use a VPN (Virtual Private Network): A VPN hides your real IP address by routing your internet traffic through a secure VPN server. This masks your identity, encrypts your data, and prevents websites or attackers from tracking your location or online activities.
- Use a Proxy Server: A proxy server acts as an intermediary between your device and the internet. When you send a request, it goes through the proxy, which substitutes its own IP address for yours, helping to conceal your real identity.
- Use the Tor Browser: The Tor network routes your data through multiple volunteer-run servers (nodes), encrypting it at every layer. This makes it extremely difficult for anyone to trace your IP address or monitor your browsing activity.
- Enable a Firewall: A firewall monitors and filters incoming and outgoing network traffic. It blocks suspicious or unauthorized connections, reducing the risk of hackers targeting your device via your IP address.