IP Addresses Explained
Every device on a computer network needs a way to be identified and reached — just as every house needs a street address to receive mail. In the world of networking, this address is called an IP address. Whether you are browsing a website, sending an email, or streaming a video, IP addresses are working behind the scenes to ensure your data reaches the correct destination. In this article, we will explain what IP addresses are, how they are formatted, the difference between IPv4 and IPv6, the distinction between public and private addresses, and how your devices get their IP addresses — all in clear, accessible language.
What is an IP Address?
An IP address (Internet Protocol address) is a unique numerical label assigned to every device connected to a computer network that uses the Internet Protocol for communication. Think of it as your device's identity card on the network. Just as your home address tells the postal service where to deliver your letters, an IP address tells the network where to send your data.
An IP address serves two primary functions:
- Identification: It uniquely identifies a device on the network. No two devices on the same network should have the same IP address at the same time.
- Location Addressing: It provides a way to locate the device within the network topology, so routers know where to forward data.
Without IP addresses, the internet could not function. Every website you visit, every email you send, every video you stream — all of it relies on IP addresses to route data from the source to the destination and back.
IPv4: The Original Format
The most widely used version of IP is IPv4 (Internet Protocol version 4), which has been the backbone of the internet since the early 1980s. An IPv4 address is a 32-bit number, which means it is composed of 32 binary digits (ones and zeros). To make these addresses human-readable, they are expressed in dotted decimal notation.
Format and Structure
An IPv4 address is divided into four octets (groups of 8 bits), separated by periods. Each octet can range from 0 to 255. For example:
192.168.1.1— a common router address8.8.8.8— Google's public DNS server172.217.14.206— one of Google's web servers
Each octet represents 8 bits of the 32-bit address. The first octet (192 in the first example) represents the first 8 binary digits, the second octet (168) represents the next 8, and so on. The full binary representation of 192.168.1.1 is:
11000000.10101000.00000001.00000001
While you do not need to think in binary to use IP addresses, understanding that each address is ultimately a string of 32 ones and zeros helps explain why the numbers range from 0 to 255 (28 = 256 possible values per octet).
IPv4 Address Space
With 32 bits, IPv4 can theoretically support 232 = approximately 4.3 billion unique addresses. In the early days of the internet, this seemed like more than enough. However, with the explosion of internet-connected devices — computers, smartphones, tablets, IoT devices, servers — the available pool of IPv4 addresses has been exhausted. All 4.3 billion addresses have been allocated. This is one of the primary reasons IPv6 was developed.
IPv6: The Next Generation
IPv6 (Internet Protocol version 6) is the successor to IPv4, designed to solve the address exhaustion problem. An IPv6 address is a 128-bit number, which provides a vastly larger address space: 2128 = approximately 340 undecillion addresses (that is 340 followed by 36 zeros). This is enough to assign trillions of addresses to every person on Earth and still have plenty left over.
Format and Structure
An IPv6 address is expressed in hexadecimal notation (using digits 0–9 and letters a–f) and is divided into eight groups of four hexadecimal digits, separated by colons. For example:
2001:0db8:85a3:0000:0000:8a2e:0370:7334fe80::1— a link-local address (the::represents consecutive groups of zeros that have been omitted for brevity)
IPv6 addresses are much longer than IPv4 addresses, but shorthand rules make them more manageable:
- Leading zeros in a group can be omitted:
0db8becomesdb8. - One or more consecutive groups of all zeros can be replaced with
::(this can only be done once in an address).
Why IPv6 Matters
- Virtually Unlimited Addresses: The massive address space ensures we will never run out of IP addresses again.
- Simplified Header: IPv6 has a streamlined packet header that allows routers to process packets more efficiently.
- Built-in Security: IPv6 was designed with IPsec (a suite of security protocols) as a standard feature, providing encryption and authentication at the network level.
- No Need for NAT: With IPv4, Network Address Translation (NAT) is used to allow multiple devices to share a single public IP address. With IPv6, every device can have its own unique public address, eliminating the need for NAT and simplifying network architecture.
Despite its advantages, IPv6 adoption has been gradual. As of the mid-2020s, approximately 40–45% of internet traffic uses IPv6. Most modern devices and operating systems support both IPv4 and IPv6 simultaneously, a configuration called dual-stack.
Public vs. Private IP Addresses
Not all IP addresses are equal. One of the most important distinctions in networking is between public and private IP addresses.
Public IP Addresses
A public IP address is an address that is accessible from the internet. It is unique across the entire internet — no two devices on the public internet can have the same public IP address at the same time. When you visit a website, your request travels from your device's public IP address to the website's server's public IP address.
Your public IP address is assigned to you by your Internet Service Provider (ISP). It is the address that the outside world sees when your devices communicate with the internet. You can find your public IP address by visiting a site like showipaddress.info.
Private IP Addresses
A private IP address is used within a local network (such as your home or office LAN) and is not directly accessible from the internet. Private IP addresses allow devices within a local network to communicate with each other without consuming a public IP address for each device.
The Internet Assigned Numbers Authority (IANA) has reserved the following ranges for private use:
- 10.0.0.0 – 10.255.255.255 (10.x.x.x): Provides over 16 million private addresses. Commonly used in large corporate networks.
- 172.16.0.0 – 172.31.255.255 (172.16.x.x – 172.31.x.x): Provides about 1 million private addresses. Used in medium to large networks.
- 192.168.0.0 – 192.168.255.255 (192.168.x.x): Provides about 65,000 private addresses. The most common range for home networks.
How Public and Private IPs Work Together
In a typical home network, your router has one public IP address (assigned by your ISP) and assigns private IP addresses to each device in your home (your laptop might be 192.168.1.10, your phone might be 192.168.1.11, and so on). When your laptop sends a request to a website, the router uses a technique called Network Address Translation (NAT) to replace the private IP address with the public IP address. When the response comes back, the router reverses the process, forwarding the data to the correct private IP address.
This system allows hundreds of devices in your home to share a single public IP address, which is essential because public IPv4 addresses are scarce. NAT is one of the key technologies that has allowed the internet to continue growing despite the exhaustion of the IPv4 address space.
Static vs. Dynamic IP Addresses
IP addresses can be assigned in two ways: statically (permanently) or dynamically (temporarily).
Static IP Addresses
A static IP address is manually configured on a device and does not change. Static IPs are typically used for:
- Servers: Web servers, email servers, and DNS servers need consistent addresses so that clients can always find them. If a web server's IP address changed frequently, DNS records would need constant updating.
- Network Equipment: Routers and switches often have static IPs so administrators can reliably access their management interfaces.
- Printers and Shared Resources: In an office, a shared printer may be assigned a static IP so that all employees can configure their computers to connect to the same address.
Dynamic IP Addresses
A dynamic IP address is assigned automatically by a DHCP server (Dynamic Host Configuration Protocol) each time a device connects to the network. Most devices on your home network — laptops, phones, tablets, smart TVs — use dynamic IP addresses.
When your phone connects to your home Wi-Fi, it sends a DHCP request. The router's built-in DHCP server responds by assigning an available IP address from its pool (for example, 192.168.1.15). This address is "leased" to the device for a limited time. When the lease expires, the device can request to renew the same address or be assigned a different one.
Why Use Dynamic IPs?
- Ease of Management: You do not need to manually configure IP addresses on each device. Just connect, and the network handles it automatically.
- Efficient Use of Addresses: If a device disconnects, its IP address is returned to the pool and can be assigned to another device. This is especially important for ISPs, which have a limited number of public IP addresses.
- Flexibility: Devices can move between networks (home, office, coffee shop) and automatically receive appropriate IP addresses without any manual configuration.
How Your IP Address is Assigned
The process of getting an IP address involves multiple layers:
At the ISP Level
Your ISP assigns your router a public IP address. This may be a dynamic address (which can change periodically, such as when you restart your router) or a static address (which remains constant). Most residential internet connections use dynamic public IPs. Business connections often include static public IPs for an additional fee.
At the Router Level
Your router acts as a DHCP server for your local network. When a device connects, the router assigns it a private IP address from its configured range (typically 192.168.0.x or 192.168.1.x). The router also provides the device with other network configuration information, including the subnet mask, default gateway (the router's own IP address), and DNS server addresses.
At the Device Level
Your device's operating system contains a DHCP client that automatically requests and receives an IP address when it connects to a network. You can also manually configure a static IP address on your device if needed, but this is uncommon for typical home users.
How to Find Your IP Address
Finding your IP address is straightforward:
Finding Your Private (Local) IP Address
- Windows: Open Command Prompt and type
ipconfig. Look for the "IPv4 Address" under your active network adapter. - macOS: Open System Preferences > Network, or open Terminal and type
ifconfigoripconfig getifaddr en0. - Linux: Open a terminal and type
ip addrorifconfig. - Smartphones: Go to Settings > Wi-Fi, tap on your connected network, and look for the IP address field.
Finding Your Public IP Address
Your public IP address is the address the internet sees. The easiest way to find it is to visit a website like showipaddress.info, which will display your public IP address instantly. You can also search "what is my IP" in any search engine.
IPv4 vs. IPv6: A Quick Comparison
- Address Length: IPv4 uses 32 bits; IPv6 uses 128 bits.
- Address Format: IPv4 uses dotted decimal (e.g., 192.168.1.1); IPv6 uses colon-separated hexadecimal (e.g., 2001:db8::1).
- Address Space: IPv4 provides ~4.3 billion addresses; IPv6 provides ~340 undecillion addresses.
- NAT: IPv4 commonly uses NAT to conserve addresses; IPv6 eliminates the need for NAT.
- Security: IPv4 security is optional; IPv6 includes IPsec as a standard feature.
- Adoption: IPv4 is universal; IPv6 adoption is growing but not yet complete.
The Importance of Understanding IP Addresses
IP addresses are the foundation of all network communication. Understanding them helps you:
- Troubleshoot Network Problems: If you cannot connect to the internet or a local device, checking IP addresses is often the first diagnostic step.
- Set Up Home Networks: Configuring devices, setting up port forwarding, or assigning static IPs to servers requires understanding how IP addressing works.
- Protect Your Privacy: Your public IP address can reveal your approximate geographic location and ISP. Understanding this helps you make informed decisions about using VPNs and other privacy tools.
- Understand the Internet: Every time you visit a website, your device performs a DNS lookup to find the server's IP address, then establishes a connection to that address. Understanding this process demystifies how the internet works.
Key Takeaways
- An IP address is a unique numerical label that identifies a device on a network, much like a street address identifies a house.
- IPv4 uses 32-bit addresses in dotted decimal format (e.g., 192.168.1.1) and supports ~4.3 billion unique addresses, which have been exhausted.
- IPv6 uses 128-bit addresses in hexadecimal format (e.g., 2001:db8::1) and provides a virtually unlimited address space.
- Public IP addresses are unique across the internet and are assigned by your ISP. Private IP addresses are used within local networks and are not accessible from the internet.
- The reserved private IP ranges are: 10.x.x.x, 172.16–31.x.x, and 192.168.x.x.
- Static IPs are permanent and used for servers. Dynamic IPs are temporary and assigned automatically by DHCP.
- Your router gets a public IP from your ISP and assigns private IPs to your devices via DHCP.
- You can find your private IP using system commands and your public IP by visiting sites like showipaddress.info.