What is ARP? ARP is an important TCP/IP protocol and is used to determine the physical IP address (MAC address) of the NIC ). Using the arp command, we can view the current content in the ARp cache of the local computer or another computer. In addition, you can manually enter static physical/IP addresses of NICs 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.
However, the MAC address can only be used in the local network. If there is a sub-router in our LAN, all the machines under this router will access this lan, the physical IP address of the machine's Nic is replaced by the MAC address of the router.
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.
If we have multiple NICs, arp-a will display the ARP cache of the two NICs.
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.
This is the basic command. Each packet will send the MAC address to the ARP high-speed cache. In this case, the ARP attacker will not appear.