1.\" $OpenBSD: arp.8,v 1.39 2016/04/05 18:18:42 jca Exp $ 2.\" $NetBSD: arp.8,v 1.7 1995/03/01 11:50:59 chopps Exp $ 3.\" 4.\" Copyright (c) 1985, 1991, 1993 5.\" The Regents of the University of California. All rights reserved. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions 9.\" are met: 10.\" 1. Redistributions of source code must retain the above copyright 11.\" notice, this list of conditions and the following disclaimer. 12.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" notice, this list of conditions and the following disclaimer in the 14.\" documentation and/or other materials provided with the distribution. 15.\" 3. Neither the name of the University nor the names of its contributors 16.\" may be used to endorse or promote products derived from this software 17.\" without specific prior written permission. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" from: @(#)arp.8 8.1 (Berkeley) 6/6/93 32.\" 33.Dd $Mdocdate: April 5 2016 $ 34.Dt ARP 8 35.Os 36.Sh NAME 37.Nm arp 38.Nd address resolution display and control 39.Sh SYNOPSIS 40.Nm arp 41.Op Fl adn 42.Op Fl V Ar rdomain 43.Ar hostname 44.Nm arp 45.Op Fl F 46.Op Fl f Ar file 47.Op Fl V Ar rdomain 48.Fl s Ar hostname ether_addr 49.Op Cm temp | permanent 50.Op Cm pub 51.Nm 52.Fl W Ar ether_addr Op Ar iface 53.Sh DESCRIPTION 54The 55.Nm 56program displays and modifies the Internet-to-Ethernet address translation 57tables used by the address resolution protocol (ARP). 58.Pp 59.Nm 60displays the current ARP entry for 61.Ar hostname 62when no optional parameters are supplied. 63.Ar hostname 64may be specified by name or by number, 65using Internet dot notation. 66.Pp 67.Nm 68can also be used to send Wake on LAN (WoL) frames over a local 69Ethernet network to one or more hosts using their link layer (hardware) 70addresses. 71WoL functionality is generally enabled in a machine's BIOS 72and can be used to power on machines from a remote system without 73having physical access to them. 74.Pp 75The options are as follows: 76.Bl -tag -width Ds 77.It Fl a 78Display all of the current ARP entries. 79See also the 80.Fl d 81option below. 82The following information will be printed: 83.Bl -tag -width Ds -offset 3n 84.It Host 85The network address of the host. 86.It Ethernet Address 87The Ethernet address of the host. 88If the address is not available, 89it will be displayed as 90.Dq (incomplete) . 91.It Netif 92The network interface associated with the ARP entry. 93.It Expire 94The time until expiry of the entry. 95If the entry is marked 96.Dq permanent 97or 98.Dq static , 99it will never expire. 100.It Flags 101Flags on the ARP entry, in a single letter. 102They are: local 103.Pq Sq l 104and published 105.Pq Sq p . 106.El 107.It Fl d 108Delete an entry for the host called 109.Ar hostname . 110Alternatively, the 111.Fl d 112flag may be combined with the 113.Fl a 114flag to delete all entries, with hostname lookups automatically 115disabled. 116Only the superuser may delete entries. 117.It Fl F 118Force existing entries for the given host to be overwritten 119(only relevant to the 120.Fl f 121and 122.Fl s 123options). 124.It Fl f Ar file 125Process entries from 126.Ar file 127to be set in the ARP tables. 128See the 129.Fl s 130option for a description of the file format and the effect of the 131.Fl F 132option. 133.It Fl n 134Show network addresses as numbers (normally 135.Nm 136attempts to display addresses symbolically). 137.It Xo 138.Fl s Ar hostname ether_addr 139.Op Cm temp | permanent 140.Op Cm pub 141.Xc 142Create an ARP entry for the host called 143.Ar hostname 144with the Ethernet address 145.Ar ether_addr . 146The Ethernet address is given as six hexadecimal bytes separated by 147colons. 148The entry will be static (will not time out) unless the word 149.Cm temp 150is given in the command. 151A static ARP entry can be overwritten by network traffic, unless the word 152.Cm permanent 153is given. 154If the word 155.Cm pub 156is given, the entry will be 157.Dq published ; 158that is, this system will act as an ARP server, 159responding to requests for 160.Ar hostname 161even though the host address is not its own. 162This behavior has traditionally been called 163.Em proxy ARP . 164.Pp 165If the entry already exists for the given host, it will not 166be replaced unless 167.Fl F 168is given. 169.It Fl V Ar rdomain 170Select the routing domain. 171.It Fl W Ar ether_addr Op Ar iface 172Send the Wake on LAN frame from all interfaces on the local machine 173that are up, if 174.Ar iface 175has not been specified. 176Otherwise the frame will be sent from 177.Ar iface . 178.Ar ether_addr 179is the Ethernet address of the remote machine or a hostname entry in 180.Pa /etc/ethers . 181This option cannot be used in combination with any other option. 182.El 183.Sh FILES 184.Bl -tag -width "/etc/ethers" -compact 185.It Pa /etc/ethers 186Ethernet host name database. 187.El 188.Sh EXAMPLES 189View the current 190.Xr arp 4 191table, 192showing network addresses symbolically: 193.Pp 194.Dl $ arp -a 195.Pp 196Create a permanent 197entry (one that cannot be overwritten by other network traffic): 198.Pp 199.Dl # arp -s 10.0.0.2 00:90:27:bb:cc:dd permanent 200.Pp 201Create proxy ARP 202entries on interface fxp0 203(MAC address 00:90:27:bb:cc:dd), 204for IP addresses 204.1.2.3 and 204.1.2.4: 205.Bd -literal -offset indent 206# arp -s 204.1.2.3 00:90:27:bb:cc:dd pub 207# arp -s 204.1.2.4 00:90:27:bb:cc:dd pub 208.Ed 209.Sh SEE ALSO 210.Xr inet_addr 3 , 211.Xr arp 4 , 212.Xr ethers 5 , 213.Xr ifconfig 8 , 214.Xr ndp 8 215.Sh HISTORY 216The 217.Nm 218command appeared in 219.Bx 4.3 . 220Wake on LAN functionality was added in 221.Ox 4.9 . 222