How to Check Your IP Address Using CMD (Command Prompt)
Finding your IP address through Command Prompt is one of the quickest, most reliable methods available on Windows — no third-party apps, no browser tabs, no guesswork. Whether you're troubleshooting a network issue, configuring a router, or just curious about your connection details, CMD gives you direct access to the information your system is actively using.
What Is an IP Address, and Why Does It Matter?
An IP address (Internet Protocol address) is a numerical label assigned to every device connected to a network. It serves two functions: identifying your device and providing its location within a network so data knows where to go and come back from.
There are two types you'll commonly encounter:
- Private IP address — the address assigned to your device within your local network (by your router). Other devices on your home or office Wi-Fi use this to communicate with yours.
- Public IP address — the address your router exposes to the wider internet. Websites and external servers see this one, not your private IP.
CMD can reliably surface your private IP address and related network details. Your public IP requires a different approach (typically a web-based lookup), but CMD still gives you the network picture you need for most local troubleshooting.
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 and click to open it. You don't need administrator privileges just to check your IP address.
The Primary Command: ipconfig 🖥️
The fastest way to check your IP address in CMD is the ipconfig command.
Steps:
- Open Command Prompt
- Type
ipconfigand press Enter
You'll see output broken into sections — one for each network adapter on your machine. Common adapters include:
- Ethernet adapter — for wired connections
- Wireless LAN adapter Wi-Fi — for wireless connections
- Loopback Pseudo-Interface — an internal address (
127.0.0.1) used by your system, not a real network connection
Within the relevant adapter section, look for:
| Field | What It Means |
|---|---|
| IPv4 Address | Your device's private IP on the local network |
| Subnet Mask | Defines the range of your local network |
| Default Gateway | Your router's IP address |
| IPv6 Address | The IPv6 version of your private address (if enabled) |
Your IPv4 Address is what most people mean when they say "my IP address" in a local network context. It typically looks like 192.168.x.x or 10.x.x.x.
Getting More Detail: ipconfig /all
If ipconfig alone doesn't give you enough, add the /all flag:
ipconfig /all This expands the output to include:
- Physical Address (MAC address) — the hardware identifier for your network adapter
- DHCP Enabled — whether your IP is assigned automatically by a router or set manually
- DHCP Server — the IP of the device assigning addresses (usually your router)
- DNS Servers — the addresses your system uses 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 why a device can't connect, verifying DNS settings, or documenting network configurations.
Other Useful CMD Networking Commands
CMD offers more than just ipconfig. Several related commands help paint a fuller picture of your network status:
ping — Tests whether a device or server is reachable and measures response time:
ping google.com nslookup — Queries DNS to find the IP address tied to a domain name:
nslookup techfaqs.org netstat — Displays active network connections, open ports, and protocol statistics:
netstat -an tracert — Traces the route data takes from your machine to a destination:
tracert google.com Each of these commands produces different output, and interpreting them usefully depends on what problem you're actually trying to solve.
Factors That Affect What You See in CMD 🔍
The output from ipconfig isn't the same for every user. Several variables shape what appears:
- Connection type — Wired Ethernet and Wi-Fi will show as separate adapters, each with their own IP
- Number of network adapters — Laptops with both built-in Wi-Fi and a USB network adapter will show multiple entries
- Virtual machines or VPNs — These add virtual adapters with their own IP ranges, which can clutter the output or be mistaken for your real connection
- DHCP vs. static IP — If your IP is statically assigned, the lease fields won't appear
- IPv4 vs. IPv6 — Some networks prioritize IPv6, which uses a longer address format (e.g.,
fe80::...) - Windows version — The formatting of
ipconfigoutput is broadly consistent across Windows 10 and Windows 11, though older versions may display slightly differently
If you're on a corporate or institutional network, you may also see multiple DNS servers, proxy configurations, or IP addresses in ranges that differ from the typical home network pattern.
Reading Your Results in Context
Knowing your private IP address is the starting point — but what you do with it depends entirely on your situation. Someone configuring port forwarding on a home router needs a different piece of information than someone troubleshooting a DNS resolution failure or setting up a local development server.
The raw output from ipconfig is the same for everyone. What it means — and which part of it actually matters — shifts depending on your network setup, your operating system configuration, what you're trying to accomplish, and how your router or network administrator has things arranged. The commands are consistent; the context they sit in rarely is.