Why ping 127.0.0.1 Why ping localhost the loopback address



Computer Configuration GNU Linux Fedora using Linux Command

 

   Why we ping 127.0.0.1 the loopback IP address or ping localhost?  The ping command usually use to test network connection between hosts, sometimes we use the ping command to ping 127.0.0.1 or ping localhost to test the loopback address and verify the localhost network connection function properly... make note that when we ping 127.0.0.1 or ping localhost.. we only test and verify the loopback network interface connection (network loopback software setup)... but not the local network interface hardware itself (bypass the local network interface hardware). 

 

Ping 127.0.0.1  loopback address:

Ping 127.0.0.1  loopback address

[root@fedora ~]# 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=1.00 ms

64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.262 ms

64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.178 ms

64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.165 ms

64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.161 ms

64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.181 ms

^C

--- 127.0.0.1 ping statistics ---

6 packets transmitted, 6 received, 0% packet loss, time 5658ms

rtt min/avg/max/mdev = 0.161/0.324/1.000/0.304 ms

[root@fedora ~]#

 

To stop ping command (terminate ping process), press Ctrl + c key...

 

Ping localhost loopback address:

Ping localhost loopback address

[root@fedora ~]# ping localhost

PING fedora.linux.com (127.0.0.1) 56(84) bytes of data.

64 bytes from fedora.linux.com (127.0.0.1): icmp_seq=1 ttl=64 time=0.398 ms

64 bytes from fedora.linux.com (127.0.0.1): icmp_seq=2 ttl=64 time=0.136 ms

64 bytes from fedora.linux.com (127.0.0.1): icmp_seq=3 ttl=64 time=0.135 ms

64 bytes from fedora.linux.com (127.0.0.1): icmp_seq=4 ttl=64 time=0.132 ms

64 bytes from fedora.linux.com (127.0.0.1): icmp_seq=5 ttl=64 time=0.153 ms

64 bytes from fedora.linux.com (127.0.0.1): icmp_seq=6 ttl=64 time=0.136 ms

64 bytes from fedora.linux.com (127.0.0.1): icmp_seq=7 ttl=64 time=0.134 ms

^C

--- fedora.linux.com ping statistics ---

7 packets transmitted, 7 received, 0% packet loss, time 6286ms

rtt min/avg/max/mdev = 0.132/0.174/0.398/0.092 ms

[root@fedora ~]#

 

To stop ping command (terminate ping process), press Ctrl + c key...

read more at wiki...

 




0 comments: