ip address show
Code:
ip address show Code:
1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever IPv4: ? 117.205.235.222 Why is it different? i think 192.168.x.x is a private ip How do i find my real/public ip address i am using fedora |
Quote:
|
If I understand what you are asking, go here: http://checkip.dyndns.org/
Forgot, this should work also where comcast.net is your Internet provider Code:
traceroute -m 2 comcast.net |
From the link you gave me, the public ip address is : "117.205.235.222"
From traceroute Code:
1 _gateway (192.168.1.1) 0.416 ms 0.452 ms 0.586 ms Why am i not able to see my public ip address from "ip a" command? Apart from traceroute, is there any command which can give my public ip? i am not going to do this on my desktop, just asking... If i edit /etc/hosts and resolv.conf, then will "ip a" show the public ip? |
Quote:
Code:
$ curl ifconfig.me/ip |
Quote:
You can find out what it is without logging into your router by going to https://www.whatismyip.com/. |
<internet>-----117.205.232.1<WAN router LAN 192.168.1.1>------<192.168.1.102 PC>
The ip command shows addresses that are assigned to the PC itself. The router/gateway device has two IP addresses. The WAN or internet side is your public IP address, the LAN side is a private IP address. Your PC address is typically assigned by the router using DHCP which in your case is 192.168.1.102. The gateway addresses is typically the LAN IP address of your router which in your case is 192.168.1.1 |
|
my 2 cents:
Internet or let's say Public network >> needs Public IP Home or Internal network >> only needs Private IP However, since Private IP is not able to communicate to Internet and the only acceptable IP on the Internet is Public IP That's where NAT'ing comes into play, to save IPv4 from running out. To find your public IP as suggested above you can open Terminal and type: curl ifconfig.me/ip curl ipinfo.io/ip wget -qO- https://api.ipify.org Quote:
|
Thanks a lot friends. I understood the concept and understood how silly my question was now! :-)
|
Quote:
|
All times are GMT -5. The time now is 08:52 AM. |