A command/application to print the ARP cache timeout for arp entry

Posted on 2004-11-16
Last Modified: 2012-05-05
I need to get the arp cache (arp table) entry timeout.

arp -a command in console doesn't give me that info.
I checked the arp man and --help , no help there :)

I know its possible to change this timeout, but I want to understand how to check (besides actual measuring :)

Question by:muhalok
    LVL 38

    Accepted Solution


    # egrep . /proc/sys/net/ipv4/neigh/eth0/*
    /proc/sys/net/ipv4/neigh/eth0/gc_stale_time:60     <=== default 1 minute
    --- ---
       An ARP entry is a candidate to be removed gc_stale_time seconds after last used.
    Garbage collection runs every gc_interval seconds which is when the entry can be deleted.
    However, an ARP cache entry will not be removed while there is a reference to it such as
    route cache entry. The ARP cache entry will move from reachable to stale state in the normal
    time but stays stale until the route cache entry is removed.
    The route cache may keep an entry for several minutes even with no traffic or sessions to that
    address. So after the route cache entry is removed, the reference to the ARP cache entry goes away.
    Then next time ARP cache garbage collection runs the entry will be removed.
    The other useful command:
    # ip -s neigh list


    LVL 5

    Author Comment

    Thanks - exactly what I needed.
    Also: Thanks for the additional note about routing cache.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now