0

I am running on MacOS Majave

When issue command ip, it returns

$ ip
211.137.170.246

However, google returns an answer:

enter image description here

Which one should I trust?

2

This depends what you mean by "trust". Google will tell you the "from" address on your request. ip will tell you the address your laptop has. They may both be correct.

It is common with IPv4 to give a local IP to laptops, phones (anything that's not a server) and replace this through a NAT gateway (your home router?). That way all machines on your local network share the same external IP, but each have their own local IP.

So what you are seeing is that somewhere between you and google your connection is going through a NAT gateway. To the outside world you have 47.91.28.150. On your local network you have 211.137.170.246.

Note that some ISPs now use Carrier Grade NAT. So even if you think you're not connected to the internet via a NAT router, your ISP might still be sending traffic through a NAT.

  • 1
    It may also be a web proxy. – ctrl-alt-delor Jan 9 at 11:25
  • Yup the effect of that might be as transparent as NAT. Except it may mean traffic to port 80 and 443 show up with a different external IP to traffic bound for other ports. – Philip Couling Jan 9 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.