IP Addressing
What is an IP Address?
An IP address (Internet Protocol address) is a unique identifier assigned to devices in a network to enable communication.
There are different types of IP addresses based on format, assignment, and accessibility.
IPv4 Addressing
IPv4 uses a 32-bit address format, such as 192.168.1.1. It supports up to approximately 4.3 billion unique IP addresses.
Although it's still widely used today, IPv4 has a limited number of available addresses, leading to the development of workarounds like NAT (Network Address Translation).
IPv6 Addressing
IPv6 uses a 128-bit address format, such as 2001:0db8:85a3::8a2e:0370:7334. This format allows for a virtually unlimited number of unique addresses.
IPv6 was developed to replace IPv4 and accommodate the growing number of internet-connected devices. It also includes built-in features for better routing and security.
Public vs. Private IP Addresses
Public IP Address: Assigned by an Internet Service Provider (ISP) and is accessible from outside the network. Used for services like web hosting or gaming servers.
Private IP Address: Used within a local network and not visible on the internet. Routers assign these to home and office devices.
Static vs. Dynamic IP Addresses
Static IP Address: A fixed address manually configured and doesn't change. Used for servers and remote systems.
Dynamic IP Address: Automatically assigned by a DHCP server. These addresses can change over time, suitable for most home users.
Comparison of IP Address Types
| IP Type | Definition | Common Usage |
|---|---|---|
| IPv4 | 32-bit address format | Most internet-connected devices |
| IPv6 | 128-bit address format | Future internet expansion |
| Public IP | Visible on the internet | Web hosting, online gaming |
| Private IP | Used within internal networks | Home routers, office networks |
| Static IP | Permanent and unchanging | Servers, remote access systems |
| Dynamic IP | Assigned temporarily | Most home and business networks |
The Role of Network Address Translation (NAT)
Network Address Translation (NAT) allows multiple devices within a local network (with private IP addresses) to share a single public IP address for internet access.
How it works: When a device in a private network sends a request to the internet, the NAT-enabled router replaces the private IP with the public IP. The router keeps track of which internal device made the request so it can forward the response correctly.
Scenario: A student’s laptop (192.168.0.5) at home accesses a website. The home router uses NAT to change this to the public IP (e.g. 81.2.69.142). When the website responds, the router checks its NAT table and forwards the data to the correct internal device.
Data Storage: NAT maintains a temporary table that stores: [Private IP, Port] → [Public IP, Port]. This mapping ensures data is routed to the correct internal client.
- Conserves IP addresses: Reduces the need for multiple public IP addresses.
- Enhances security: Internal network structure is hidden from the internet.
- Enables private networking: Allows devices to communicate with the internet using shared access.
Where IP Addressing is Used
| Environment | Usage | Purpose |
|---|---|---|
| Home Networks | Private IPs with NAT | Allow multiple devices to share one internet connection securely. |
| Corporate Networks | Private subnets with firewalls | Protect internal communication and restrict outside access. |
| Web Hosting | Static public IPs | Ensure servers are always reachable for users online. |
Key Takeaways
- IP addresses uniquely identify devices on a network.
- IPv4 is still widely used, but IPv6 is the future.
- Public and private IPs control accessibility, while static and dynamic IPs determine assignment method.
- NAT helps conserve IP addresses and improves security.