Same Wi-Fi, same phone. But the IP can change every time you connect. So how does the network know it's the same phone?
Check your own IP
- Connect to your home Wi-Fi.
- Open your phone's Settings and search for "IP".
- Open IP address. You'll see your local IP, something like
192.168.31.2.
That's on Android; on an iPhone, the IP is under Settings → Wi-Fi → the (i) next to your network.
The IP can change
Now turn the Wi-Fi off and on again. Sometimes you'll get a different IP, sometimes the same one. Why? The router simply hands out whichever IP is free at that moment. An IP is something the network gives you, and it depends on which network you join. (Lesson 10, on DHCP, shows exactly how.)
The MAC address belongs to the device
Your device was given another address when it was manufactured: the MAC address. It lives in the hardware that gives you Wi-Fi, the network interface card (NIC). It looks like six pairs of characters, for example A4:5E:60:XX:XX:XX. Your phone and your laptop each have their own. Search "MAC" in your phone's settings to see "Device MAC address".
| IP address | MAC address | |
|---|---|---|
| Given by | The network (your router) | The manufacturer, in the network card |
| Can it change? | Yes, whenever you reconnect or change networks | The hardware MAC doesn't change |
| Used for | Finding a device across networks | Delivering data inside the local network |
| Looks like | 192.168.31.2 | A4:5E:60:1B:2C:3D |
A note on privacy: newer Android phones and iPhones use a randomised "private" MAC for each Wi-Fi network by default, so the MAC shown on a Wi-Fi network's details screen may differ from the "Device MAC address". The hardware MAC itself stays the same.
Why it matters for hackers: inside a local network, switches deliver data using MAC addresses, not IPs. That's exactly what attacks like ARP spoofing (lesson 11) take advantage of.
Key takeaways
- An IP is given by the network and can change.
- A MAC is set in the network card when the device is made.
- The MAC uniquely identifies the device on the local network.
- Phones may show a randomised MAC per Wi-Fi network for privacy.
Quick quiz
Pick an answer to check yourself. Answer both to mark this lesson done.
1. You disconnect and reconnect the same phone to Wi-Fi. Which address might change?
- A) MAC address
- B) IP address
- C) Both
- D) Neither
Show answer
Answer: B. The IP is given by the network: the router hands out whichever IP is free at that moment, so it can change.
2. Where does a device's MAC address come from?
- A) The modem gives a new one each time
- B) Your internet company
- C) It's in the network interface card from manufacture
- D) The browser creates it
Show answer
Answer: C. The MAC address is in the network interface card from the time the device is manufactured.
Frequently asked questions
What is the difference between a MAC address and an IP address?
An IP address is given by the network and can change; it locates a device on a network. A MAC address is built into the device's network card and identifies the device itself on the local network.
Can a MAC address change?
The hardware MAC doesn't change, but phones now show a randomised private MAC per Wi-Fi network, and the MAC a device reports can be changed in software (MAC spoofing).
How do I find my phone's MAC address?
On Android, open Settings and search "MAC" to see the Device MAC address. On an iPhone, see Settings → General → About → Wi-Fi Address.