Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Cisco (http://www.velocityreviews.com/forums/f27-cisco.html)
-   -   How to query a DHCP server for the arp table (http://www.velocityreviews.com/forums/t38919-how-to-query-a-dhcp-server-for-the-arp-table.html)

ProgDario 04-26-2005 11:54 AM

How to query a DHCP server for the arp table
 
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


Scooby 04-26-2005 12:33 PM

Re: How to query a DHCP server for the arp table
 
"ProgDario" <dario@fga-software.com> wrote in message
news:1114516490.654787.37720@f14g2000cwb.googlegro ups.com...
> 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



Martin Bilgrav 04-26-2005 12:57 PM

Re: How to query a DHCP server for the arp table
 
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" <dario@fga-software.com> skrev i en meddelelse
news:1114516490.654787.37720@f14g2000cwb.googlegro ups.com...
> 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
>




Walter Roberson 04-26-2005 02:36 PM

Re: How to query a DHCP server for the arp table
 
In article <1114516490.654787.37720@f14g2000cwb.googlegroups. com>,
ProgDario <dario@fga-software.com> 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!

Steven Kalcevich 04-27-2005 02:58 AM

Re: How to query a DHCP server for the arp table
 
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 <1114516490.654787.37720@f14g2000cwb.googlegroups. com>,
> ProgDario <dario@fga-software.com> 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.]


miskaone 04-27-2005 03:00 PM

Re: How to query a DHCP server for the arp table
 
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



All times are GMT. The time now is 10:26 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.