When I visit a website (e.g. whatismyip.com) it states that my IP address is 13.151.xxx.xxx
. However, when I run ipconfig
, my IP address is 192.168.0.xx
for IPv4 and my DNS adress is 202.xx.xxx.xx
.
Why is there a difference? Also, how can I find the first IP address through the command line?
Answer
In Linux if you type ifconfig
it shows your system IP address. And in the browser if you enter www.ipaddress.com it shows your Internet connection IP address.
In your case,
192.168.0.x
--> System IP address13.151.xxx.xxx.
--->Internet connection.
Always the IP address shown in the ifconfig is the first IP address
No comments:
Post a Comment