Is An IP Address Unique To a Computer/Router?


IP NAT

There’s lot of talk of IP addresses nowadays, and it’s even relatively easy to find the IP address of your device using online tools or through network settings. But are IP addresses actually unique to a computer or router? Do they change over time and can multiple devices have the same IP address?

To answer the question fully and completely requires that we firstly differentiate between public and private IP addresses, but here is a quick summary answer:

Public IP addresses are unique to a router/household, meaning devices connecting to the same router should have the same public IP address. Private IP addresses are assigned to devices by the router and are unique to each device within that particular network.

However, because private IP addresses follow a common set of ranges, such as 192.168.1.1-254, the same private IP addresses can often be seen across devices on different networks.

In other words, IP addresses are both unique and not unique at the same time! There’s quite a lot of nuance to the issue, and the distinction between public and private IP addresses is crucial to understand why, but it actually is possible and common for devices connected to different routers to have the same private IP address (though the public IP address will always be different).

Let’s take a complete, detailed look at the entire issue of IP addresses, and look at the ways in which they can be unique to devices and routers, but also follow and similar patterns and work across a similar range, and can actually be identical in the case of private IP’s at least.

IPv4 Address Are Split Into Public & Private IPs

A lot of the confusion around IP addresses revolves around the fact that there are both public/external and private IP addresses, and the answer to the main question changes depending on which type of IP address you’re talking about. Let’s address each type in turn.

1. Public IPv4 Addresses Are Unique To a Router/Household

Firstly, public IP addresses are what is displayed when you use a free tool to check your “current IP”. They are assigned by your ISP to a router/household. So if any device on a single network that’s all connected to the same router checks their public IP, it should display as the same, because public IP’s are assigned to a router only (not to individual devices connecting to a router).

Public IPv4 addresses follow the formula xxx.xxx.xxx.xxx – a series of 4 sets of numbers separated by dots and each set can go from 1 to 256.

Examples would be:

  • 100.231.111.200
  • 97.45.78.100
  • 100.31.87.200

As a general rule, external/public IPv4 IP addresses are unique in that they are assigned to one household/router only and cannot be simultaneously assigned to any other router or residence.

Public IP addresses convey general information, such as the ISP which issues them and the approximate location of the user (although nowadays this isn’t always very accurate and may localize to a nearby town/city).

Something like this (actual IP blocked out for privacy, but conveys the general idea):

This assumes you are not using a VPN, but we’ll cover this in a later section.

2. Private IPv4 Addresses Are Assigned Along a Common Range (NAT)

Now let’s move to private IPv4 addresses, that are assigned to devices within a household, rather than to a single router that supplies internet to that household.

That is where Network Address Translation or NAT comes in, as under the IPv4 addressing scheme, there aren’t anywhere near enough unique IP addresses available to cover every device on the planet. There are only about 4.3 billion potential unique IP addresses under IPv4, which is currently just about enough to cover every household/residence on the planet at the current time, but even the last block of of these public IP’s was issued quite recently.

Therefore NAT is the protocol by which public IP addresses are translated into a private IP address range which is actually quite common and often follows the 192.168.x.x format you may have seen, where the last x can be any number from 1 to 254.

See the diagram below for a good demonstration of how NAT translates public IP addresses into private ones under the IPv4 addressing scheme.

How NAT works

NAT type resolves the issue of there not being enough unique IPv4 addresses in the world by converting a a public IP address (82.10.250.19 – issued by the ISP) into a private IP address and range (192.168.0.1-255) so it can then dish out the private (local network) IP addresses you see in the image to each device on the home network (Image credit – Milesjpool – Wikimedia Commons).

Therefore under a standard home network, there is potentially room for 254 devices to each have their own unique IP address under this private range. The first one would have a private IP of 192.168.0.1 and the last would have a private IP of 192.168.0.254.

However, it should also be said that the private IP address range the router uses also depends on the default gateway of the router, so there isn’t just one range that all routers use; it does vary.

Here are some common private IPv4 address ranges:

  • Default gateway 192.168.0.1 – private IP range 192.168.0.1-254
  • Default gateway 192.168.1.1 – private IP range 192.168.1.1-254
  • Default gateway 10.0.0.1 – private IP range 10.0.0.1-254

Therefore, private IPv4 addresses are unique to a computer/device in that each device will have it’s own IP along the private range assigned, but at the same time they are not unique in the same way public IP addresses are, because there are literally millions of devices across the planet which will simultaneously be issued the same private IP because the router they are connecting to is using the same private IPv4 address range (eg. 192.168.1.1-254).

In other words, there are loads of devices across the planet right now that are using the private IP address of 192.168.0.10, to pick an example, because their router’s default gateway is 192.168.0.1, and therefore the private range of IPv4 addresses that router assigns runs along the common range of 192.168.0.1-254 that you’ll have seen very commonly if you’ve paid attention to IP addresses.

While their private IP is unique to that device on that particular network, it isn’t unique in a broader sense.  By contrast, public/external IPv4 address MUST by definition be unique; no other router/household can be using that same public IP address, even though they may issue private IPv4 addresses under a familiar range that millions of other routers do.

This is why in one sense your device can have the same IP addresses as another device in another house, but also can’t. It depends on whether you’re referring to the public or private IP address, and this might be what confuses people sometimes when they look up IP addresses.

For example, your phone in your house could have been issued the private IPv4 address of 192.168.1.20, and your friend’s tablet in her house could also have been issued that same private IP address (it would be a coincidence if there are 254 to choose from but could happen). However, your public IP addresses issued by your router will always be different if you look this up; yours might be 76.254.67.89 and your friend’s might be 89.43.254.13 (just two random examples). Each router/household has to use a unique public IP address.

Therefore you need to be clear when looking up an IP which one you are seeing; the IP displayed on online IP lookup sites like whatismyip will always be the public/external IP, and therefore will be unique:

When you look up an IP address on your device however (such as from Windows network settings), then the private IP address will be displayed:

Notice that the private IP address range depends on the default gateway of the network; as long as the subnet mask is 255.255.255.0, then it’s only the last digit that changes for each individual device on that network. The first three values should be the same as the default gateway, then the last one changes for each device as per the private IP range used by that router.

IPv4 Addresses Can Be Static or Dynamic

We should also mention that both public and private IPv4 addresses are usually dynamic by default (they can change over time), but can be made static (fixed) if the users wants to. Let’s explain why.

If you’re wanting to make your external or public IP address fixed or static (locked in place), then this can sometimes be done but often incurs an extra charge from your ISP. Normally, the public IP used by your router will periodically change when the service undergoes maintenance or the router resets, but you can sometimes request a static external IP to override this.

The same goes for private IPv4 addresses used within a single network – they can be dynamic/changeable or static. Making them static is actually much easier than with the external IP address and can be done from within your router settings. It’s often called setting a static IP or reserving an IP address for a device.

Normally, when left on default settings, a router will use something called Dynamic Host Configuration Protocol or DHCP to issue specific private IP address along the range determined by the default gateway. It issues these IPs to each device on the network with a time limit known as the DHCP Lease Time, after which that IP expires for that device and the router then issues it a new one, again with it’s own finite lease time.

Therefore, using DHCP, the private IP used by devices will also change over time. Check the IP of your device now and it may be 192.168.0.20; check in 1 or 2 week’s time and it might be something else like 192.168.0.31. The DHCP lease time for the original private IP address ran out and the router issued a new one; as it will when this second one runs out, and so on.

If you want to override this and keep the private IP of a device on the home network locked in place, you need to log into your router, find the DHCP or Address Reservation section, find the device you need on the list (or enter the MAC address) and then assign it the IP you want it to have permanently. See here for our guide on this for gamers, but you can use it for any device.

Using a VPN Can Change Your External IP Address

Normally, the external IP used by your router that any IP address lookup tool will detect is issued by your ISP (internet provider), and will often change periodically. However, using a VPN circumvents this and your VPN provider will issue a different public IP to your device, masking your real public IP address and location and changing it to something else.

This is one of the key privacy benefits of using a VPN; they hide your real IP and location and make you appear as though you are somewhere else. This is why they are often used to circumvent streaming services that will only allow access to users they think are in a certain country, or to get around internet restrictions imposed more generally in certain countries.

Therefore if you check your current public IP without using a VPN, and then turn on the VPN and check again, it will be different. Disable the VPN and it will return back to what it was originally. Clever stuff!

IPv6 IP Addresses Are Unique To Each Device

Because of the limitations of IPv4 addressing, which is solved by using NAT to split IP addresses into public and private, the internet is slowly moving across to a new, more spacious addressing scheme called IPv6.

This uses a different format than IPv4:

General IPv6 address format – 8 sets of 4 numbers/letters, separated by colons:

xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx

example:

2001:0000:3238:DFE1:0063:0000:0000:FEFB

Under the IPv6 addressing scheme, because there’s so many more potential combinations than with the IPv4 scheme, there is room for literally 34 undecillion unique IP addresses, so there’s no need to worry about running out of address space once the internet fully transitions over to it (which will still take years).

Everyone on the planet could have hundreds of devices each and you’d still get nowhere near the limit of address spaces under IPv6. They’d all still be able to have a unique IPv6 address as well, so the issue of IP addresses will be a lot simpler once everything fully moves over to IPv6, but this will still take a lot of time.

Under IPv6 addressing, every device can have a unique IP address and there’s no need for NAT to split IPs into public and private.

Concluding Thoughts

We get that all of this talk of public and private IP addresses, NAT and DHCP can all be a bit overwhelming, so let’s summarize everything we’ve covered in this post and bring it back to the original question – are IP addresses unique to computers/devices/routers?

  • Public IP’s are issued by ISPs to routers and are unique. No two routers can have the same public IP.
  • If two devices are connecting to the same router, and neither is using a VPN, then they should also have the same public IP address. All devices on the same router should have the same public IP address.
  • If two devices are on different networks and connecting to different routers, then they will have different public IP addresses, since these are issued to the router the device is connecting to and are unique to each router/household.
  • Using a VPN can change the public IP address of a device.
  • Private IP addresses are assigned by a router and are unique to every device on that particular network.
  • Public IPv4 addresses are translated into private IPv4 addresses using the NAT protocol.
  • However, because different routers often issue private IP addresses along a couple of very common private address ranges (eg. 192.168.1.1-254), it is very possible and common for devices on different networks to temporarily have the same private IP address (eg. 192.168.1.15).
  • IPv6 addressing is more spacious and does not require any distinction between public and private IP addresses or the use of NAT, and therefore all IP’s under this addressing scheme are unique. However, IPv4 is still more common as of now.
  • Both public and private IP addresses are not static unless configured as such by the user and therefore will change over time.

Oliver

Online gamer and general home networking enthusiast. I like to create articles to help people solve common home networking problems.

Recent Posts