How to get all arp entries for a certain network

Discussion in 'Linux Networking' started by Zahi Shahak, Sep 2, 2004.

  1. Zahi Shahak

    Zahi Shahak Guest

    Hi,
    How can I get my arp table to fill up with all the objects in a
    certain network(which I have the network/netmask). The only way I
    found is pinging all the objects in the network one by one....I know
    there's a better way. Using redhat , perl solutions are welcome !
    10x in advance
     
    Zahi Shahak, Sep 2, 2004
    #1
    1. Advertisements

  2. -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1
    NotDashEscaped: You need GnuPG to verify this message

    man ping
    /-b

    --
    Michael Heiming (GPG-Key ID: 0xEDD27B94)
    mail: echo | perl -pe 'y/a-z/n-za-m/'
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.4 (GNU/Linux)

    iD8DBQFBN2EZAkPEju3Se5QRAgTvAJ4udgrTscXPr7Pb08qhX4KdGuwS7ACeO+XX
    7ZQ6PxVOA8KtA7ipx0JOVAE=
    =ZTC2
    -----END PGP SIGNATURE-----
     
    Michael Heiming, Sep 2, 2004
    #2
    1. Advertisements

  3. Zahi Shahak

    James Knott Guest

    You can do a broadcast ping, to the broadcast address.
     
    James Knott, Sep 2, 2004
    #3
  4. Zahi Shahak

    Moe Trin Guest

    Ping the broadcast (ping -b), but don't do this very much, as it can
    generate a lot of traffic. And remember:

    1. Some hosts will not respond to a broadcast ping, though they _will_
    respond to a unicast ping (to their speciifc address).

    2. Some hosts have firewalls configured to block/ignore pings.

    A less invasive technique is to just run a sniffer like tcpdump
    looking for ARP request/reply packets. I used to run an application
    that monitored the ARP cache of the routers and DNS servers (then
    comparing the results with a data base to detect "unusual" events)
    for security purposes. 'arpwatch' is somewhat similar in function.

    Old guy
     
    Moe Trin, Sep 3, 2004
    #4
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.