How does ifconfig find a machine’s external IP address?

At new boot live cd machine:

ubuntu@ubuntu:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:1a:a0:2c:0b:7e
inet addr:192.168.0.106 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: ::e99f:70cc:edb5:ba84/64 Scope:Global
inet6 addr: ::21a:a0ff:fe2c:b7e/64 Scope:Global
inet6 addr: fe80::21a:a0ff:fe2c:b7e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:296 errors:0 dropped:0 overruns:0 frame:0
TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23978 (23.9 KB) TX bytes:8146 (8.1 KB)
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:16 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1184 (1.1 KB) TX bytes:1184 (1.1 KB)

“inet addr:192.168.0.106” is machine‚Äôs external IP address.

Leave a Reply

Your email address will not be published. Required fields are marked *