Arp for linux commands and arp for linux commands

Source: Internet
Author: User

Arp for linux commands and arp for linux commands
Arp commands are used to display and modify IP addresses used by the Address Resolution Protocol (ARP) 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 if] -s hostname hw_addr [temp]arp [-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pubarp [-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pubarp [-vnD] [-H type] [-i if] -f [filename]
Parameter description:
-A [hostname] Or -- display [hostname]: displays all the current ARP entries of the specified host. If no hostname is specified, all ARP entries are displayed. These ARP entries are displayed in BSD format. -D [hostname] Or -- display [hostname]: Delete the ARP entry of the host specified by hostname (root permission required ). -D or -- use-device: use the ifa hardware address interface-e: display in the default Linux style. -H type or -- hw-type or-t type: this parameter specifies to check the type address When configuring and querying arp cache. The optional parameters include ether, arcnet, pronet, ax25, and netrom. 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 ARP table of the specified host in the hostname variable. -F [filename] Or -- file [filename]: reads ARP entries from the specified file to the arp table. The format of the option 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 # Is the arp entry of the host whose IP address is 192.168.1.1 displayed? (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 ing table $ arp-a ## show all arp entries .? (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 # delete an arp table entry $ arp-? (192.168.1.1) at 1c: fa: 68: 91: f7: 34 [ether] on eth0? (192.168.1.22) at <incomplete> on eth0 # check results show that only the hardware address is deleted.


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.