Open Command Prompt and run ipconfig
The fastest way to see 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, each with an IP address next to "IPv4 Address". This is your local IP address — the one your router assigned to your device.
If you have multiple network adapters (for example, both Wi-Fi and Ethernet), you will see an entry for each one. Look for the adapter you are actually using. If you are connected by Wi-Fi, find the section labeled "Wireless LAN adapter" or "Wi-Fi". If you are plugged in with a cable, find "Ethernet adapter".
Key Takeaways
- Type ipconfig in Command Prompt to see your local IP address, which is assigned by your router and starts with 192.168, 10.0, or 172.16.
- Type ipconfig /all to see additional details including your MAC address, DNS servers, and DHCP lease information.
- Your local IP address is different from your public IP address — the local one is only visible inside your home or office network.
- If you need your public IP address instead, use ipconfig to find your local address, then visit a website like whatismyipaddress.com to see the address the internet sees.
Understanding local versus public IP addresses
The IP address that ipconfig shows you is your local IP address. It is assigned by your router and is only visible to devices on your home or office network. It typically starts with 192.168, 10.0, or 172.16.
Your public IP address is different. It is assigned by your internet service provider and is the address that websites and services on the internet see when you connect to them. You cannot see your public IP address using ipconfig alone. To find it, you would need to visit a website that displays it, such as whatismyipaddress.com or icanhazip.com.
Most people need their local IP address when troubleshooting network problems, connecting to a printer on their network, or accessing a device remotely from inside their home network. You need your public IP address much less often — mainly if you are setting up remote access from outside your network or reporting a connection issue to your internet service provider.
Get more details with ipconfig /all
If you need more information than the basic ipconfig command provides, type ipconfig /all and press Enter. This shows additional details for each network adapter, including your MAC address (also called a physical address), your DNS servers, your DHCP server, and when your IP address lease expires.
The MAC address is a unique identifier for your network adapter. You might need it if you are setting up MAC filtering on your router, registering a device on a network, or troubleshooting connection problems with your internet service provider.
The DNS servers listed are the computers that translate website names (like google.com) into IP addresses. Most people use their router's default DNS servers, but some change them to use a different provider like Google DNS or Cloudflare DNS.
Renew or release your IP address
If your computer is not connecting to the network properly, you can use Command Prompt to release your current IP address and request a new one from your router. Type ipconfig /release and press Enter, then type ipconfig /renew and press Enter.
This tells your router to forget the IP address it assigned to you and give you a new one. It usually takes a few seconds. After you run ipconfig /renew, type ipconfig again to confirm that you have a new IP address.
Releasing and renewing your IP address can fix connection problems caused by a stale or conflicting address. It is one of the first troubleshooting steps to try if your internet is not working but your router appears to be on and connected.
Run Command Prompt as administrator if commands do not work
Most ipconfig commands work in a regular Command Prompt window, but some require administrator privileges. If you type a command and get an error message, close Command Prompt and open it again as administrator.
Press the Windows key, type cmd, right-click on "Command Prompt", and select "Run as administrator". Windows will ask for permission — click "Yes". Now you can run any ipconfig command without errors.
Other useful ipconfig commands
ipconfig /flushdns clears your computer's DNS cache. This can fix problems where a website name is not resolving to the correct IP address, or where you changed your DNS servers but your computer is still using the old ones.
ipconfig /displaydns shows all the website names and IP addresses your computer has looked up recently. This is useful if you want to see which sites your computer has connected to, or if you are troubleshooting a DNS problem and want to see what your computer thinks a domain name resolves to.
ipconfig /? displays a full list of all available ipconfig commands and what each one does. If you need to do something specific with your network configuration and are not sure which command to use, this will show you all the options.
Frequently Asked Questions
What is the difference between ipconfig and ipconfig /all?
ipconfig shows your IP address, subnet mask, and default gateway for each network adapter. ipconfig /all shows those same details plus your MAC address, DNS servers, DHCP server, and lease expiration time. Use ipconfig for quick information and ipconfig /all when you need complete network details.
Why does my IP address start with 169.169?
An IP address starting with 169.169 means your computer could not reach your DHCP server (usually your router) to request an IP address, so Windows assigned itself a temporary one. This usually means your network cable is unplugged, your Wi-Fi is not connected, or your router is not working. Try reconnecting to your network or restarting your router.
Can I change my IP address using ipconfig?
You can release and renew your IP address using ipconfig /release and ipconfig /renew, which will usually give you a different address from your router. To set a specific IP address, you need to change your network settings in Windows itself, not through Command Prompt.
Is my local IP address private and safe to share?
Your local IP address is only visible inside your home or office network, so it is safe to share. Your public IP address can identify your location and internet service provider, so you should not share it publicly unless necessary. If someone asks for your IP address to help with a technical problem, ask them to clarify whether they need your local or public address.