Private IP vs. Public IP vs. Default Gateway
When diagnosing network connectivity, port forwarding, or configuring home lab servers, you will encounter three distinct IP addresses:
- Private Local IP (Host Address): The unique address assigned specifically to your device (computer, phone, printer) on your Local Area Network (LAN), typically starting with
192.168.x.xor10.x.x.x. - Default Gateway (Router IP): The local address of your home or office router (often
192.168.1.1or10.0.0.1). When your computer sends traffic destined for the external internet, it delivers those packets to this gateway. - Public IP Address (WAN): The single external address assigned to your modem by your Internet Service Provider (ISP), visible to all remote servers on the public web.
How to Find Your IP Address in Windows 11 and Windows 10
Method A: Using Command Prompt (Fastest)
- Press
Win + R, type cmd, and press Enter. - Run the command:
ipconfig - Locate your active network adapter:
- IPv4 Address: Your local device IP (e.g.,
192.168.1.45). - Subnet Mask: Defines your local subnet boundary (e.g.,
255.255.255.0). - Default Gateway: Your router’s admin address (e.g.,
192.168.1.1).
- IPv4 Address: Your local device IP (e.g.,
Method B: Using Modern PowerShell
Open PowerShell and run:
Get-NetIPAddress -AddressFamily IPv4 | Where-Object { $_.InterfaceAlias -notlike "*Loopback*" } | Select-Object IPAddress, InterfaceAlias
Method C: Through Windows Settings GUI
- Open Settings (
Win + I). - Navigate to Network & internet.
- Click on your active connection (Wi-Fi or Ethernet).
- Click on Hardware properties to view your IPv4 address, DNS servers, and link speed.
How to Find Your IP on macOS
Via Terminal:
# For Wi-Fi:
ipconfig getifaddr en0
# For Wired Ethernet:
ipconfig getifaddr en1
# To view your Default Gateway (Router IP):
netstat -nr | grep default
Via System Settings GUI:
- Click the Apple Menu () > System Settings (or System Preferences).
- Click Network in the sidebar.
- Select your connected network (Wi-Fi or Ethernet) and click Details…
- Switch to the TCP/IP tab to inspect your IP address and router gateway.
How to Find Your IP on Linux (Ubuntu, Debian, Fedora, Arch)
Open your terminal emulator and use the modern ip utility:
# View all active IP addresses:
ip -brief address show
# Or view detailed network interface statistics:
ip addr show
# To find your default gateway router address:
ip route show default
Next Steps: Calculating Network Subnets
Once you have identified your local IP and subnet mask, use our interactive IPv4 Subnet Calculator to determine your network base address, broadcast address, and the complete pool of available host addresses on your local segment.