ARP for the Linux command

Source: Internet
Author: User

the ARP command is primarily used to display and modify the Address Resolution Protocol (ARP) used by the IP address to the Ethernet MAC (Ethernet Physical Address) conversion table.
ARP syntax format:
ARP [-EVN] [-H type] [-I if]-a [hostname]arp [-v] [-i if]-d [hostname] [pub]arp [-v] [-H type] [-i]-s hostname hw_ad Dr [Temp]arp [-v] [-H type] [-i if]-s hostname hw_addr [netmask nm] pubarp [-v] [-H type] [i if]-ds hostname IFA [NETMA SK NM] pubarp [-VND] [-H type] [-i]-f [filename]
Parameter description:
-a [hostname] or--display [hostname]: Displays all current ARP entries for the specified host. When hostname is not specified, all ARP entries are displayed. These ARP entries are shown in BSD style. -d [hostname] or--display [hostname]: Deletes the ARP entry for the specified host (requires root permission). -D or--use-device  : Use the IFA hardware address interface-E: Shown in the default Linux style. -H type or--hw-type type or-t type: When setting up and querying the ARP cache, this parameter specifies that the type address be checked. The optional options for this parameter include ether, Arcnet, pronet, ax25, Netrom, and the default value is ether. -I If or--device if: Select an interface. -s hostname hw_addr or--set hostname: Manually append an ARP entry to the hostname variable to specify the host's ARP table. -f [filename] or--file [filename]: reads the ARP entry into the ARP table from the file being developed. The format of the options in this file is hostname eth_addr. -N: Displayed as a digital address. -V: Displays detailed information about the command execution process.

Example:
$ arp-a 192.168.1.1 # #显示IP为192 ARP entry for the 168.1.1 host?  (192.168.1.1) at 1c:fa:68:91:f7:33 [ether] on eth0$ arp-s 192.168.1.22 00:11:22:33:44:55 # # Add an entry to the ARP mapping table $ arp-a  # All ARP entries are displayed. (192.168.1.1) at 1c:fa:68:91:f7:34 [ether] on eth0? (192.168.1.22) at 00:11:22:33:44:55 [ether] PERM on eth0$ arp-d 192.168.1.22  # #删除一个arp表项 $ arp-a? (192.168.1.1) at 1c:fa:68:91:f7:34 [ether] on eth0? (192.168.1.22) at <incomplete> on eth0## check results found only removed hardware address


ARP for the Linux command

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.