The command line: ipconfig
Press Windows+X and pick Terminal, then type:
ipconfig
Output for the adapter you care about looks like this:
Wireless LAN adapter Wi-Fi:
Connection-specific DNS Suffix . : lan
IPv6 Address. . . . . . . . . . . : 2001:db8:1234:5678:a1b2:c3d4:e5f6:7890
Temporary IPv6 Address. . . . . . : 2001:db8:1234:5678:9f8e:7d6c:5b4a:3928
Link-local IPv6 Address . . . . . : fe80::a1b2:c3d4:e5f6:7890%12
IPv4 Address. . . . . . . . . . . : 192.168.1.47
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
IPv4 Address is your machine. Default Gateway is your router. The fe80:: line is link-local and appears on every IPv6 interface by design, per RFC 4291.
For DHCP server, lease dates, MAC address, and DNS servers:
ipconfig /all
Two more that solve most local problems:
ipconfig /release
ipconfig /renew
ipconfig /flushdns
The GUI in Windows 11
- Settings, then Network & internet.
- Click Wi-Fi or Ethernet depending on how you are connected.
- Click the network name to open its properties page.
- Scroll to the bottom. IPv4 address, IPv4 DNS servers, IPv6 address, and Physical address (MAC) are listed there, with a Copy button for the whole block.
The IP assignment row on that page tells you whether the address came from DHCP (Automatic) or was set by hand. Edit next to it is where you set a static address.
PowerShell, for scripts and filtering
Get-NetIPAddress -AddressFamily IPv4 |
Where-Object { $_.InterfaceAlias -notlike 'Loopback*' } |
Select-Object InterfaceAlias, IPAddress, PrefixLength
Get-NetIPConfiguration gives a per-adapter summary with the gateway and DNS servers in one view:
Get-NetIPConfiguration -Detailed
To pull just the address of the interface that carries your default route:
(Get-NetIPConfiguration | Where-Object { $_.IPv4DefaultGateway }).IPv4Address.IPAddress
Private address versus public address
Anything ipconfig reports starting with 192.168., 10., or 172.16 through 172.31 is private, reserved by RFC 1918 for use inside one network. Websites never see it. They see your router’s public address, which is what whatsmyip.fyi shows and what the full report breaks down into ISP, ASN, and approximate location. The public vs private guide covers the difference.
From the terminal:
curl.exe whatsmyip.fyi
curl.exe -4 https://v4.whatsmyip.fyi/ip
curl.exe -6 https://v6.whatsmyip.fyi/ip
Or in PowerShell:
Invoke-RestMethod https://whatsmyip.fyi/json
Windows has shipped curl.exe since Windows 10 build 1803, so no install is needed. The .exe matters: bare curl in Windows PowerShell resolves to the Invoke-WebRequest alias and rejects curl’s flags.
When the address looks wrong
169.254.x.x means DHCP failed and Windows self-assigned an APIPA address under RFC 3927. The adapter is up but the router never answered. Run ipconfig /release then ipconfig /renew, then check the cable or the Wi-Fi association.
No IPv4 address at all on an otherwise working adapter usually means a VPN client is holding the route. Check the adapter list in ipconfig /all for a TAP or WireGuard entry.
Two adapters with addresses is normal when a VPN is connected or when WSL and Hyper-V are installed. The one that matters is the adapter listed with a Default Gateway.
An address starting with 100.64 through 100.127 on the router’s WAN side is carrier-grade NAT, defined in RFC 6598. Port forwarding will not work through it.
Next
Need the router’s admin page? The Default Gateway line above is the address to type into a browser. The find your router’s IP guide covers the other platforms and the common defaults.
Questions people ask
- Why does ipconfig list so many adapters?
- Windows shows every adapter, including disconnected ones and virtual adapters created by VPN clients, Hyper-V, VirtualBox, and WSL. Adapters with Media disconnected have no address. Read the one named Wi-Fi or Ethernet.
- What is the difference between ipconfig and ipconfig /all?
- ipconfig prints the address, subnet mask, and gateway. ipconfig /all adds the MAC address, DHCP server, lease times, DNS servers, and hostname.
- Why does curl not work in PowerShell?
- In Windows PowerShell, curl is an alias for Invoke-WebRequest, which takes different arguments. Call curl.exe explicitly, or use Invoke-RestMethod https://whatsmyip.fyi/json.
Related
Last reviewed 2026-09-04. Reviewed quarterly, or sooner when a vendor changes something.