Ping 127.0.0.1 and the local IP address. Will the packets be sent to the Nic?

Source: Internet
Author: User

From Forum question, source: http://www.cnpaf.net/Forum/viewthread.php? Tid = 28012

Alvas:

When sending ICMP packets, what are the transmission paths of these packets? Where have they passed? What determines the choice of router and interface?

Kapiter:

Ping 127.0.0.1 and ping the local machine are different.

The IP output function first checks whether the address is a loop address:

1. If it is a loopback address, it is directly handed over to the loopback driver for processing and the IP input function is returned.

2. If it is not a loop back address, check whether it is a broadcast address or multicast address.

3. If it is not a broadcast or multicast address, check whether it is a local address. If it is a local address, submit it to the loop back driver for processing. The loop back Driver returns the IP address to the input function.

From the above we can see that the ping 127.0.0.1 packet is not through the NIC ping the local machine, it needs to pass through the NIC

ICMP packets are encapsulated in IP packets, so the selection process of router and interface is the same as that of IP packets.

Alvas:

Thx

Maoyinjie:

Ping 127.0.0.1 and ping the local machine are also not through the NIC, and are all processed by the loopback driver.

Dingcuipu8888:

LZ you can still Ping 127.0.0.1 by unplugging the network cable, but the IP address cannot be pinged. 2 # No problem

Liuyongq:

Support for second-floor

Jergolfer:

Ping 127.0.0.1 is to test whether the local machine has installed the TCP/IP protocol, and the selection of the router and interface is determined by the route table. In Windows, you can view the port through router print.

Ping 127.0.0.1 will not pass through the local Nic, of course, packet capture is not visible

Pinging the IP address of the local machine does not pass through the NIC of the local machine.

Richard Steven has a detailed analysis in volume 1, as kapiter said

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.