How to Check Your IP Address Using CMD (Command Prompt)
Knowing your IP address is one of those fundamental networking tasks that sounds technical but takes less than 30 seconds once you know where to look. Whether you're troubleshooting a connection issue, setting up a home network, or just curious about how your machine is identified online, the Windows Command Prompt gives you direct, reliable access to this information — no third-party tools required.
What Is an IP Address and Why Does CMD Show It?
Your IP address (Internet Protocol address) is a numerical label assigned to every device connected to a network. It works like a postal address for data — telling other devices and servers where to send information.
There are two types you'll commonly encounter:
- Private (local) IP address — assigned by your router to your device within your home or office network. Typically looks like
192.168.x.xor10.x.x.x. - Public IP address — assigned by your Internet Service Provider (ISP). This is the address the wider internet sees when your traffic leaves your network.
CMD gives you fast access to your private/local IP and a range of other network details. It reads directly from your operating system's network configuration — no browser, no external site needed.
How to Open Command Prompt on Windows
Before running any commands, you need to open CMD:
- Press Windows key + R, type
cmd, and hit Enter - Or search "Command Prompt" in the Start menu and click to open
- On Windows 10/11, you can also right-click the Start button and select Windows Terminal or Command Prompt
No administrator privileges are required just to check your IP address.
The Main Command: ipconfig 🖥️
The command you need is:
ipconfig Type it into the Command Prompt window and press Enter. Within a second, you'll see a list of network adapters and their associated addresses.
Reading the ipconfig Output
The output lists every network adapter on your machine — physical and virtual. The key values to look for:
| Field | What It Means |
|---|---|
| IPv4 Address | Your local IP address on the current network |
| Subnet Mask | Defines the range of your local network |
| Default Gateway | Your router's IP address |
| IPv6 Address | Your IPv6 local address (if enabled) |
Your IPv4 Address is what most people mean when they say "my IP address" in a local network context. It usually appears under your active adapter — either Ethernet adapter (wired) or Wireless LAN adapter Wi-Fi (wireless).
Getting More Detail: ipconfig /all
If ipconfig gives you a snapshot, ipconfig /all gives you the full picture:
ipconfig /all This expanded output adds:
- Physical Address (MAC address) — the hardware identifier for your network adapter
- DHCP Enabled — whether your IP is automatically assigned by a router or manually set
- DHCP Server — the IP of the device handing out addresses (usually your router)
- DNS Servers — which servers your machine queries to resolve domain names
- Lease Obtained / Lease Expires — how long your current IP assignment is valid
This level of detail is particularly useful when diagnosing network conflicts, verifying DNS settings, or documenting a network configuration.
What CMD Cannot Tell You: Public IP Address
Here's an important distinction many users miss: ipconfig only shows your local/private IP, not your public IP address.
Your public IP is what websites, online games, and remote services see. It's assigned at the router level by your ISP, and CMD alone doesn't expose it by default.
To find your public IP via CMD, you can use:
curl ifconfig.me This works on Windows 10 and 11 systems that have curl installed (which is included by default in recent builds). It queries an external service and returns your public IP directly in the terminal window.
If curl isn't available on your system, browser-based IP lookup tools or your router's admin panel are the alternatives.
When Results Look Unexpected
A few situations that can make the output confusing:
- 169.254.x.x address — This is an APIPA address, meaning your machine couldn't reach a DHCP server and assigned itself a fallback address. Usually signals a connectivity problem with your router.
- Multiple adapters listed — Normal on machines with both wired and Wi-Fi interfaces, plus virtual adapters from VPN software or virtualization tools like Hyper-V or VMware.
- IPv6-only results — Some networks prioritize IPv6 and may not assign an IPv4 address. Your IPv6 address is still a valid identifier on those networks.
- VPN active — If a VPN is running, your listed IP may reflect the VPN's virtual adapter rather than your actual network interface. Both addresses will appear in the list, but understanding which is "active" depends on your VPN's routing configuration.
Factors That Affect What You See 🔍
The output you get from ipconfig isn't universal — it reflects your specific setup:
- Operating system version — Windows 10 and 11 display output slightly differently, and available commands like
curldepend on your build version - Network type — Home networks, corporate networks, and mobile hotspots each assign IPs differently
- Static vs. dynamic IP configuration — Manually configured (static) IPs behave differently than DHCP-assigned ones
- Active VPN or proxy software — Adds virtual adapters and can mask or replace your real network identity
- Number of network interfaces — Laptops with both wired and wireless capabilities, or machines running virtual machines, will show considerably more entries
What ipconfig reports is an accurate picture of your machine's current network state — but interpreting it correctly depends on understanding which adapter you're actually using and what kind of network you're connected to.