Open Command Prompt and run ipconfig

The fastest way to find your IP address is to open Command Prompt and type a single command. Press the Windows key, type cmd, and press Enter. A black window will open.

Type ipconfig and press Enter. Command Prompt will display a list of network adapters on your computer. Look for the section labeled with your active connection — usually Ethernet if you are plugged in with a cable, or Wireless LAN adapter if you are on Wi-Fi.

Your IPv4 Address is the number you need. It will look something like 192.168.1.50 or 10.0.0.25. This is your local IP address — the one your router assigned to your device on your home network.

Key Takeaways

  • Type ipconfig in Command Prompt to see all network adapters and their IP addresses in seconds.
  • Your IPv4 Address is your local IP — the one your router uses to identify your device on your home network.
  • The Default Gateway listed in ipconfig output is your router's IP address, useful if you need to log into your router settings.
  • If you see multiple network adapters, find the one with a status that matches how you are connected (Ethernet or Wi-Fi).

Understanding what ipconfig shows you

When you run ipconfig, you see more than just your IP address. The output includes several pieces of information about each network adapter on your computer.

IPv4 Address is what you are looking for — your local address on the network. Subnet Mask tells your computer which other devices are on the same network segment. Default Gateway is your router's IP address, usually 192.168.1.1 or 192.168.0.1. If you ever need to change your Wi-Fi password or port forwarding settings, you log into your router using this address.

You may also see IPv6 Address listed. This is a newer format for IP addresses, but most home networks still use IPv4 for everyday devices. You can ignore IPv6 unless you are specifically troubleshooting an IPv6 connection.

Finding your public IP address instead

Your local IP address (the one ipconfig shows) is only visible to devices on your home network. If you need your public IP address — the one the internet sees when you browse — Command Prompt cannot show you that directly.

To find your public IP, open a web browser and search "what is my IP" or visit a site like whatismyipaddress.com. The number displayed is what websites and online services see when you connect to them. Your router handles the translation between your local IP and your public IP automatically.

Your public IP changes periodically unless your internet provider has assigned you a static IP (which most home users do not have). Your local IP on your home network stays the same until you manually change it or your router restarts and reassigns addresses.

Using ipconfig /all for detailed network information

If you need more detail than the basic ipconfig command provides, type ipconfig /all instead. This shows every piece of information about your network adapters, including your MAC address (also called physical address), DHCP server, and DNS servers.

Your MAC address is a unique identifier for your network card — useful if you are setting up MAC address filtering on your router or troubleshooting why a device will not connect. DHCP Server shows the IP address of the device handing out local addresses on your network, usually your router. DNS Servers are the addresses your computer uses to translate website names into IP addresses.

Most home users never need this level of detail, but it becomes important if you are diagnosing connection problems or configuring advanced network settings.

Checking if your local IP is static or dynamic

Your router can assign your computer a local IP address in two ways: dynamically (a new one each time you restart) or statically (the same one every time). For most home devices, dynamic assignment through DHCP is the default and works fine.

If you are setting up a device that needs a consistent address — like a network printer, security camera, or game console — you may want to assign it a static local IP. You do this in your router settings, not in Command Prompt. Log into your router using the Default Gateway address from ipconfig, find the DHCP or Local Network settings, and reserve an IP for that device's MAC address.

Checking ipconfig once will not tell you whether your address is static or dynamic. If you run ipconfig multiple times over several days and the IPv4 Address stays the same, it is likely static. If it changes, your router is assigning it dynamically.

Troubleshooting when ipconfig does not show an address

If you run ipconfig and see "Media disconnected" or no IPv4 Address listed, your computer is not connected to the network. Check that your Ethernet cable is plugged in or that you are connected to your Wi-Fi network.

If you are on Wi-Fi and ipconfig shows a connection but no IPv4 Address, try disconnecting and reconnecting to your network. Open your Wi-Fi settings, forget the network, then reconnect and re-enter your password. Run ipconfig again after reconnecting.

If the problem persists, restart your router by unplugging it for 30 seconds, then plugging it back in. Wait two minutes for it to fully boot, then try connecting again. Most connection problems clear up after a router restart.

Other Command Prompt commands for network troubleshooting

Once you know your IP address, you can use other Command Prompt commands to test your network. ping followed by an IP address or website name tests whether your computer can reach that destination. For example, type ping 8.8.8.8 to test your connection to Google's public DNS server, or ping google.com to test both your connection and your DNS setup.

tracert (trace route) shows the path your data takes to reach a destination, useful if a website is slow or unreachable. Type tracert google.com to see each hop your connection makes.

netstat shows active network connections and which programs are using your network. Type netstat -an to see all connections, or netstat -b to see which programs opened them. These commands help you spot unexpected network activity or diagnose why your connection is slow.

Frequently Asked Questions

What is the difference between my local IP and my public IP?

Your local IP (from ipconfig) is only visible to devices on your home network. Your public IP is what the internet sees and is assigned by your internet provider. Your router translates between them automatically.

Will my IP address change if I restart my computer?

Your local IP may change if your router uses dynamic DHCP assignment, though it often stays the same if you restart quickly. Your public IP may change after several hours or days of being offline, depending on your provider's policy.

Can I change my local IP address from Command Prompt?

No. You can view your IP in Command Prompt, but to change it you must either configure your router to assign a static address to your device, or change your network settings in Windows Settings under Network and Internet.

Why do I see multiple IP addresses in ipconfig output?

You likely have multiple network adapters — for example, both Ethernet and Wi-Fi. Only the adapter you are actively using to connect to the network will have an active IPv4 Address. The others will show "Media disconnected."

Is my local IP address private and safe to share?

Your local IP is only useful to devices already on your home network, so sharing it online is not a security risk. Your public IP is more sensitive — it can be used to locate your general geographic area, though not your exact address.