{
    "mode": "man",
    "parameter": "arp",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/arp/7/json",
    "generated": "2026-06-12T16:33:15Z",
    "sections": {
        "NAME": {
            "content": "arp - Linux ARP kernel module.\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "This  kernel  protocol  module implements the Address Resolution Protocol defined in RFC 826.\nIt is used to convert between Layer2 hardware addresses and IPv4 protocol  addresses  on  di‐\nrectly  connected networks.  The user normally doesn't interact directly with this module ex‐\ncept to configure it; instead it provides a service for other protocols in the kernel.\n\nA user process can receive ARP packets by using packet(7) sockets.  There is also a mechanism\nfor managing the ARP cache in user-space by using netlink(7) sockets.  The ARP table can also\nbe controlled via ioctl(2) on any AFINET socket.\n\nThe ARP module maintains a cache of mappings between  hardware  addresses  and  protocol  ad‐\ndresses.   The  cache has a limited size so old and less frequently used entries are garbage-\ncollected.  Entries which are marked as permanent are never deleted by the garbage-collector.\nThe  cache  can be directly manipulated by the use of ioctls and its behavior can be tuned by\nthe /proc interfaces described below.\n\nWhen there is no positive feedback for an existing mapping after some time (see the /proc in‐\nterfaces below), a neighbor cache entry is considered stale.  Positive feedback can be gotten\nfrom a higher layer; for example from a successful TCP ACK.  Other protocols can signal  for‐\nward  progress  using the MSGCONFIRM flag to sendmsg(2).  When there is no forward progress,\nARP tries to reprobe.  It first tries to ask a local arp daemon appsolicit times for an  up‐\ndated  MAC  address.   If that fails and an old MAC address is known, a unicast probe is sent\nucastsolicit times.  If that fails too, it will broadcast a new ARP request to the  network.\nRequests are sent only when there is data queued for sending.\n\nLinux will automatically add a nonpermanent proxy arp entry when it receives a request for an\naddress it forwards to and proxy arp is enabled on the receiving interface.  When there is  a\nreject route for the target, no proxy arp entry is added.\n",
            "subsections": [
                {
                    "name": "Ioctls",
                    "content": "Three ioctls are available on all AFINET sockets.  They take a pointer to a struct arpreq as\ntheir argument.\n\nstruct arpreq {\nstruct sockaddr arppa;      /* protocol address */\nstruct sockaddr arpha;      /* hardware address */\nint             arpflags;   /* flags */\nstruct sockaddr arpnetmask; /* netmask of protocol address */\nchar            arpdev[16];\n};\n\nSIOCSARP, SIOCDARP and SIOCGARP respectively set, delete and get an ARP mapping.  Setting and\ndeleting  ARP  maps are privileged operations and may be performed only by a process with the\nCAPNETADMIN capability or an effective UID of 0.\n\narppa must be an AFINET address and arpha must have the same type as the device  which  is\nspecified in arpdev.  arpdev is a zero-terminated string which names a device.\n\n┌─────────────────────────────────────┐\n│             arpflags               │\n├────────────────┬────────────────────┤\n│flag            │ meaning            │\n├────────────────┼────────────────────┤\n│ATFCOM         │ Lookup complete    │\n├────────────────┼────────────────────┤\n│ATFPERM        │ Permanent entry    │\n├────────────────┼────────────────────┤\n│ATFPUBL        │ Publish entry      │\n├────────────────┼────────────────────┤\n│ATFUSETRAILERS │ Trailers requested │\n├────────────────┼────────────────────┤\n│ATFNETMASK     │ Use a netmask      │\n├────────────────┼────────────────────┤\n│ATFDONTPUB     │ Don't answer       │\n└────────────────┴────────────────────┘\nIf the ATFNETMASK flag is set, then arpnetmask should be valid.  Linux 2.2 does not support\nproxy network ARP entries, so this should be set to 0xffffffff, or 0 to  remove  an  existing\nproxy arp entry.  ATFUSETRAILERS is obsolete and should not be used.\n"
                },
                {
                    "name": "/proc interfaces",
                    "content": "ARP supports a range of /proc interfaces to configure parameters on a global or per-interface\nbasis.  The interfaces can be accessed by reading or writing the /proc/sys/net/ipv4/neigh/*/*\nfiles.  Each interface in the system has its own directory in /proc/sys/net/ipv4/neigh/.  The\nsetting in the \"default\" directory is used for all newly created devices.   Unless  otherwise\nspecified, time-related interfaces are specified in seconds.\n\nanycastdelay (since Linux 2.2)\nThe maximum number of jiffies to delay before replying to a IPv6 neighbor solicitation\nmessage.  Anycast support is not yet implemented.  Defaults to 1 second.\n\nappsolicit (since Linux 2.2)\nThe maximum number of probes to send to the user space ARP daemon via  netlink  before\ndropping back to multicast probes (see mcastsolicit).  Defaults to 0.\n\nbasereachabletime (since Linux 2.2)\nOnce  a  neighbor  has  been found, the entry is considered to be valid for at least a\nrandom value between basereachabletime/2 and  3*basereachabletime/2.   An  entry's\nvalidity  will  be  extended if it receives positive feedback from higher level proto‐\ncols.  Defaults to 30 seconds.  This file is now  obsolete  in  favor  of  basereach‐\nabletimems.\n\nbasereachabletimems (since Linux 2.6.12)\nAs for basereachabletime, but measures time in milliseconds.  Defaults to 30000 mil‐\nliseconds.\n\ndelayfirstprobetime (since Linux 2.2)\nDelay before first probe after it has been decided that a neighbor is stale.  Defaults\nto 5 seconds.\n\ngcinterval (since Linux 2.2)\nHow  frequently the garbage collector for neighbor entries should attempt to run.  De‐\nfaults to 30 seconds.\n\ngcstaletime (since Linux 2.2)\nDetermines how often to check for stale neighbor entries.  When a  neighbor  entry  is\nconsidered stale, it is resolved again before sending data to it.  Defaults to 60 sec‐\nonds.\n\ngcthresh1 (since Linux 2.2)\nThe minimum number of entries to keep in the ARP cache.  The  garbage  collector  will\nnot run if there are fewer than this number of entries in the cache.  Defaults to 128.\n\ngcthresh2 (since Linux 2.2)\nThe  soft  maximum  number of entries to keep in the ARP cache.  The garbage collector\nwill allow the number of entries to exceed this for 5 seconds before  collection  will\nbe performed.  Defaults to 512.\n\ngcthresh3 (since Linux 2.2)\nThe  hard  maximum  number of entries to keep in the ARP cache.  The garbage collector\nwill always run if there are more than this number of entries in the cache.   Defaults\nto 1024.\n\nlocktime (since Linux 2.2)\nThe  minimum  number  of jiffies to keep an ARP entry in the cache.  This prevents ARP\ncache thrashing if there is more than one potential mapping (generally due to  network\nmisconfiguration).  Defaults to 1 second.\n\nmcastsolicit (since Linux 2.2)\nThe  maximum  number  of  attempts to resolve an address by multicast/broadcast before\nmarking the entry as unreachable.  Defaults to 3.\n\nproxydelay (since Linux 2.2)\nWhen an ARP request for a known proxy-ARP address is received, delay up to proxydelay\njiffies before replying.  This is used to prevent network flooding in some cases.  De‐\nfaults to 0.8 seconds.\n\nproxyqlen (since Linux 2.2)\nThe maximum number of packets which may be queued to proxy-ARP addresses.  Defaults to\n64.\n\nretranstime (since Linux 2.2)\nThe number of jiffies to delay before retransmitting a request.  Defaults to 1 second.\nThis file is now obsolete in favor of retranstimems.\n\nretranstimems (since Linux 2.6.12)\nThe number of milliseconds to delay before retransmitting a request.  Defaults to 1000\nmilliseconds.\n\nucastsolicit (since Linux 2.2)\nThe  maximum  number  of  attempts to send unicast probes before asking the ARP daemon\n(see appsolicit).  Defaults to 3.\n\nunresqlen (since Linux 2.2)\nThe maximum number of packets which may be queued for each unresolved address by other\nnetwork layers.  Defaults to 3.\n"
                }
            ]
        },
        "VERSIONS": {
            "content": "The  struct  arpreq  changed in Linux 2.0 to include the arpdev member and the ioctl numbers\nchanged at the same time.  Support for the old ioctls was dropped in Linux 2.2.\n\nSupport for proxy arp entries for networks (netmask not  equal  0xffffffff)  was  dropped  in\nLinux 2.2.  It is replaced by automatic proxy arp setup by the kernel for all reachable hosts\non other interfaces (when forwarding and proxy arp is enabled for the interface).\n\nThe neigh/* interfaces did not exist before Linux 2.2.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Some timer settings are specified in jiffies, which is architecture- and  kernel  version-de‐\npendent; see time(7).\n\nThere  is no way to signal positive feedback from user space.  This means connection-oriented\nprotocols implemented in user space will generate excessive ARP traffic, because  ndisc  will\nregularly reprobe the MAC address.  The same problem applies for some kernel protocols (e.g.,\nNFS over UDP).\n\nThis man page mashes together functionality that is IPv4-specific with functionality that  is\nshared between IPv4 and IPv6.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "capabilities(7), ip(7), arpd(8)\n\nRFC 826  for a description of ARP.  RFC 2461 for a description of IPv6 neighbor discovery and\nthe base algorithms used.  Linux 2.2+ IPv4 ARP uses the IPv6 algorithms when applicable.\n",
            "subsections": []
        },
        "COLOPHON": {
            "content": "This page is part of release 5.10 of the Linux  man-pages  project.   A  description  of  the\nproject,  information about reporting bugs, and the latest version of this page, can be found\nat https://www.kernel.org/doc/man-pages/.\n\n\n\nLinux                                        2020-08-13                                       ARP(7)",
            "subsections": []
        }
    },
    "summary": "arp - Linux ARP kernel module.",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "capabilities",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/capabilities/7/json"
        },
        {
            "name": "ip",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/ip/7/json"
        },
        {
            "name": "arpd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/arpd/8/json"
        }
    ]
}