How to Find Your IP Address Using CMD (Command Prompt)

Whether you're troubleshooting a network issue, configuring a router, or just curious about your connection details, knowing how to pull up your IP address from the Command Prompt (CMD) is one of the most useful basic networking skills you can have. It takes seconds, requires no third-party software, and works on virtually every Windows machine.

What Is an IP Address — and Which One Are You Looking For?

Before running any commands, it helps to understand what you're actually looking for. IP address stands for Internet Protocol address — a numerical label assigned to a device on a network so data knows where to go.

There are two types most users encounter:

TypeWhat It IsWho Assigns It
Private (Local) IPYour device's address on your home or office networkYour router
Public (External) IPThe address your network shows to the internetYour ISP

CMD is best suited for finding your private/local IP address. Your public IP requires a different approach (more on that below).

How to Open Command Prompt

There are a few ways to get there:

  • Press Windows Key + R, type cmd, and hit Enter
  • Search "Command Prompt" in the Start Menu
  • Press Windows Key + X and select "Terminal" or "Command Prompt" (Windows 10/11)

No admin privileges are required just to check your IP address.

The Main Command: ipconfig

Once CMD is open, type the following and press Enter:

ipconfig 

This displays your network adapter information. You'll typically see output for multiple adapters — Wi-Fi, Ethernet, and any virtual adapters (like VPN or Hyper-V). Look for the section that matches your active connection.

The key values to note:

  • IPv4 Address — This is your local IP address (e.g., 192.168.1.105)
  • Subnet Mask — Defines your network's range (commonly 255.255.255.0)
  • Default Gateway — Usually your router's IP address (e.g., 192.168.1.1)

If you're on a wireless connection, look under the "Wireless LAN adapter Wi-Fi" section. For a wired connection, check "Ethernet adapter."

Going Deeper: ipconfig /all 🔍

For more detail, run:

ipconfig /all 

This expanded output includes:

  • Physical Address (MAC address) — A unique hardware identifier for your network adapter
  • DHCP Enabled — Whether your IP is automatically assigned (most home networks use DHCP)
  • DHCP Server — The device handing out IP addresses (usually your router)
  • DNS Servers — The servers your machine 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 connectivity problems, setting up static IPs, or identifying network configuration conflicts.

What If You Need Your Public IP?

CMD doesn't natively show your public IP address — the one websites and external services see. However, you can retrieve it through CMD using a tool like curl (available in Windows 10 version 1803 and later):

curl ifconfig.me 

or

curl api.ipify.org 

If curl isn't recognized, you can also use PowerShell (which is closely related to CMD):

(Invoke-WebRequest -uri "https://api.ipify.org").Content 

This queries a web service and returns your current public IP directly in the terminal. Keep in mind your public IP can change unless your ISP provides a static IP — which is typically a paid service or a business-tier feature.

IPv4 vs. IPv6 — Understanding What You See 🌐

You may notice two address types in the ipconfig output:

  • IPv4 — The familiar four-part format (e.g., 192.168.0.10). Still dominant in home networks.
  • IPv6 — A longer hexadecimal format (e.g., fe80::a1b2:c3d4:e5f6:7890). Increasingly common as IPv4 addresses become scarce.

Most home networking tasks still rely on IPv4, but if you're configuring a modern router or working with a business network, you may need to reference your IPv6 address as well. Both appear in standard ipconfig output.

Factors That Affect What You'll See

The output from ipconfig varies depending on your setup:

  • Number of adapters — Machines with VPN clients, virtual machines, or both wired and wireless connections will show multiple adapter entries
  • DHCP vs. static assignment — DHCP-assigned IPs can change; static IPs are fixed and manually configured
  • Network type — Corporate networks often use different subnet ranges (like 10.x.x.x or 172.16.x.x) compared to typical home setups (192.168.x.x)
  • Windows version — The exact layout of ipconfig output differs slightly across Windows 7, 10, and 11, though the core fields remain consistent

When CMD Results Don't Match What You Expect

If your IP shows as 169.254.x.x, that's an APIPA address — it means your device failed to get an IP from a DHCP server and self-assigned a fallback address. This usually signals a network configuration problem rather than a working connection.

If you see multiple valid IP addresses for the same adapter, your device may have multiple IP assignments — this can happen in advanced network configurations or when transitioning between DHCP leases.

Understanding which adapter you're actually using, and what kind of IP assignment your network relies on, is what determines which output line is the relevant one for your situation.