ifconfig
's output:
$ ifconfig
enp4s0f1 Link encap:Ethernet HWaddr f8:32:e4:d3:a1:4e
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
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:4834 errors:0 dropped:0 overruns:0 frame:0
TX packets:4834 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:381278 (381.2 KB) TX bytes:381278 (381.2 KB)
wlp3s0 Link encap:Ethernet HWaddr 80:a5:89:0d:0d:69
inet addr:192.168.1.34 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::560a:df95:1d4f:120d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:44489 errors:0 dropped:0 overruns:0 frame:0
TX packets:48510 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29226622 (29.2 MB) TX bytes:6653647 (6.6 MB)
I have loopback interface but when i see my routing table :
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 600 0 0 wlp3s0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp3s0
192.168.1.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp3s0
There is not any enry for routing 127.x.x.x
.
but how can i ping them?
$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.019 ms
....
Loopback address does not need routing, because packets addressed to loopback interface do not leave interface, they are not passed to data link layer.