ARP cache update delay on Windows 7 cannot be connected after IP address modification solution

Source: Internet
Author: User

During development, some tools can modify IP addresses of other devices.

You can modify an IP address by using the following methods: 1) connecting IP address A to modifying IP address B; 2) connecting IP address A to modifying IP address.

Both methods involve ARP cache updates.

ARP (Address Resolution Protocol) is a Protocol used to connect the IP layer and the physical layer. ARP is used to convert the IP Address of the network layer to the MAC Address of the link layer, because the link layer finally sends data packets through the MAC address.

For more information about Layer 7 OSI and various protocols between them, see OSI Model.

At the same implementation level, ARP tables are cached to record the associations between IP addresses accessed by the machine and MAC addresses. When an application at the network layer sends packets to an IP address, the system API will use the ARP protocol to convert the IP address to the MAC address and then send it out.

ARP caches packets for efficiency. If you search for the ing between IP addresses and MAC addresses every time a packet is sent, the performance consumption is high.

Therefore, ARP is cached at the operating system level, and then refreshed through its own mechanism.

The problem we encountered is that the Windows machine is connected to A device, and our tool runs on Windows to modify the IP address of the device and change the IP address from A to B.

After the modification, we can ping the B IP address and find that the IP address cannot be pinged immediately. It takes nearly one minute to ping the IP address.

Here, the ARP on Widnwos7 is cached in the moles, because the arp cache records the ing between the previous IP address A and the MAC address of the NIC of the device, now, ping IP address B can be pinged. Because the IP address does not exist in the ARP cache on windows machines, refresh the ARP cache.

However, it seems that there is no such mechanism on Windows 7. It seems that the system must wait until the ARP cache is refreshed.

Then we manually execute arp-d IP_ADDR, delete the old arp record, and ping it again.

Isn't this until it counts as a Windows 7 bug? Because there is no such problem on XP.

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.