How to query a DHCP server for the arp table

Discussion in 'Cisco' started by ProgDario, Apr 26, 2005.

  1. ProgDario

    ProgDario Guest

    HI,

    I have to retrieve the ARP table from a DHCP SERVER.

    How can I query the DHCP server to obtain such table?

    Do I have to prepare a formatted packet or something similar? Do I have
    to use socket?

    I have to do this is JAVA, so the command line solution is not
    applicable.

    Any hint is appreciated.


    Thanks!!

    ProgDario
     
    ProgDario, Apr 26, 2005
    #1
    1. Advertising

  2. ProgDario

    Scooby Guest

    "ProgDario" <> wrote in message
    news:...
    > HI,
    >
    > I have to retrieve the ARP table from a DHCP SERVER.
    >
    > How can I query the DHCP server to obtain such table?
    >
    > Do I have to prepare a formatted packet or something similar? Do I have
    > to use socket?
    >
    > I have to do this is JAVA, so the command line solution is not
    > applicable.
    >
    > Any hint is appreciated.
    >
    >
    > Thanks!!
    >
    > ProgDario
    >


    I had responded to you a few threads back about this. Apparently, you
    haven't found your solution. I would like to reinforce the idea that
    getting the arp table from the server is (in my opinion) the wrong approach.
    You haven't mentioned what type of server this is. But, I would be willing
    to guess that the arp table is difficult to get through SNMP, and it has a
    short life, which means that you probably won't find the address you are
    looking for in it.

    My idea was that you use SNMP to query the network equipment that the device
    will most likely be talking to the most (ie Gateway). SNMP is fairly simple
    to understand as a protocol, but it takes time to understand how the mibs
    (information objects on the equipment being queried) work. You'll need to
    check to see if the device you want to query offers the appropriate mibs for
    displaying the arp table. I can tell you that Cisco devices do.
    Personally, I would not try to construct that packet myself. I use
    components that do all that work for me. With a quick search, I located an
    API for Java, which may work for you:

    http://snmp.ireasoning.com/snmpapi.shtml

    That said, it appears there is a rather large learning curve for you on this
    project. You may want to consider just using HTTP to query the phone itself
    and parsing the data. Also, that is the only place you can be sure that the
    mac address to ip cross reference is available.

    Jim
     
    Scooby, Apr 26, 2005
    #2
    1. Advertising

  3. why is the arp table from a server of any interesest ?
    The table will timeout within 6 min or so.

    If you what to track users/hosts Ciscoworks can do this for you, given that
    your LAN is Cisco.
    The approach (which is the same for any device) is to get the CAM (Mac
    address forwarding table) tables from your switches in the LAN, this will
    tell you on exactly which port a given user is on.
    /HTH
    Martin

    "ProgDario" <> skrev i en meddelelse
    news:...
    > HI,
    >
    > I have to retrieve the ARP table from a DHCP SERVER.
    >
    > How can I query the DHCP server to obtain such table?
    >
    > Do I have to prepare a formatted packet or something similar? Do I have
    > to use socket?
    >
    > I have to do this is JAVA, so the command line solution is not
    > applicable.
    >
    > Any hint is appreciated.
    >
    >
    > Thanks!!
    >
    > ProgDario
    >
     
    Martin Bilgrav, Apr 26, 2005
    #3
  4. In article <>,
    ProgDario <> wrote:
    :I have to retrieve the ARP table from a DHCP SERVER.

    ;How can I query the DHCP server to obtain such table?

    As I explained to you before, chances are that you cannot do so --
    not unless your DHCP server is constrained to be a more specific
    kind of device (such as a Cisco router) that happens to offer a
    query mechanism.


    :Do I have to prepare a formatted packet or something similar? Do I have
    :to use socket?

    I posted the exact SNMP MIB you need for Cisco routers and
    the algorithm you have to go through to extract the data you
    want. You didn't reply at all.

    The interaction so far has been fairly one-sided, and that discourages
    people from assisting you further. We're [generally] willing to guide
    you as long as you show that you are reasonably learning as you go --
    but we aren't likely to post the exact code you need -- you are
    the developer, the one being paid to develop the code. [And besides,
    I'd have to learn Java in order to write the necessary code.]
    --
    Oh, to be a Blobel!
     
    Walter Roberson, Apr 26, 2005
    #4
  5. if ya dont have cisco stuff only or dont like paying money try
    http://nagmin.sourceforge.net/features.htm to get the just of it and
    see how it goes for ya.

    Walter Roberson wrote:
    > In article <>,
    > ProgDario <> wrote:
    > :I have to retrieve the ARP table from a DHCP SERVER.
    >
    > ;How can I query the DHCP server to obtain such table?
    >
    > As I explained to you before, chances are that you cannot do so --
    > not unless your DHCP server is constrained to be a more specific
    > kind of device (such as a Cisco router) that happens to offer a
    > query mechanism.
    >
    >
    > :Do I have to prepare a formatted packet or something similar? Do I have
    > :to use socket?
    >
    > I posted the exact SNMP MIB you need for Cisco routers and
    > the algorithm you have to go through to extract the data you
    > want. You didn't reply at all.
    >
    > The interaction so far has been fairly one-sided, and that discourages
    > people from assisting you further. We're [generally] willing to guide
    > you as long as you show that you are reasonably learning as you go --
    > but we aren't likely to post the exact code you need -- you are
    > the developer, the one being paid to develop the code. [And besides,
    > I'd have to learn Java in order to write the necessary code.]
     
    Steven Kalcevich, Apr 27, 2005
    #5
  6. ProgDario

    miskaone Guest

    I think Jim is right on this. I have created some fairly simple
    webcrawlers using excel webquery and marcos that will allow you to
    sweep a phone subnet and gather all kinds of information from the phone
    including ip addr.

    Mike
     
    miskaone, Apr 27, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mikhael47

    Huge ARP table on 2600 12.2.(7b)

    Mikhael47, Aug 31, 2004, in forum: Cisco
    Replies:
    4
    Views:
    1,512
    Terry Baranski
    Sep 1, 2004
  2. Replies:
    21
    Views:
    8,683
    Ben Smith
    Dec 1, 2005
  3. Cisco 2950 ARP table?

    , Mar 18, 2006, in forum: Cisco
    Replies:
    3
    Views:
    9,787
  4. Giuen
    Replies:
    0
    Views:
    995
    Giuen
    Sep 12, 2008
  5. Darren Green

    Arp or Proxy Arp

    Darren Green, Feb 20, 2009, in forum: Cisco
    Replies:
    0
    Views:
    556
    Darren Green
    Feb 20, 2009
Loading...

Share This Page