How do you ping a loopback address?

A loopback address is a distinct reserved IP address range that starts from 127.0.0.0 ends at 127.255.255.255 though 127.255.255.255 is the broadcast address for 127.0.0.0/8. The loopback addresses are built into the IP domain system, enabling devices to transmit and receive the data packets. The loopback address 127.0.0.1 is generally known as localhost.

TCP/IP protocol manages all the loopback addresses in the operating system. It mocks the TCP/IP server or TCP/IP client on the same system. These loopback addresses are always accessible so that the user can use them anytime for troubleshooting TCP/IP.

Whenever a protocol or program sends any data from a computer with any loopback IP address, that traffic is processed by a TCP/IP protocol stack within itself, i.e., without transmitting it to the network. That is, if a user is pinging a loopback address, they’ll get the reply from the same TCP/IP stack running on their computer.  So, all the data transmitted to any of the loopback addresses as the destination address will not pop up on the network.

127.0.0.1 is the most commonly used loopback address; generally, 127.0.0.1 and localhost are functionally similar, i.e., the loopback address 127.0.0.1 and the hostname localhost; are internally mapped. Though, other loopback addresses are also accessible and can be used. 

IPv4 and IPv6 Loopback Addresses:

  • The IPv4 loopback address is 127.0.0.0/8 and the most commonly used loopback address is 127.0.0.1.
  • The IPv6 loopback address is ::1

How to use the “ping” Command:

  • To use the “ping” command go to the windows start menu.
  • Search for “Command prompt”.
  • Type in “ping” followed by the loopback address. and,
  • Hit enter.

For example, as can be seen below, the outputs of four different IPv4 loopback addresses [127.0.0.0, 127.0.0.1, 127.15.90.69, and 127.255.255.255] the network and broadcast addresses are unreachable loopback addresses and IPv6 loopback address ::1.

ping output for 127.0.0.0 [Network address].

C:\Users\bklad>ping 127.0.0.0

Pinging 127.0.0.0 with 32 bytes of data:
General failure.
General failure.
General failure.
General failure.

Ping statistics for 127.0.0.0:
   Packets: Sent = 4, Received = 0, Lost = 4 [100% loss],

ping output for 127.0.0.1

C:\Users\bklad>ping 127.0.0.1

Pinging 127.0.0.1 with 32 bytes of data:
Reply from 127.0.0.1: bytes=32 time

Chủ Đề