127.0.0.1是回送地址,指本地机,一般用来测试使用。回送地址(127.x.x.x)是本机回送地址(Loopback Address),即主机IP堆栈内部的IP地址,主要用于网络软件测试以及本地机进程间通信,无论什么程序,一旦使用回送地址发送数据,协议软件立即返回,不进行任何网络传输。 这里的测试是指本地主机的TCP/IP协议是否正常运行,并不涉及物理网卡(以前误认为是测试本地网卡是否正常),也就是说,当你ping这个地址时,不会走物理网卡。而ping物理网卡的IP时,却要经网线传出和传入,也就是说,要检测本地网卡是否正常,只要ping自己的地址就行。 需要特别注意 收到127.0.0.1的响应表示主机的ip配置正确。此响应来自网络层。但是此响应并不代表地址、掩码、和网关配置正确。它也不能说明有关网络协议族下层的任何状态。此方法只是测试网络层的ip联通性。 cisco官网原文(A response from 127.0.0.1 indicates that IP is properly installed on the host. This response comes from the Network layer. This response is not, however, an indication that the addresses, masks, or gateways are properly configured. Nor does it indicate anything about the status of the lower layer of the network stack. This simply tests IP down through the Network layer of the IP protocol. If we get an error message, it is an indication that TCP/IP is not operational on the host.)
简析127.0.0.1
最新推荐文章于 2023-07-17 09:01:35 发布