Network-commands/arp

From aldeid
Jump to: navigation, search
VoirAussi.png
You might also see: Page in French Protocole:ARP

Description

Manipulates the system ARP cache.

Compatibility

Lin-logo.png Win-logo.png

Usage

  • arp [-vn] [-H type] [-i if] -a [nom_hôte]
  • arp [-v] [-i if] -d nom_hôte [pub]
  • arp [-v] [-H type] [-i if] -s nom_hôte hw_addr [temp]
  • arp [-v] [-H type] [-i if] -s nom_hôte hw_addr [netmask nm] pub
  • arp [-v] [-H type] [-i if] -Ds nom_hôte ifa [netmask nm] pub
  • arp [-vnD] [-H type] [-i if] -f nom_fichier

Options

-a [hostname], --display [hostname]
Shows the entries of the specified hosts. If no hostname is specified, all entries will be displayed.
-d hostname, --delete hostname
Removes any entry for the specified host. This can be used if the indicated host is brought down, for example.
-D, --use-device
Uses the interface ifa's hardware address.
-f filename, --file filename
Smilar to the -s option, only this time the address info is taken from file filename set up. The name of the data file is very often /etc/ethers, but this is not official. If no filename is specified /etc/ethers is used as default. The format of the file is simple; it only contains ASCII text lines with a hostname, and a hardware address separated by whitespace. Additionally the pub, temp and netmask flags can be used.
-H type, --hw-type type
When setting or reading the ARP cache, this optional parameter tells arp which class of entries it should check for. The default value of this parameter is ether (i.e. hardware code 0x01 for IEEE 802.3 10Mbps Ethernet).
Other values might include network technologies such as ARCnet (arcnet), PROnet (pronet), AX.25 (ax25) and NET/ROM (netrom).
-i If, --device If
Selects an interface. When dumping the ARP cache only entries matching the specified interface will be printed. When setting a permanent or temp ARP entry this interface will be associated with the entry; if this option is not used, the kernel will guess based on the routing table. For pub entries the specified interface is the interface on which ARP requests will be answered.
NOTE: This has to be different from the interface to which the IP datagrams will be routed.
-n, --numeric
Displays numeric addresses instead of trying to resolve hostnames and ports
-s hostname hw_addr, --set hostname hw_addr
Manually creates an ARP address mapping entry for host hostname with hardware address set to hw_addr class, but for most classes one can assume that the usual presentation can be used.
-v, --verbose
Verbose mode.

Example

# arp
Address                  HWtype  HWaddress           Flags Mask            Iface
192.168.1.4              ether   00:10:20:30:40:50   C                     eth1
192.168.1.5              ether   00:11:21:31:41:51   C                     eth1
WANConnectionDevice.hom  ether   00:12:22:32:42:52   C                     eth0
192.168.1.3              ether   00:13:23:33:51:18   C                     eth1
192.168.1.1              ether   90:14:24:34:47:19   C                     eth1
192.168.1.5              ether   00:15:25:35:5b:40   C                     eth1

Comments

Talk:Network-commands/arp