Do two computers connected on the same Wi-Fi have the same IP address?

You're both seen as having the same IP address externally.

Your router will relay requests to the originating computer. The procedure used for this is network address translation (NAT).

One of the ways computers on the same network get distinguished in communication with the same public server is by assigning them by the router different port numbers in the communication. Their public IP address is the same, but the port number part is not. From the article:

To avoid ambiguity in how to translate returned packets, further modifications to the packets are required. The vast bulk of Internet traffic is TCP and UDP packets, and for these protocols the port numbers are changed so that the combination of IP and port information on the returned packet can be unambiguously mapped to the corresponding private address and port information.

However, if you were to try to communicate to your father's computer, you will be using your internal addresses.

These use a custom range intended only for internal use: private address range.

Computerphile has a YouTube video on this exact subject: Network Address Translation (video).


Here's a VERY brief outline of how IP addressing works in this situation:

You have your home computer, it has a network interface (Ethernet port or Wi-Fi card), and each of these have unique MAC addresses which identify them globally.

Network interfaces are given IP addresses by your router/modem/switch/access point. Your access point (AP) is part of or connected to a modem/router/switch which gives the AP an IP address. This is how things look so far:

Your computer (IP)->Access Point(IP)->CableModem(IP)

Here is an example of what those IP addresses might be. In the example, the 4th octet (the last number of each set) determines your device's IP address, the 3 to the left of them determine the devices network.

192.168.1.50---------->192.168.1.25-------->192.168.1.1

Essentially, in this example, the modem creates a network called 192.168.1 All devices on the network are given a different x value (1-255), the last digit.

Here's an important distinction. There are two types of IPv4 IP addresses, Public and Private. Public IP addresses are the ones you see on the Internet (if you ping google.com you'll get a public IP address). Inside of a network you typically have a Private IP setup (192.168.x.x and 172.x.x.x and 10.x.x.x - they are all IP addresses that do not exist on web servers in the internet; they are reserved for local networks).

Typically, your home network has a gateway which is something like x.x.x.1 (192.168.1.1, 10.1.1.1, for instance). This means that they are not accessible from the outside world, they are meant to be INSIDE your network.

How do internal network devices get on the Internet then?

If you go to http://www.whatismyip.com/ you'll see an IP address listed which is not your computer, your AP, or your modem/router. This is your Public IP address.

Typically, your modem/router has two functions. 1) Receive an IP address from the outside world and talk to your ISP's network with that address 2) Create an internal network and let them talk through its external interface.

So here's, effectively what your modem does:

Public IP (cable jack) <----> [Modem|Ext IP address/Int LAN] ---> Ethernet ports <---> [computers]

The modem bridges the public Internet to your network. Requests from your internal network get sent to your modem which forwards them to the Internet. This way only one public IP address is needed for ALL of your devices to talk to the Internet.

On the Internet side of the modem you have an IP address assigned by your ISP which is the one www.whatismyip.com shows you. This is put on the interface of your modem which is attached to your cable/DSL/T-1 line. The other side of the modem/router (where you plug in your access point, switch, or computers) is given an IP address you can configure. The way people are able to have servers visible to the public is that they can tell the modem things like this: "When a request comes to our PUBLIC IP address asking for a resource, connect that traffic to an INTERNAL IP ADDRESS OR RESOURCE"

When you send a message, your computer's IP address basically becomes 'encapsulated' within various 'headers' on your data. Ultimately, the computers seeing your traffic see your external IP address from your modem and not your physical computers internal IP address. More data is sent containing MAC addresses and things like that but, essentially one public IP address can represent an entire network of devices behind it.

More information can be found in What is an IP address? (or all over the Internet :)

NAT is the process by which your router translates the internal addresses to your public address and your public incoming traffic to the correct internal IP address.

There's a lot more to it, but that should be the general idea. For more, look in to the OSI Model, IP "Sockets", and another good article is How Does the Internet Work?.


Any of these topics could be examined in far greater detail.

You and your dad have the same external address, but different internal addresses.

External IP addresses are like a street address. The whole world can find you using that address.

Internal IP addresses are like rooms in a house. Only someone in a house can use directions to find the specified room. In your case, only someone connected to the same wifi can see your internal IP address.

Using default settings, a wifi network will have a single external IP address. When the mailman brings mail to your house, someone has to get it from the mailbox and distribute it to who it belongs to. Each wifi network has a router, which acts like your personal doorman. The router "collects the mail" and gives it to you only if it is addressed to you. Mail addressed to your dad goes to him.

The outside world only sees one address, your external address. Computers and other devices inside the network only see the inside. The router is the only thing that sees both sides.

To see this in action, go to Google and type "what is my ip?". This will be your external (or public) address. Next, find your internal address. In Windows, open a command prompt. Then type: ipconfig and hit enter. You will see a whole bunch of stuff similar to this. The picture highlights your internal IP address. Running this command on your dad's computer would get a different number, but googling your IP address from his computer would get the same number.

For your curiosity, the default gateway listed is the internal IP address of your router. If you are using a Mac, google "find your IP on mac" for directions to find your internal IP.