1.\" Copyright (c) 1985, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" @(#)arp.8 8.1 (Berkeley) 6/6/93 33.\" $FreeBSD$ 34.\" 35.Dd June 6, 1993 36.Dt ARP 8 37.Os 38.Sh NAME 39.Nm arp 40.Nd address resolution display and control 41.Sh SYNOPSIS 42.Nm 43.Op Fl n 44.Op Fl i Ar interface 45.Ar hostname 46.Nm 47.Op Fl n 48.Op Fl i Ar interface 49.Fl a 50.Nm 51.Fl d Ar hostname 52.Op Cm pub 53.Nm 54.Fl d 55.Fl a 56.Nm 57.Fl s Ar hostname ether_addr 58.Op Cm temp 59.Op Cm pub Op Cm only 60.Nm 61.Fl S Ar hostname ether_addr 62.Op Cm temp 63.Op Cm pub Op Cm only 64.Nm 65.Fl f Ar filename 66.Sh DESCRIPTION 67The 68.Nm 69utility displays and modifies the Internet-to-Ethernet address translation 70tables used by the address resolution protocol 71.Pq Xr arp 4 . 72With no flags, the program displays the current 73.Tn ARP 74entry for 75.Ar hostname . 76The host may be specified by name or by number, 77using Internet dot notation. 78.Pp 79Available options: 80.Bl -tag -width indent 81.It Fl a 82The program displays or deletes all of the current 83.Tn ARP 84entries. 85.It Fl d 86A super-user may delete an entry for the host called 87.Ar hostname 88with the 89.Fl d 90flag. 91If the 92.Cm pub 93keyword is specified, only the 94.Dq published 95.Tn ARP 96entry 97for this host will be deleted. 98.Pp 99Alternatively, the 100.Fl d 101flag may be combined with the 102.Fl a 103flag to delete all entries. 104.It Fl i Ar interface 105Limit the operation scope to the 106.Tn ARP 107entries on 108.Ar interface . 109Applicable to the display operations only. 110.It Fl n 111Show network addresses as numbers (normally 112.Nm 113attempts to display addresses symbolically). 114.It Fl s Ar hostname ether_addr 115Create an 116.Tn ARP 117entry for the host called 118.Ar hostname 119with the Ethernet address 120.Ar ether_addr . 121The Ethernet address is given as six hex bytes separated by colons. 122The entry will be permanent unless the word 123.Cm temp 124is given in the command. 125If the word 126.Cm pub 127is given, the entry will be 128.Dq published ; 129i.e., this system will 130act as an 131.Tn ARP 132server, 133responding to requests for 134.Ar hostname 135even though the host address is not its own. 136In this case the 137.Ar ether_addr 138can be given as 139.Cm auto 140in which case the interfaces on this host will be examined, 141and if one of them is found to occupy the same subnet, its 142Ethernet address will be used. 143If the 144.Cm only 145keyword is also specified, this will create a 146.Dq "published (proxy only)" 147entry. 148This type of entry is created automatically if 149.Nm 150detects that a routing table entry for 151.Ar hostname 152already exists. 153.It Fl S Ar hostname ether_addr 154Is just like 155.Fl s 156except any existing 157.Tn ARP 158entry for this host will be deleted first. 159.It Fl f Ar filename 160Cause the file 161.Ar filename 162to be read and multiple entries to be set in the 163.Tn ARP 164tables. 165Entries 166in the file should be of the form 167.Pp 168.Bd -ragged -offset indent -compact 169.Ar hostname ether_addr 170.Op Cm temp 171.Op Cm pub 172.Ed 173.Pp 174with argument meanings as given above. 175Leading whitespace and empty lines are ignored. 176A 177.Ql # 178character will mark the rest of the line as a comment. 179.El 180.Sh SEE ALSO 181.Xr inet 3 , 182.Xr arp 4 , 183.Xr ifconfig 8 184.Sh HISTORY 185The 186.Nm 187utility appeared in 188.Bx 4.3 . 189