[SNMP4J] Re: Pulling Router tables via SNMP

Rory Marquis roridge at hotmail.com
Wed Oct 11 15:54:59 CEST 2006


Hi Charlie

AFAIK SNMP4J doesn't parse MIBs, but then you shouldn't require it to, as 
long as you know the OID with which to send the SNMP request.

If you want to actually parse a MIB then Mibble is the way to go. Mibble is 
great, I use it to look at MIBs that I have downloaded (i.e. makes them 
quicker and easier to read)  and to confirm the data I get back with my own 
code from SNMP4J (which is also great).

Your project sounds very ambitious and I wonder if SNMP is the way that will 
give you the information? I don't know enough about routers to answer that, 
however, like I already said, you will only find out that information if the 
router/switch A: supports SNMP, B: contains a MIB with readable fields that 
stores that kind of information.

I might be way off track here, but wouldn't the ability to be able to 
"sniff" packets over the network be more powerful? If so check out JpCap on 
sourceforge http://jpcap.sourceforge.net/

Cheers
Rory

>From: "Charlie Hubbard" <charlie.hubbard at gmail.com>
>To: "Rory Marquis" <roridge at hotmail.com>, snmp4j at agentpp.org
>Subject: Re: Pulling Router tables via SNMP
>Date: Wed, 11 Oct 2006 08:20:54 -0400
>
>Rory,
>
>Thanks for the info.  Both sites are very helpful.  What my ultimate
>goal in doing this is try and map the network by using snmp to figure
>out what networks a router is connecting.  I've used some products
>that seem to use this same approach so I figured it would be doable.
>Do you have any other insight in how I might accomplish this goal?
>
>So SNMP4J doesn't parse MIBs and that's why I need mibble?
>
>Thanks
>Charlie
>
>On 10/10/06, Rory Marquis <roridge at hotmail.com> wrote:
>>Hi there
>>
>>Im not sure if what you are asking would be posssible in the way that you
>>might be thinking.  (Although I am sure that someone will correct me if I 
>>am
>>worg.
>>
>>The only way that a router that supports SNMP could tell you the routing
>>tables would be if it had a MIB that would provide you with this
>>information.
>>
>>You said that you have read the RFC, and I agree at first they are 
>>difficult
>>to follow. The thing is there might be LOTS of RFCs for the MIBs of your
>>routers/switches there also might be private MIBs for the routers that are
>>manufacture specific (in fact i can guraentee that there are).
>>
>>My advice to you is to do some more research. Start small just by using an
>>OID from something like the HOST-RESOURCES-MIB or the SNMPv2-MIB or
>>something like that and throw it at the router to see if it A: implements
>>SNMP (some don't, honest) and B: that you can talk to it.  Then what I 
>>would
>>do is download the MIB from the RFC and parse it using something like 
>>Mibble
>>http://www.mibble.org/. There is an excellent tool that the Mibble folks
>>have created which will parse MIBs for you, and send SNMP messages... it's 
>>a
>>good tool to use if you are just playing around.
>>
>>Then I would go searching for more MIB information regarding your specific
>>Routers. If they are Cisco you are in luck, take a look in the Mib Depot
>>http://www.mibdepot.com/index.shtml
>>
>>HTH
>>
>>Cheers
>>Rory
>>
>>
>>





More information about the SNMP4J mailing list