IP addresses function as unique digital identifiers that allow devices to locate and communicate with each other across a network. Every device connected to a network must have an IP address to send or receive data packets.
An IP address acts like a mailing address for your computer or smartphone. When you request a website, the network uses the destination IP address to route the data through various routers and switches until it reaches the correct hardware. Without these addresses, the internet would have no way of knowing which device requested specific information or where to send the response.
IP Addresses Identify Both Network and Host
An IP address is not a single random number but a combination of two distinct parts: the network ID and the host ID. The network ID identifies the specific subnet or group of devices, while the host ID identifies the unique device within that specific group.
This structure allows routers to move data efficiently. Instead of keeping a list of every single device on earth, a router only needs to know how to get data to the correct network. Once the data arrives at the local network, the local router uses the host ID to deliver the packet to the specific laptop or printer.
The boundary between the network and host portions is determined by a subnet mask. A subnet mask is a secondary sequence of numbers that tells the device which part of the IP address is the network and which is the host. For example, a common home network mask is 255.255.255.0, which indicates that the first three segments of the IP address represent the network and the final segment represents the individual device.
IPv4 and IPv6 Address Formats
Most people are familiar with IPv4, which uses a 32-bit numeric address. These addresses appear as four numbers separated by periods, such as 192.168.1.1. Each number in an IPv4 address can range from 0 to 255.
Because IPv4 only allows for about 4.3 billion unique addresses, the world has run out of available space for new devices. This led to the creation of IPv6, which uses a 128-bit address. IPv6 addresses are written as eight groups of four hexadecimal digits separated by colons, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
IPv6 provides a virtually unlimited number of addresses, ensuring that every smart bulb, sensor, and smartphone can have its own unique global identifier. Most modern operating systems support both versions simultaneously, allowing a device to communicate over IPv4 or IPv6 depending on what the destination server supports.
Public and Private IP Addressing
A common misconception is that every device in a home has its own unique address visible to the entire internet. In reality, most home devices use private IP addresses that are only visible within the local network.
Your internet service provider assigns one single public IP address to your router. This public address is the one the rest of the world sees. Your router then assigns private IP addresses (typically starting with 192.168.x.x or 10.x.x.x) to your phone, laptop, and smart TV.
To allow these private devices to access the internet, the router uses a process called Network Address Translation (NAT). When your laptop requests a webpage, the router replaces the laptop's private IP with the router's public IP and sends the request. When the response returns, the router remembers which private device made the request and forwards the data accordingly.
A practical rule of thumb for troubleshooting is that if you can ping a device using a 192.168.x.x address, you are communicating within your own local network; if you are using any other range, you are likely communicating across the public internet.
Static Versus Dynamic IP Assignment
IP addresses are assigned in two different ways: statically or dynamically. A dynamic IP address is temporary and is assigned by a server using the Dynamic Host Configuration Protocol (DHCP). This is the standard for most consumer devices because it allows the network to recycle addresses when devices disconnect.
A static IP address is manually assigned to a device and never changes. Static addresses are used for servers, printers, and network storage devices. If a printer's IP address changed every time it restarted, your computer would lose the connection and you would have to re-add the printer to your system.
When to Use Static IPs
You should use a static IP for any device that provides a service to other devices. For example, if you run a home media server or a web server, a static IP ensures that other users can always find the server at the same numeric location.
For standard workstations, smartphones, and tablets, dynamic IPs are preferred. They require zero configuration from the user and prevent IP conflicts, which occur when two devices are accidentally assigned the same address on the same network.
DNS Translates Names to IP Addresses
Computers communicate using numbers, but humans prefer words. The Domain Name System (DNS) acts as the phonebook of the internet, translating human-readable domain names into IP addresses.
When you type a URL into your browser, your computer sends a request to a DNS resolver. The resolver looks up the domain name and returns the corresponding IP address. Only after the DNS lookup is complete does your browser attempt to connect to the server's IP address to download the page content.
If you can access a website by typing its IP address directly into the browser but cannot access it by typing the domain name, the problem is likely a DNS failure rather than a connection failure. You can check your current DNS settings in your operating system's network settings, typically found under Network > Advanced > DNS.
Checking Your IP Address
To find your public IP address, you can use any search engine by typing "what is my IP". This tells you the address assigned to your router by your internet provider.
To find your private local IP address, you can check your device settings. On Windows, you can open the command prompt and type ipconfig. On macOS or Linux, you can open the terminal and type ifconfig or ip addr. Labels and command outputs may differ slightly depending on the operating system version.
On a mobile device, you can typically find this information by navigating to Settings > Wi-Fi and tapping on the name of the network you are currently connected to. This will display the local IP address assigned to that specific device by the router.