1.\" $OpenBSD: arp.8,v 1.24 2009/04/29 07:10:38 jmc 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 29 2009 $ 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.Ar hostname 43.Nm arp 44.Op Fl F 45.Op Fl f Ar file 46.Fl s Ar hostname ether_addr 47.Op Cm temp | permanent 48.Op Cm pub 49.Sh DESCRIPTION 50The 51.Nm 52program displays and modifies the Internet-to-Ethernet address translation 53tables used by the address resolution protocol (ARP). 54.Pp 55.Nm 56displays the current ARP entry for 57.Ar hostname 58when no optional parameters are supplied. 59.Ar hostname 60may be specified by name or by number, 61using Internet dot notation. 62.Pp 63The options are as follows: 64.Bl -tag -width Ds 65.It Fl a 66Display all of the current ARP entries. 67See also the 68.Fl d 69option below. 70.It Fl d 71Delete an entry for the host called 72.Ar hostname . 73Alternatively, the 74.Fl d 75flag may be combined with the 76.Fl a 77flag to delete all entries, with hostname lookups automatically 78disabled. 79Only the superuser may delete entries. 80.It Fl F 81Force existing entries for the given host to be overwritten 82(only relevant to the 83.Fl f 84and 85.Fl s 86options). 87.It Fl f Ar file 88Process entries from 89.Ar file 90to be set in the ARP tables. 91Any entries in the file that already exist for a given host 92will not be overwritten unless 93.Fl F 94is given. 95Entries in the file should be of the form: 96.Bd -filled -offset indent 97.Ar hostname ether_addr 98.Op Cm temp | permanent 99.Op Cm pub 100.Ed 101.Pp 102The entry will be static (will not time out) unless the word 103.Cm temp 104is given in the command. 105A static ARP entry can be overwritten by network traffic, unless the word 106.Cm permanent 107is given. 108If the word 109.Cm pub 110is given, the entry will be 111.Dq published ; 112that is, this system will act as an ARP server, 113responding to requests for 114.Ar hostname 115even though the host address is not its own. 116This behavior has traditionally been called 117.Em proxy ARP . 118.It Fl n 119Show network addresses as numbers (normally 120.Nm 121attempts to display addresses symbolically). 122.It Xo 123.Fl s Ar hostname ether_addr 124.Op Cm temp | permanent 125.Op Cm pub 126.Xc 127Create an ARP entry for the host called 128.Ar hostname 129with the Ethernet address 130.Ar ether_addr . 131The Ethernet address is given as six hexadecimal bytes separated by 132colons. 133.Pp 134The 135.Cm permanent , pub , 136or 137.Cm temp 138modifiers may be specified with meanings as given above. 139.Pp 140If the entry already exists for the given host, it will not 141be replaced unless 142.Fl F 143is given. 144.El 145.Sh EXAMPLES 146View the current 147.Xr arp 4 148table, 149showing network addresses symbolically: 150.Pp 151.Dl $ arp -a 152.Pp 153Create a permanent 154entry (one that cannot be overwritten by other network traffic): 155.Pp 156.Dl # arp -s 10.0.0.2 00:90:27:bb:cc:dd permanent 157.Pp 158Create proxy ARP 159entries on interface fxp0 160(MAC address 00:90:27:bb:cc:dd), 161for IP addresses 204.1.2.3 and 204.1.2.4: 162.Bd -literal -offset indent 163# arp -s 204.1.2.3 00:90:27:bb:cc:dd pub 164# arp -s 204.1.2.4 00:90:27:bb:cc:dd pub 165.Ed 166.Sh SEE ALSO 167.Xr inet 3 , 168.Xr arp 4 , 169.Xr ifconfig 8 , 170.Xr ndp 8 171.Sh HISTORY 172The 173.Nm 174command appeared in 175.Bx 4.3 . 176