Bug 28215

Summary: Incorrect/misleading documentation for arp -s
Product: Documentation Reporter: Matt COwger <mcowger>
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Matt COwger 2001-06-17 03:00:02 UTC
According to the man page for arp(8):

-s hostname ether_addr
Create an ARP entry for the host called hostname with the Ether-net address ether_addr.  The Ethernet address is given as six hex
bytes separated by colons.

However, the hostname is NOT a valid argument, one must supply an IP address.  Hence, the documentation shoudl be changed to:

-s ip ether_addr

or something along those lines.

Fix: 

see above.
How-To-Repeat: see above
Comment 1 bem 2001-06-17 04:25:42 UTC
I was unable to verify this. As long as the hostname is in /etc/hosts, it works
for me. I did not try a dns name, though. See example output:

bandicoot# arp -s bandicoot 00:d0:b7:1d:7c:06
bandicoot# uname -a
FreeBSD bandicoot.atlanta-bsd.org 4.3-RELEASE FreeBSD 4.3-RELEASE #2: Sat Jun 16 17:19:24 EDT 2001     root@bandicoot.atlanta-bsd.org:/usr/src/sys/compile/GENERIC  i386
bandicoot# arp -an
? (192.168.0.1) at 0:10:5a:1b:ef:d9 [ethernet]
? (192.168.0.3) at 0:10:b5:4b:17:ca [ethernet]
? (192.168.0.4) at 0:d0:b7:1d:7c:6 permanent [ethernet]
bandicoot# cat /etc/hosts
127.0.0.1               localhost localhost.atlanta-bsd.org
192.168.0.4             bandicoot bandicoot.atlanta-bsd.org

bandicoot#
Comment 2 dd freebsd_committer freebsd_triage 2001-06-17 07:42:35 UTC
State Changed
From-To: open->closed

Originator reports pilot error.