2019.9.29 native ip, localhost, 127.0.0.1

Original link: https://zhidao.baidu.com/question/1176120779058268299.html

1, localhost equal to 127.0.0.1, but the domain name is localhost, 127.0.0.1 is the IP address.

2, localhost 127.0.0.1 and does not require networking, are the local access.

2, the local IP networking needs, this machine is the machine IP or external access, local IP is the IP address of the machine to access the external release, the URL is bound to the physical network adapter IP address.

When the operating system initialization native TCP / IP protocol stack, the protocol stack provided own IP address is 127.0.0.1 (reserved addresses), and injected into the routing table.

When receiving the IP layer destination address is 127.0.0.1 (to be exact: the IP network number of 127) when a packet, the network card driver does not call for the second package, but is immediately forwarded to the local IP layer processing, because it does not involve the underlying operations.

Thus, as a general test ping 127.0.0.1 native TCP / IP stack is normal or not one of the determination.

Guess you like

Origin www.cnblogs.com/WildSky/p/11617749.html