ArticleSource: http://blog.csdn.net/s_k_yliu/article/details/6676183
In the past two days, we need to verify the customer's changes. If we find that the change is not successful, we can find various reasons online.
The key to the problem is how the local machine processes the IP data packets sent to the local machine. One phenomenon is that Wireshark is used to capture packets and install an FTP server on both computers A and B. If a accesses the FTP server on the local machine, Wireshark does not display the corresponding data packets, when a accesses B's FTP server Wireshark, IP data packets will appear. How does one process IP data packets accessing the local machine in the system?
The first is about the difference between 127.0.0.1 and the local IP address.
For ping 127.0.0.1, this command does not pass through the network card. Ping the local loopback to test the TCP/IP protocol stack and then perform loopback at the IP layer of the protocol stack.
For Host IP Ping, Nic support is required. If the NIC is disabled or the network cable is unplugged, the Ping will be fail. It can be seen that this method can check whether the NIC or network works properly.
So how does this packet go?
1) The host sends packets that ping its own IP address;
2) The system tries to find the route in the FIB route table;
3) The found route entry type is rtn_local;
4) set the dev_out of the data packet to loopback_dev;
5) send data packets using the loopback interface;
According to this information, we can conclude that some services of TCP/IP require support from the NIC, but access from the local machine is,The NIC Driver determines whether the ring is returned.If the network interface is switched back, the network adapter will not send the IP packet to the Ethernet, and our packet capture tool will not be able to catch the packet.