How to Check Your IP Address Using Command Prompt

Knowing your IP address is one of those fundamental networking tasks that comes up more often than you'd expect — whether you're troubleshooting a connection issue, setting up a server, or just satisfying curiosity. The Command Prompt on Windows gives you fast, direct access to this information without needing to open a browser or dig through system settings.

Here's exactly how it works, what the output means, and why different users get different results depending on their setup.

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 works like a mailing address — routing data to and from the right place. There are two versions in active use:

  • IPv4 — the traditional format, written as four sets of numbers separated by dots (e.g., 192.168.1.5)
  • IPv6 — a newer, longer format designed to handle the explosion of internet-connected devices (e.g., fe80::1a2b:3c4d:5e6f:7g8h)

You may also encounter two distinct types of IP addresses:

TypeWhat It IsVisible To
Private/Local IPAssigned by your router to your deviceOnly devices on your local network
Public/External IPAssigned by your ISP to your connectionThe wider internet

Command Prompt is best suited for finding your local IP address. Your public IP requires an external lookup.

How to Open Command Prompt

Before running any commands, you need to open Command Prompt:

  1. Press Windows + R to open the Run dialog
  2. Type cmd and press Enter

Alternatively, search for "Command Prompt" in the Start menu. You don't need administrator privileges for a basic IP check.

The Main Command: ipconfig 🖥️

The primary tool for checking your IP address in Windows Command Prompt is ipconfig. Type it and press Enter:

ipconfig 

The output will list every network adapter on your system — including Ethernet, Wi-Fi, Bluetooth, and virtual adapters — along with the IP information for each. The key lines to look for are:

  • IPv4 Address — your local IP on the current network
  • Subnet Mask — defines the range of your local network
  • Default Gateway — typically your router's IP address

A typical result for a Wi-Fi connection might look like:

Wireless LAN adapter Wi-Fi: IPv4 Address. . . . . . . . . : 192.168.1.42 Subnet Mask . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . : 192.168.1.1 

Getting More Detail: ipconfig /all

For a more complete picture, use the extended flag:

ipconfig /all 

This version adds:

  • Physical Address (MAC address) — a hardware identifier unique to your network adapter
  • DHCP Enabled — whether your IP is automatically assigned or manually set
  • DNS Servers — the servers your device uses to translate domain names into IP addresses
  • Lease Obtained / Lease Expires — relevant when your IP is assigned dynamically via DHCP

This is the command to use when diagnosing network problems or documenting a system's configuration.

Why Your Output May Look Different From Someone Else's

Several variables affect what you see when you run ipconfig:

Number of adapters — A machine with both an Ethernet port and a Wi-Fi card will show entries for each. A device with VPN software or virtual machine software (like VMware or VirtualBox) may show additional virtual adapters, which can make the output look cluttered.

DHCP vs. static IP — Most home and office networks assign IP addresses automatically through DHCP (Dynamic Host Configuration Protocol). This means your IP address can change over time. If you or your IT team have set a static IP, it will remain fixed regardless of reboots or reconnections.

IPv4 vs. IPv6 availability — Depending on your router and ISP configuration, you may see both an IPv4 and an IPv6 address for the same adapter, or only one. IPv6 addresses starting with fe80:: are link-local addresses — automatically assigned and not routable beyond your local network segment.

Network type — Connected to a home router, a corporate network, a hotspot, or a direct connection? Each environment assigns addresses from different ranges and applies different rules.

Checking Connectivity at the Same Time

While you're in Command Prompt, two additional commands are commonly used alongside ipconfig:

ping — Tests whether your device can reach another address:

ping 8.8.8.8 

A successful ping returns reply times in milliseconds. No response usually indicates a connectivity problem between your machine and that destination.

nslookup — Tests DNS resolution by checking whether a domain name resolves to an IP address:

nslookup google.com 

This is useful when a website won't load but your connection appears active — it can reveal whether the issue is DNS-related.

What ipconfig Cannot Tell You 🌐

ipconfig only reports your local network IP — the address your router assigned to your device. It does not show:

  • Your public IP address (what external websites see)
  • The IP addresses of other devices on your network
  • Your network speed or signal strength

To find your public IP, you'd need to visit an IP-lookup service through a browser, or use a command-line tool like curl with an external API endpoint — a different process from ipconfig entirely.

Variables That Shape the Right Approach for You

Whether a quick ipconfig is all you need — or whether you're better served by ipconfig /all, a static IP configuration, or a more advanced network tool — depends on factors specific to your situation: the complexity of your network, whether you're troubleshooting or just checking, and how many adapters your machine is running.

Understanding what each output field means puts you in a much better position to interpret what you're seeing and decide what step makes sense next.