IP Address Differences – Why Google and macOS Terminal Show Different IPs

high sierramacosNetworkterminal

I get different results for my IP when I type google "What is my IP" and when I type in macOS' terminal ifconfig |grep inet

Why are these results different on macOS version 10.13.2 High Sierra?

Best Answer

Unless your computer is directly connected to your ISP via the modem, your computer's IP address is actually assigned by your router (either provided by the ISP or yourself). The IP address you see when you go to a whatsmyip website is the public IP address that the ISP has assigned your router, which is the only IP address devices on the internet can talk to when trying to talk to a device on your network. Using a technique called Network Address Translation your router allows multiple devices (e.g. your laptop, your phone and your PlayStation) to share that single public facing IP address from your ISP among each of the devices.

Likely your devices connected to your internal network have IP addresses like 192.168.XXX.XXX or 172.16.XXX.XXX - 172.31.XXX.XXX or 10.XXX.XXX.XXX. These are Private IP addresses reserved for internal networks and are not usable on the wider internet.