ARP command details

Source: Internet
Author: User

ARP is an important TCP/IP protocol used to determine the physical IP address of the NIC. The practical ARP command allows us to view the current content in the ARP cache of a local computer or another computer. In addition, you can manually enter static Nic physical/IP address pairs using ARP commands. We may use this method for common hosts such as the default gateway and local server, this helps reduce the amount of information on the network.

According to the default settings, items in the ARP high-speed cache are dynamic. ARP automatically adds a project whenever a datagram from a specified location is sent and the current project does not exist in the cache. Once the cached items are input, they begin to become invalid. For example, in a Windows NT/2000 network, if you do not enter a project for further use, the physical/IP address pair will expire within 2 to 10 minutes. Therefore, if there are few or no items in the ARP cache at all, do not be surprised. You can add them by using the ping command of another computer or router. Therefore, when you need to use the ARP command to view the content in the cache, you 'd better ping this computer first (not the Ping Command sent from the local machine ).

Common ARP Command Options:
· ARP-A or ARP-G
View all items in the cache. The results of the-A and-G parameters are the same. For many years,-G has been the option used on UNIX platforms to display all items in the ARP cache, windows uses ARP-A (-A can be regarded as all, that is, all), but it can also accept more traditional-G options.

· ARP-A IP
If we have multiple NICs, we can use the IP address of the ARP-A interface to display only the ARP cache items related to this interface.

· Physical ARP-s IP Address
We can manually enter a static project into the ARP cache. The project remains valid during the computer boot process, or when an error occurs, the manually configured physical address automatically updates the project.

· ARP-D IP
Use this command to manually delete a static project.

For example, at the command prompt, type ARP-A. If we use the ping command to test and verify the connectivity from this computer to the host whose IP address is 10.0.0.99, the ARP cache displays the following items:
Interface: 10.0.0.1 on interface 0x1
Internet address physical address type
10.0.0.99 00-e0-98-00-7c-dc dynamic

In this example, the cache item indicates that the remote host located in 10.0.0.99 is resolved to the Media Access Control Address of 00-e0-98-00-7c-dc, which is allocated in the NIC hardware of the remote computer. The Media Access Control Address is the address used by the computer to communicate with the remote TCP/IP host on the network.

Now we can use the ipconfig and ping commands to view our network configurations and determine if they are correct. We can use netstat to view the connections established between others and us and find out the IP addresses hidden by ICQ users, you can use ARP to view the MAC address of the NIC.

 

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.