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

Finding your IP address through the Windows Command Prompt is one of the fastest and most reliable methods available — no third-party tools, no browser extensions, just a built-in utility that gives you precise network information in seconds. Whether you're troubleshooting a connection issue, configuring a home network, or helping someone remotely, knowing how to pull this information from CMD is a genuinely useful skill.

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 core functions: identifying a device and providing its location within a network so data can be routed correctly.

There are two distinct types you'll commonly encounter:

  • Private IP address — The address assigned to your device within your local network (home, office, school). This is what your router uses to communicate with your laptop, phone, or printer.
  • Public IP address — The address your Internet Service Provider assigns to your network as a whole. This is what the outside internet sees when you browse a website.

CMD gives you direct access to your private/local IP address. Your public IP requires a different approach (typically a web-based lookup tool).

How to Open Command Prompt

Before running any commands, you need to open CMD. There are a few ways to do this on Windows:

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

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

The Main Command: ipconfig 🖥️

Once Command Prompt is open, type the following and press Enter:

ipconfig 

This single command returns a snapshot of your network configuration. The output lists every network adapter on your system — which may include your Wi-Fi adapter, Ethernet adapter, Bluetooth adapter, and any virtual adapters (like those created by VPN software or virtualization tools).

Reading the ipconfig Output

The output can look dense at first, but the key fields to identify are:

FieldWhat It Means
IPv4 AddressYour local IP address on the current network
Subnet MaskDefines the range of the local network
Default GatewayUsually your router's IP address
IPv6 AddressThe newer IP format, if your network supports it

Your IPv4 Address is typically formatted as four sets of numbers separated by dots — for example, something in the range of 192.168.x.x or 10.x.x.x. These are standard private address ranges defined by networking standards.

If you see 169.254.x.x, that's an APIPA address — a self-assigned address Windows falls back to when it can't reach a DHCP server. It usually signals a connectivity problem rather than a valid network assignment.

Going Deeper: ipconfig /all

For more detailed information, use the extended version of the command:

ipconfig /all 

This adds several additional fields including:

  • Physical Address (MAC address) — The hardware identifier for your network adapter
  • DHCP Enabled — Whether your IP is assigned automatically or manually configured
  • DNS Servers — The servers your device uses to resolve domain names
  • Lease Obtained / Expires — How long your current IP assignment is valid (relevant for DHCP networks)

This level of detail matters in certain scenarios — particularly if you're diagnosing why a device isn't connecting properly or verifying a static IP configuration.

Variables That Affect What You'll See

The output from ipconfig isn't the same for every user or every machine. Several factors shape what appears: 🔧

Number of network adapters — A laptop with both Wi-Fi and Ethernet will show entries for each. A machine running virtualization software (like VMware or VirtualBox) may show several additional virtual adapters, which can make the output harder to parse.

DHCP vs. static configuration — Most home users have DHCP-assigned addresses that can change over time. Business or server environments often use static IP addresses that are manually set and don't change.

IPv4 vs. IPv6 — Older networks predominantly use IPv4. Newer or dual-stack networks will show both an IPv4 and an IPv6 address. Some environments are transitioning fully to IPv6, which uses a longer, colon-separated format.

VPN software — If a VPN is active, you may see a virtual adapter with a different IP range. Your "real" local IP is still listed under your physical adapter, but traffic may be routed differently depending on VPN configuration.

Operating system version — The visual layout and available adapters can differ slightly between Windows 7, Windows 10, and Windows 11, though the core ipconfig command works consistently across all modern versions.

When CMD Shows Multiple IP Addresses

It's entirely normal for ipconfig to return several IP addresses across different adapters. The relevant one depends on how you're currently connected:

  • Using Wi-Fi? Look at the Wireless LAN adapter Wi-Fi section
  • Plugged into a router via cable? Look at the Ethernet adapter section
  • Both active simultaneously? Both addresses are valid — your device is connected through two paths at once

Understanding which adapter is handling your active traffic is part of interpreting the output correctly, and it often depends on how your network is configured and whether any adapter priority rules are set.

Finding Your Router's IP Address

The Default Gateway listed in ipconfig output is almost always your router's IP address. This is useful to know when you need to log into your router's admin panel — typically accessed by typing that gateway address directly into a browser's address bar.


What you'll actually see when you run these commands depends on your specific hardware, how many adapters you have installed, whether you're on a home or enterprise network, and whether any software like VPNs or virtual machines is active. The command is consistent — but the network environment it's reading from is entirely your own.