- An IP address uniquely identifies each device or network and allows data to be sent and received correctly.
- There are public and private IPs, static and dynamic IPs, as well as different reserved ranges and classes within IPv4.
- IPv6 greatly expands the number of available addresses and improves the performance and efficiency of routing.
- Protecting and, when appropriate, hiding your IP address with measures such as VPN or good network configuration is key to security and privacy.
The internet has become an integral part of our daily lives : we work, study, watch TV series, and even control our home lighting through the network. But despite being connected all day, many people aren't entirely clear on what an IP address actually is or what role it plays in all of this.
Understanding what an IP address is and what it's used for isn't just technical "geekiness": it helps you troubleshoot connection problems, improve security, set up a website, or simply know what information you're exposing when you browse the internet. Let's take a look at it calmly, in everyday language, but without sacrificing technical rigor.
What is an IP address and how is it represented?
An IP address is a unique numerical identifier assigned to each device connected to a network, whether it's a local network or the internet. IP stands for "Internet Protocol," which is the set of rules that defines how data travels between computers, mobile phones, routers, servers, and any other connected device.
Imagine your IP address as the digital postal address of your device: without this "label," there would be no way to know where to deliver the data you request (a website, a video, an email, etc.) or where it was sent from. Thanks to the IP address, the information knows which device to arrive at and which device it originated from.
In the most classic version, IPv4 , an IP address is written as a string of four numbers separated by periods, for example: 192.168.1.38. Each of those numbers can range from 0 to 255, so the total possible range goes from 0.0.0.0 to 255.255.255.255. Internally, they are 32 bits divided into four “octets”.
In the modern version, IPv6 , the format changes completely: instead of decimal numbers, hexadecimal numbers (0-9 and AF) are used, grouped into eight blocks separated by two colons, for example: 2001:0db8:0001:0b07:00CC:0ab9:C0A8:0102. Here we are talking about 128 bits instead of 32, which allows for a virtually inexhaustible number of addresses.
Who assigns IP addresses and how are they organized?
IP addresses are not assigned randomly . There is an international organization called IANA (Internet Assigned Numbers Authority), which is part of ICANN, responsible for generating and managing large blocks of IP addresses globally.
IANA assigns IP blocks to regional registries, which in turn distribute them to organizations, operators, Internet providers (ISPs), governments, companies… and, finally, those providers are the ones who assign a public IP to your home or business connection every time you connect.
Within the same network , such as your home or office network, the router is responsible for generating and distributing private IP addresses to each device, either manually or automatically (usually through a DHCP server integrated into the router itself).
How an IP address works step by step
To understand how an IP address actually works , it's helpful to review what happens when you do something as simple as opening your browser and typing in a website address.
1. Your device connects to a network . If you're at home, this will usually be your internet provider's network via your router. If you're at work, you'll connect to the corporate network. In a bar or hotel, you'll use the public Wi-Fi they provide.
2. Your internet service provider assigns you a public IP address . This address is the "visible face" of your connection to the outside world. All data that enters and leaves the internet is tagged with this public IP address so that it can travel back and forth correctly.
3. The router creates an internal network with private IP addresses . Within your home, each device (PC, mobile phone, TV, printer, smart speaker, etc.) receives a private IP address. These IP addresses are only valid within your local network and are not directly accessible from the internet.
4. When you request a website (for example, you search "what is an IP address" on Google), your device generates a request that goes from your private IP to the router, the router translates it and sends it to the Internet using your public IP, and that request jumps from router to router until it reaches the server where the website is hosted.
5. The server responds and returns the information labeled with your public IP address. Your router receives this data, redirects it to the correct device within your network (based on its private IP address), and within milliseconds, the page appears on your screen.
This entire process follows the rules of TCP/IP , the set of protocols that define how data is broken into packets, how it is numbered, how it is sent, how it is reassembled upon arrival… and how the IP address is involved in all of this.
What is an IP address used for?
The main function of IP is to identify devices and networks so that they can communicate with each other, both on internal networks (LAN) and over the Internet.
Thanks to IP addresses, data packets can be routed from a specific source to an exact destination, similar to how a courier service needs your physical address to deliver a package to you.
In addition to enabling the sending and receiving of data , IP facilitates tasks such as returning messages when something fails (for example, when you send an email to an address that no longer exists), detecting network problems, blocking malicious connections , or applying filters by origin or geographical location.
In practice, everything you do on the Internet (browsing, using social networks, checking your bank, watching streaming platforms, playing online games, downloading files, sending emails…) depends on your device having a valid and correctly configured IP address.
Internal structure: network ID and host ID
Each classic IPv4 address can be divided into two parts : the network identifier (Network ID) and the host identifier (Host ID).
The network ID is the section that identifies the specific network you belong to. For example, in the IP address 172.16.254.1, the 172.16.254 portion would correspond to the network ID in many scenarios. This portion is usually determined by your ISP, your company network, or the public Wi-Fi you are using.
The host ID is the fragment that identifies the specific device within that network, usually the last number in dotted decimal notation (in the previous example, the "1"). Thus, if you have several computers at home, they will all share the same network ID but will have different host IDs: 172.16.254.1, 172.16.254.2, 172.16.254.3, etc.
The combination of network ID + host ID generates a unique IP address within that network, which avoids conflicts and allows the router to know which device to deliver each packet it receives.
IPv4 address classes and private ranges
In IPv4, addresses are grouped into historical classes based on the value of the first octet. Although classless routing (CIDR) is more commonly used today, these classes remain a widespread way of explaining network structure.
Class A (0.0.0.0 – 127.255.255.255) : the first octet identifies the network and the other three identify the device. It was designed for giant networks with millions of hosts, such as large universities or large corporations.
Class B (128.0.0.0 – 191.255.255.255) : the first two octets are for the network and the last two for the devices. It is typical of medium and large organizations that require a balance between the number of networks and the number of hosts per network.
Class C (192.0.0.0 – 223.255.255.255) : the first three octets are for the network and the last one identifies the device. It is common in small environments, such as SMEs or slightly more advanced home networks.
Class D (224.0.0.0 – 239.255.255.255) : reserved for multicast, designed to send data simultaneously to multiple recipients, optimizing bandwidth.
Class E (240.0.0.0 – 255.255.255.255) : intended for testing, research and experimental uses; not used in end-user networks in a normal way.
Within those ranges, there are segments reserved for private networks that cannot directly access the internet. These are the IP addresses used by your router and devices at home or in the office.
- Private Class A: 10.0.0.0 to 10.255.255.255
- Private Class B: 172.16.0.0 to 172.31.255.255
- Private Class C: 192.168.0.0 to 192.168.255.255
These addresses can be repeated on different private networks without issue, because they are never directly visible on the internet. It is the router, through mechanisms like NAT (Network Address Translation), that acts as a "bridge" between private IPs and public IPs.
In addition, there are special reserved IPs that are not assigned to normal devices: 0.0.0.0 (all networks / invalid address), 127.0.0.1 (loopback, used for a computer to communicate with itself), 255.255.255.255 (broadcast to all devices on a network) or the 169.254.0.0/16 range, which is used when a computer cannot obtain an IP from a DHCP server and automatically configures itself with an address.
Types of IP addresses according to their range
We can classify IP addresses in many ways , but one of the most useful is to distinguish between public and private addresses, and between static and dynamic addresses. Each combination has specific uses and advantages.
Public IP address
Your public IP address is what identifies your internet connection . It's the address seen by the servers of the websites you visit, streaming services, online gaming platforms, or any service you connect to from outside your home network.
This IP address is provided by your Internet Service Provider (ISP) when you connect. All devices in your home that use the same router share the same public IP address, even though each one has its own private IP address internally.
Public IP addresses can be static or dynamic . Static IPs are widely used by businesses and services that need to be accessible at the same address at all times (for example, servers, video surveillance systems, or corporate VPN connections). Dynamic IPs are common among home users.
Private IP address
A private IP address is used only within your local network . The router assigns a different one to each device so they can recognize each other and share resources (printers, folders, IoT devices, etc.).
These private ranges are not routed over the internet . This means that two different houses can have, for example, a device with the IP address 192.168.1.34 without any conflicts, because each network is isolated and the router handles translating internal/external traffic.
Static and dynamic IP addresses
A static IP address is an address that does not change over time . It is either manually configured or specifically reserved for a device or connection.
Static IPs are common in professional environments where a website, mail server, FTP server, or other remotely accessible services are hosted. Always having the same address greatly simplifies the configuration of DNS, firewalls, and remote access.
In contrast, a dynamic IP address changes periodically , usually every time you restart your router or when your ISP reassigns its address pool. They are managed automatically with DHCP and are the cheapest and most flexible option for the average user.
Dynamic IPs help optimize resources (addresses that are no longer in use can be reused) and add a slight layer of security, as they make it somewhat more difficult to permanently track the same connection.
IP addresses for consumption and websites
Any individual or company that subscribes to internet service receives a consumer IP address, which can be public or internal private depending on the context. At the web hosting level, the scenario changes slightly.
In shared hosting services , many different websites reside on the same server and share the same public IP address. This is called a shared IP: several domains "live" behind a single IP address.
Dedicated IP addresses are also available for websites . In this case, a site (or a very small group) has its own IP address, which facilitates the configuration of certain certificates, direct IP access without a domain, or the creation of specific FTP servers, among other advantages.
What is IPv4, what is IPv6, and why is there a change?
IPv4 is the fourth version of the Internet Protocol and has been the basis of network addressing for decades. It uses 32 bits, which provides approximately 4.300 billion theoretical addresses, which at the time seemed more than sufficient.
With the explosion of connected devices (mobile phones, laptops, tablets, smart TVs, home automation systems, connected cars, sensors, cameras, etc.), that address space has become insufficient. "Patches" have been applied, such as the widespread use of NAT in routers to allow multiple devices to share a single public IP address, but the underlying problem remains.
To solve this, IPv6, version 6 of the protocol, was designed . It goes from 32 to 128 bits, using hexadecimal notation in eight groups separated by colons, allowing for an astronomical number of available addresses.
IPv6 introduces important changes in addition to the size of the address space itself:
- The classic concept of broadcast disappears and the focus is on unicast, multicast, and anycast to optimize traffic.
- Self-configuration of addresses is encouraged on devices, reducing dependence on traditional DHCP servers.
- Network masks are simplified with clearer prefixes and an addressing hierarchy that makes "saving" addresses less critical than in IPv4.
- Packages can be handled more efficiently Thanks to better structured headers, this reduces the workload of routers and speeds up routing.
- The need for NAT is reducedallowing many devices to once again have unique public addresses and simpler point-to-point connections.
The rollout of IPv6 is gradual and heavily dependent on service providers and operators. Currently, IPv4 and IPv6 coexist, and many users are unaware of the difference. According to data from major players like Google, the percentage of traffic over IPv6 increases annually, but IPv4 remains very prevalent.
How to find out your IP address
Finding your public IP address is very easy . Just open your browser, go to Google, and type "what is my IP address ." You'll see the address in the first results, and if you visit specific websites, you can also see details such as your ISP, country, and whether a proxy or VPN is detected.
To find your private IP address, the procedure varies depending on the operating system . It's the address assigned to you by your router within your local network.
View your private IP address in Windows
In Windows you can use the command prompt to quickly view your addresses:
- Open the Start menu and search for “cmd” or “Command Prompt”.
- In the window that opens, type
ipconfigand press Enter. - In the list that appears, look for the lines “IPv4 Address” and “IPv6 Address” associated with your network adapter (Wi-Fi or Ethernet).
You can also view it from the graphical settings by going to Settings > Network & Internet, selecting your Wi-Fi or Ethernet network and checking the connection properties, where the IP address will appear next to "IPv4 Address".
View your private IP address in Linux
In most Linux distributions , this is done through the terminal:
- Open the terminal using the corresponding icon or by pressing Ctrl + Alt + T.
- Write
ifconfigand press Enter (in some distros you may need to install the net-tools package). - You can also use alternative commands
ip addroip a.
In the output, you'll see the network adapters (for example, wlo1 for Wi-Fi or eth0 for wired). Next to the label "inet" is your private IPv4 address, and next to "inet6" is your private IPv6 address if you have it configured.
View your private IP address on macOS
On Mac it's quite straightforward through the graphical interface :
- Go to the Apple menu and enter "System Preferences".
- Click on “Network”.
- Select your connection (Wi-Fi or Ethernet) and you will see the IP address in the connection status data.
You can also use the Terminal app. and run ifconfig to see detailed information about all adapters, as in Linux.
View your private IP address on mobile devices (iOS and Android)
On iPhone or iPad with iOS :
- Open “Settings”.
- Enter “Wi-Fi”.
- Tap the information icon (the “i” in a circle) next to the network you are connected to.
- The IP address appears in the DHCP section or in the section corresponding to IPv4.
On Android, the menu may vary depending on the brand , but the idea is similar:
- Go to “Settings” or “Configuration”.
- Go to “Connections” or “Networks and Internet” and then to “Wi-Fi”.
- Tap on the network you are connected to and look for “Advanced settings” or similar.
- You will see the private IP address associated with your device within that network.
If you need to see the IP addresses of all devices connected to your network, the best way is to access the router's administration interface by typing its gateway (for example, 192.168.1.1) into your browser and checking the list of "connected devices" or similar.
Change IP address: public and private
Changing your public IP address isn't always something you can directly control . In many cases, simply turning your router off and on is enough for your ISP to assign you a new dynamic address, but if you have a static IP address or need a specific change, you'll need to contact your provider or consider DDNS services.
Changing your private IP address is much simpler and depends only on the configuration of your local network and your router or operating system.
In Windows you can force IP renewal via the console:
- Open “cmd” as before.
- Write
ipconfig /releaseand press Enter to release the current address. - Then write
ipconfig /renewto request a new one from the DHCP server (usually the router).
In Linux, if you're using a graphical environment , you can go to network settings, access your connection properties, and in the IPv4 section, choose between automatic (DHCP, dynamic IP) or manual IP address assignment, where you can define a static IP address for your computer. After applying the changes, it's advisable to restart the interface or the computer itself.
In more advanced networks , DHCP reservations can also be configured on the router so that it always gives the same private IP address to a specific device, identifying it by its MAC address.
Security, privacy, and IP-related threats
Your IP address, especially your public one, reveals more about you than you might think . It can reveal your internet service provider, your country, and even your approximate city, and serves as a reference point for all sorts of tracking and attacks if you don't protect it properly.
Cybercriminals can obtain your IP address in several ways : through social engineering (for example, by convincing you to connect to a certain service or to call them via Skype), by analyzing your activity in forums, comments, online games, malicious emails, etc.
Your IP address can be used to attempt various malicious actions :
- Track your approximate location with geolocation services and cross-referencing data with social networks to identify and locate you with considerable accuracy.
- Perform DDoS attacks against your connection, saturating your IP with junk traffic until your network becomes temporarily unusable, something relatively common in the world of competitive gaming.
- Scan ports on your IP address looking for vulnerable services (poorly protected webcams, home servers, open router ports…) to try to sneak into your devices.
- Spoof your IP address or use it as a "screen" to download illegal content, distribute pirated material or even criminal content, with the risk that the authorities will associate that activity with your connection.
Therefore, protecting your IP address is a key part of home and corporate cybersecurity, just like protecting your passwords or keeping your antivirus software up to date.
How to hide and protect your IP address
The most effective way to protect your public IP is to mask it so that the sites you visit and potential attackers see a different address than your real one.
There are two main technologies for this : proxy servers and virtual private networks (VPNs).
A proxy acts as an intermediary between your device and the internet: all your traffic passes through that server first, and to the outside world, it appears that the request originates from the proxy's IP address, not yours. However, many proxies add advertising, don't encrypt traffic, or even log your activity, so you need to choose carefully.
A VPN goes a step further because, in addition to hiding your IP address, it encrypts all traffic between your device and the VPN server, creating a secure "tunnel" even if you are on an unsecured public Wi-Fi network.
When you connect to a VPN :
- Your computer connects to a remote VPN server and establishes an encrypted channel.
- All your traffic goes out to the Internet from the VPN server's IP address, not your real one.
- You can appear to be in another country or region, which helps you bypass geo-blocks and maintain your privacy.
In addition to using a VPN or proxy , it is advisable to follow best practices to minimize the risk associated with your IP address:
- Configure privacy settings properly in messaging apps and social networks, limiting who can contact you or see your data.
- Use strong and unique passwords on routers, devices and online services, avoiding leaving default passwords.
- Be on the lookout for suspicious emails and links that can lead you to malicious websites capable of exploiting vulnerabilities in your browser or system.
- Install and keep up to date a good antivirus or security suite that detects malware, Trojans, and other intrusion attempts.
All of this does not eliminate 100% of the risks , but it greatly reduces the probability of your IP becoming the gateway to serious problems.
Understanding what an IP address is, how it's organized into public and private, static and dynamic addresses, and the differences between IPv4 and IPv6 gives you a much clearer view of how your internet connection really works, helps you fine-tune your equipment settings, troubleshoot common network problems, and, above all, make more informed decisions about your privacy and security every time you connect.
