What an IPv4 address is and why you have one
Your IPv4 address is a four-part number that identifies your device on your home network and the internet. It looks like this: 192.168.1.5 or 10.0.0.42. Every device that connects to your network — your computer, phone, printer, smart TV — gets its own IPv4 address so data knows where to go.
You actually have two IPv4 addresses at any given time. One is your local address, which only works inside your home network and lets your devices talk to each other. The other is your public address, which your internet service provider assigns to your router and is how websites and services find you on the internet. When you visit a website, the site sees your public address, not your local one.
IPv4 stands for Internet Protocol version 4. It has been the standard for decades and still handles the vast majority of internet traffic, even though a newer version called IPv6 exists. You do not need to choose between them — your devices use both, and your router handles the difference automatically.
Key Takeaways
- Your local IPv4 address is assigned by your router and only works within your home network, while your public address is assigned by your internet service provider and is how the internet identifies you.
- On Windows, you can find your local address by opening Command Prompt and typing ipconfig; on Mac or Linux, open Terminal and type ifconfig or ip addr.
- Your public IPv4 address appears on websites that show "what is my IP" when you visit them, and it changes only when your internet service provider reassigns it or you restart your router.
- Your local address usually starts with 192.168 or 10.0, while public addresses are any other range and are visible to websites you visit.
- Knowing your local address helps when you need to access your router's settings or troubleshoot why a device is not connecting to your network.
Finding your local IPv4 address on Windows
Open the Start menu and type "Command Prompt" into the search box. Click on Command Prompt when it appears — you do not need to run it as administrator for this task. A black window will open with a blinking cursor.
Type the word ipconfig and press Enter. The window will fill with information about every network connection on your computer. Look for the section labeled "Ethernet adapter" if you are plugged in with a cable, or "Wireless LAN adapter" if you are using Wi-Fi. Under that section, find the line that says "IPv4 Address". The number next to it is your local address — it will look something like 192.168.1.105.
You can also find this information through Settings. Go to Settings, then Network & Internet, then Wi-Fi (or Ethernet if you are wired). Click on your network name, scroll down, and look for "IPv4 address" in the DNS settings section. This method takes longer but does not require typing commands.
Finding your local IPv4 address on Mac and Linux
On a Mac, open Spotlight by pressing Command and Space together, type "Terminal", and press Enter. On Linux, open your terminal process from your applications menu. A window with a command prompt will appear.
Type ifconfig and press Enter. You will see information for each network connection. Look for the section that matches how you are connected — "en0" or "en1" for Wi-Fi on a Mac, or "wlan0" for Wi-Fi on Linux. Find the line that starts with "inet" (not "inet6"). The number after "inet" is your local IPv4 address.
On newer versions of Linux, ifconfig may not work. If you see a "command not found" message, type ip addr instead and press Enter. Look for the section labeled with your connection type and find the line starting with "inet". The address before the forward slash is your local IPv4 address.
Finding your public IPv4 address
Your public address is the one the internet sees when you visit websites. To find it, open any web browser and visit a site that displays your IP address. Common options include whatismyipaddress.com, myip.com, or straightforward search "what is my IP" in Google. The page will show your public IPv4 address within seconds.
Your public address is assigned by your internet service provider and stays the same until your router restarts or your service provider reassigns it. If you restart your router (by unplugging it for 30 seconds and plugging it back in), your public address may change. This is normal and happens because your internet service provider's system treats it as a new connection.
Do not share your public IPv4 address with people you do not trust. While it does not directly expose your home address or personal files, it can be used to identify your internet service provider and approximate your location. Your local address is safe to share — it only works inside your home network and means nothing to anyone outside it.
The difference between local and public addresses
Your local address is assigned by your router using a system called DHCP (Dynamic Host Configuration Protocol). Your router keeps a list of every device on your network and gives each one a unique local address from a reserved range. These ranges always start with 192.168, 10.0, or 172.16 — they are never used on the public internet. This is why your printer at 192.168.1.50 can talk to your computer at 192.168.1.100, but neither can be reached from outside your home.
Your public address is assigned to your router by your internet service provider. When your computer sends data to a website, your router translates your local address into the public address so the website knows where to send the response back. This translation happens automatically and is called Network Address Translation, or NAT. The website never sees your local address — it only sees the public one assigned to your router.
This separation is why you can have dozens of devices on your home network but only one public address. Your router acts as a middleman, keeping track of which local device sent which request and routing responses back to the right place. If your router breaks and you replace it, your local addresses will change (because the new router assigns them), but your public address usually stays the same for a while.
When you need to know your IPv4 address
You need your local IPv4 address when you want to access your router's settings page. Open a web browser and type your router's address into the location bar — it is usually 192.168.1.1 or 10.0.0.1, but you can find the exact address by looking at the sticker on your router or checking your router's manual. Knowing your own local address helps you understand whether your device is actually connected to the network if something is not working.
You need your public IPv4 address if you are setting up remote access to a device at home, troubleshooting a connection issue with your internet service provider, or checking whether a website has blocked your address. Some services also ask for your public address when you contact technical support, because it helps them see what they are receiving from your connection.
In most cases, you will not need either address. Your devices find each other automatically, and websites do not ask you to provide your address — they see it automatically. But if something stops working or you are following troubleshooting steps, knowing where to find both addresses will save you time.
What happens if your IPv4 address changes
Your local address can change if your router restarts or if you turn a device off and back on. When a device reconnects to your network, your router may assign it a different local address from the pool of available ones. This usually does not cause problems because your devices find each other by name (like "my-printer" or "living-room-tv") rather than by address. Your router translates the name to whatever address the device currently has.
If you want a device to always have the same local address — for example, so you can always reach your printer at the same number — you can set a static local address in your router's settings. This tells your router to always give that device the same address. This is useful for printers, network storage, or security cameras, but not necessary for phones and computers that move around.
Your public address changes less often. It typically stays the same for weeks or months unless your internet service provider reassigns it, your router loses power for an extended time, or you contact your service provider and ask for a new one. If you need a public address that never changes, you can pay your internet service provider for a static public address, though this is uncommon for home networks.
Frequently Asked Questions
Is my IPv4 address the same as my MAC address?
No. Your MAC address is a different identifier that only works on your local network, while your IPv4 address works both locally and on the internet. Your MAC address looks like 00:1A:2B:3C:4D:5E, and your router uses it to find devices on your network. Your IPv4 address is what lets data travel across the internet.
Can someone hack me if they know my public IPv4 address?
Knowing your public address alone is not enough to hack you. It tells someone which internet service provider you use and roughly where you are, but your router's firewall blocks incoming connections by default. However, you should still avoid sharing your public address with strangers, just as you would not share your home address with someone you do not trust.
Why do I have both IPv4 and IPv6 addresses?
IPv6 is the newer version of the internet protocol and was created because the world is running out of IPv4 addresses. Your devices use both so they can talk to older systems that only understand IPv4 and newer systems that use IPv6. Your router and internet service provider handle this automatically — you do not need to do anything.
What if I cannot find my IPv4 address using the methods above?
Make sure you are connected to your network — if you are offline, you will not have a local address. If you are using a corporate or school network, your device may not show the address in the same way due to security settings. Contact your network administrator for help. If you are at home and still stuck, restart your router and try again.
Does my IPv4 address change every time I restart my computer?
Not necessarily. Your router usually remembers which devices it has seen before and gives them the same local address when they reconnect. However, if your router restarts at the same time as your computer, or if several days pass between restarts, your local address might be different. This does not affect your ability to use your devices.