Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

arp(7) [osf1 man page]

arp(7)							 Miscellaneous Information Manual						    arp(7)

NAME
arp - Address Resolution Protocol SYNOPSIS
pseudo-device ether DESCRIPTION
The ARP protocol is used to map dynamically between DARPA Internet and 10Mb/s Ethernet addresses. It is used by all the 10Mb/s Ethernet interface drivers. The ARP protocol caches Internet-Ethernet address mappings. When an interface requests a mapping for an address not in the cache, ARP queues the message which requires the mapping and broadcasts a message on the associated network requesting the address mapping. If a response is provided, the new mapping is cached and any pending messages are transmitted. The ARP protocol queues only the most recently ``transmitted'' packet while waiting for a mapping request to be responded to. To enable communications with systems which do not use ARP, ioctls are provided to enter and delete entries in the Internet-to-Ethernet tables. The usage is: #include <sys/ioctl.h> #include <sys/socket.h> #include <net/if.h> struct arpreq arpreq; ioctl(s, SIOCSARP, (caddr_t)&arpreq); ioctl(s, SIOCGARP, (caddr_t)&arpreq); ioctl(s, SIOCDARP, (caddr_t)&arpreq); Each ioctl takes the same structure as an argument. SIOCSARP sets an ARP entry, SIOCGARP gets an ARP entry, and SIOCDARP deletes an ARP entry. These ioctls may be applied to any socket descriptor s, but only by the superuser. The arpreq structure contains: /* * ARP ioctl request */ struct arpreq { struct sockaddr arp_pa; /* protocol address */ struct sockaddr arp_ha; /* hardware address */ int arp_flags; /* flags */ }; /* arp_flags field values */ #define ATF_COM 2 /* completed entry (arp_ha valid) */ #define ATF_PERM 4 /* permanent entry */ #define ATF_PUBL 8 /* publish (respond for other host) */ The address family for the arp_pa sockaddr must be AF_INET; for the arp_ha sockaddr, it must be AF_UNSPEC. The only flag bits that can be written are ATF_PERM and ATF_PUBL. ATF_PERM causes the entry to be permanent if the ioctl call succeeds. The ioctl may fail if more than four permanent Internet host addresses hash to the same slot. ATF_PUBL specifies that the ARP code should respond to ARP requests for the indicated host coming from other machines. This lets a SUN act as an ARP server, which can be used to make an ARP-only machine talk to a non-ARP machine. The ARP protocol watches passively for a host that responds to an ARP mapping request for the local host's address. RESTRICTIONS
ARP packets on the Ethernet use only 42 bytes of data. The smallest legal Ethernet packet is 60 bytes, however, not including CRC. Some systems may not enforce the minimum packet size. ERRORS
arp: local IP address nn.nn.nn.nn in use by hardware address %x:%x:%x:%x:%x%x ARP has discovered another host on the local network that responds to mapping requests for its own Internet address. RELATED INFORMATION
inet(7), arp(8), ifconfig(8) delim off arp(7)

Check Out this Related Man Page

ARP(4)							   BSD Kernel Interfaces Manual 						    ARP(4)

NAME
arp -- Address Resolution Protocol SYNOPSIS
pseudo-device ether DESCRIPTION
The Address Resolution Protocol (ARP) is a protocol used to dynamically map between Internet host addresses and 10Mb/s Ethernet addresses. It is used by all the 10Mb/s Ethernet interface drivers. It is not specific to Internet protocols or to 10Mb/s Ethernet, but this implemen- tation currently supports only that combination. ARP caches Internet-Ethernet address mappings. When an interface requests a mapping for an address not in the cache, ARP queues the message which requires the mapping and broadcasts a message on the associated network requesting the address mapping. If a response is provided, the new mapping is cached and any pending message is transmitted. ARP will queue at most one packet while waiting for a response to a mapping request; only the most recently ``transmitted'' packet is kept. If the target host does not respond after several requests, the host is con- sidered to be down for a short period (normally 20 seconds), allowing an error to be returned to transmission attempts during this interval. The error is EHOSTDOWN for a non-responding destination host, and EHOSTUNREACH for a non-responding router. The ARP cache is stored in the system routing table as dynamically-created host routes. The route to a directly-attached Ethernet network is installed as a ``cloning'' route (one with the RTF_CLONING flag set), causing routes to individual hosts on that network to be created on demand. These routes time out periodically (normally 20 minutes after validated; entries are not validated when not in use). An entry for a host which is not responding is a ``reject'' route (one with the RTF_REJECT flag set). ARP entries may be added, deleted or changed with the arp(8) utility. Manually-added entries may be temporary or permanent, and may be ``published'', in which case the system will respond to ARP requests for that host as if it were the target of the request. In the past, ARP was used to negotiate the use of a trailer encapsulation. This is no longer supported. ARP watches passively for hosts impersonating the local host (i.e. a host which responds to an ARP mapping request for the local host's address). DIAGNOSTICS
duplicate IP address %x!! sent from ethernet address: %x:%x:%x:%x:%x:%x. ARP has discovered another host on the local network which responds to mapping requests for its own Internet address with a different Ethernet address, generally indicating that two hosts are attempting to use the same Internet address. SEE ALSO
inet(4), route(4), arp(8), ifconfig(8), route(8) Plummer, D., "RFC826", An Ethernet Address Resolution Protocol. Leffler, S.J. and Karels, M.J., "RFC893", Trailer Encapsulations. 4th Berkeley Distribution April 18, 1994 4th Berkeley Distribution
Man Page