[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]


There is, however it becomes a multi-step process. While at a previous
employer I wrote a poof of concept perl script for a security conference
that would pull all of the vlan, and cam tables from switches and map
the layer 2 network. It was later expanded to allow searching for the
exact port of which switch a machine with a mac address was plugged
into. I'll see if I still have it kicking around somewhere.

In the meantime this document from Cisco may help with the multi-step
process it will take. 

They talk about finding the vlan then using it as part of the community
string, such as public@1, some switches need this, other won't return
anything if it is used. So test your switches both ways to find the one
that works.

If you don't have the actual MIBs, you can use the numeric OID which
Cisco has included in the document above.

Hope this helps,


On Wed, 2009-03-25 at 16:51 +0200, Alex wrote:
> Thank you for your suggestions,  i will try it an see if it's faster
> than my option with ssh and key auth :)
> Another question : Is there an OID to find out on an inteligent switch (
> ZTE-2609) what physical address is on each port?
> Now i've done this using netcat but this is very slow and i have almost
> 300 switches on my network
> I searched google and the MIBs from ZTE but came out with no results
> Jeremy Winder wrote:
> > This is going to be an interesting project. The first problem is snmp
> > works on gets and sets. So you either get an object's value or you set
> > and object's value. You can not do both in the same operation. In your
> > example, you will need to setup an object that you can set the IP
> > address you want arped to. Then you need to setup an object that you can
> > get the results back from. To have box B arp, you would do a
> > two step operation. First a snmpset REMOTEARP-OID, then a
> > snmpget REMOTEARP-OID.
> >
> > Make sense? I hope so. I'm not completely awake yet this morning.
> >
> > For the get part you could use the NET-SNMP-EXTEND-MIB, I suggest google
> > for examples. As for the set part, I'm not going to be much help as I've
> > not done it.
> >
> > Another, option would be to walk the arp table OID
> > (IP-MIB::ipNetToPhysicalPhyAddress) and look for your IP address.
> > However, if machine B hasn't talked to the IP in awhile, it may not be
> > in the arp table anymore. Also, during a quick test I found it takes
> > Linux a minute or so between when a new address enters the arp table and
> > when it is exposed via snmp. So your mileage my vary.
> >
> > Hope this helps,
> >
> > Jeremy
> >
> > On Wed, 2009-03-25 at 14:13 +0200, Alex wrote:
> >   
> >> Hi, i want to run a script just interrogating a specific OID defined by
> >> me, to be more specific i have two boxes A and B,
> >> from box A i want to use snmpwalk to trigger a script which will run
> >> arping on  box B that's simple but i want to pass the ip which i want to
> >> arping via  snmpwalk from box A, does anywone have a clue how can i do this?
> >>
> >>
> >>     
> >
> >   

Reply to: