How to Check Your IP Address from CMD (Command Prompt)
Whether you're troubleshooting a network issue, setting up a server, or just curious about how your device connects to the internet, knowing how to find your IP address from the Windows Command Prompt is a foundational networking skill. The process is straightforward — but what the results mean depends on your specific setup.
What Is an IP Address (and Why Does CMD Know About It)?
An IP address (Internet Protocol address) is a numerical label assigned to every device on a network. It's how devices identify and communicate with each other, whether locally or across the internet.
Your device actually holds more than one IP address at any given time:
- Private (local) IP address — assigned by your router, visible only within your home or office network
- Public IP address — assigned by your ISP, this is what the rest of the internet sees
CMD gives you direct access to the network stack of your operating system, which means it can surface both of these values — along with a lot of additional network configuration data.
How to Open Command Prompt
Before running any commands, you need to open CMD:
- Press Windows + R to open the Run dialog
- Type
cmdand press Enter - Alternatively, search for "Command Prompt" in the Start menu
No administrator privileges are required for basic IP lookup commands.
The Primary Command: ipconfig
The fastest way to check your IP address from CMD is to type:
ipconfig Press Enter, and you'll see a breakdown of all active network adapters on your machine. Each adapter — whether that's Wi-Fi, Ethernet, or a virtual adapter — will display its own set of values.
Key values to look for:
| Field | What It Tells You |
|---|---|
| IPv4 Address | Your private IP on the local network |
| IPv6 Address | Your private IP in the newer IPv6 format |
| Subnet Mask | Defines the range of your local network |
| Default Gateway | Usually your router's IP address |
Your IPv4 Address typically starts with 192.168.x.x, 10.x.x.x, or 172.16.x.x — these are reserved private address ranges defined by networking standards.
Going Deeper: ipconfig /all
If you want more detail, add the /all flag:
ipconfig /all This expands the output to include:
- Physical (MAC) address — the hardware identifier of your network adapter
- DHCP status — whether your IP is dynamically assigned or static
- DNS servers — which servers your machine uses to resolve domain names
- DHCP lease information — when your IP was assigned and when it expires
This extended output is especially useful when diagnosing connectivity problems or configuring network devices manually.
🔍 Finding Your Public IP from CMD
ipconfig only shows your private IP — the one assigned within your local network. To find your public IP (the one visible to external servers) from CMD, you need to query an external service.
One method that works natively on modern Windows systems:
curl ifconfig.me Or alternatively:
nslookup myip.opendns.com resolver1.opendns.com The nslookup command queries OpenDNS's resolver, which returns your public-facing IP address without needing a browser. This is a common approach used by network administrators and IT professionals.
Understanding Multiple Adapters and What They Mean
One source of confusion is seeing multiple IP addresses in the ipconfig output. This is normal. Common adapters that may appear include:
- Ethernet adapter — wired connection to a router or switch
- Wi-Fi adapter (Wireless LAN) — your wireless connection
- Loopback adapter — always
127.0.0.1, this is a virtual address your OS uses internally - VPN adapters — if you use a VPN, it creates a virtual adapter with its own IP
- Hyper-V or VMware adapters — appear if you run virtual machines
Each active adapter will have its own IP assignment. If you're connected to both Ethernet and Wi-Fi simultaneously, you'll see separate IPv4 addresses for each — and your traffic routing will depend on adapter priority settings.
💡 IPv4 vs. IPv6: What You'll Actually See
Most home and business networks still primarily use IPv4, but IPv6 is increasingly active. You may see both listed for the same adapter.
- IPv4 addresses look like:
192.168.1.45 - IPv6 addresses look like:
fe80::1a2b:3c4d:5e6f:7g8h%12
For most everyday troubleshooting, the IPv4 address is what you'll reference. IPv6 matters more in enterprise environments, ISP configurations, and when working with modern internet infrastructure.
When CMD Results Don't Match Expectations
A few situations where the output might surprise you:
- APIPA addresses starting with
169.254.x.xmean your device failed to get an IP from a DHCP server — usually a sign of a connectivity problem - Multiple gateways can cause routing conflicts on machines with more than one active adapter
- VPN software often reassigns your default gateway, which affects how traffic is routed
Each of these scenarios requires a different diagnostic path — and whether any of them apply to you depends entirely on how your network is configured, what software is running, and what you're trying to accomplish.
The commands themselves are consistent across Windows 10 and Windows 11, but the number of adapters, the IP ranges in use, and what "normal" looks like will vary from one machine — and one network — to the next. 🖥️