![]() ![]() This gives us the same experience that a normal user gets when connecting from their browser. For example, we can test a web server running on our machine by connecting from a browser to the loopback IP address and the web server port. The loopback interface can also be used by services and applications to communicate with each other on the same machine. Here we verified that our network stack has no issues because we got a reply, and the traffic actually never left the machine. If there’s a reply, it means that the TCP/IP stack is working fine and able to process packets: $ ping localhost ![]() This can help in troubleshooting scenarios where we want to isolate and identify if a network issue is caused by an internal problem inside the machine network stack itself.įor example, we can try to ping the localhost and verify if there’s a reply or not. However, because the loopback interface is only an internal virtual interface with no physical hardware, the machine can use it anytime to communicate with itself. Here we can see a mapping between the localhost hostname and the loopback IP address 127.0.0.1. We can verify this by checking the hosts file: $ cat /etc/hosts There’s also a hostname localhost assigned to this IP address by default. We can see that the lo interface has an IP address of 127.0.0.1, with a netmask 255.0.0.0, which is equivalent to /8. In this case i cant ping from pc to router and from router to pc. The eth0 is a physical ethernet interface, and the lo is our loopback interface. ip address my network card - 192.168.178.31 255.255.255.0. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 So let’s check the details of this interface using the ifconfig command: $ ifconfig ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |