[c-nsp] SNMP: IP => vlan + mac

Andrew Fort afort at choqolat.org
Fri Aug 27 19:56:19 EDT 2004


Liviu Pislaru wrote:
> I don't want to use "grep" because i have more than 1000 arp entry per vlan.

Liviu, the following phrase comes to mind:
	"If I throw a dog a bone I don't want to know how it tastes!"

Virgil did say it is a "dodgy shell script" (being a bit rough on 
himself :-), and encouraged you to use the logic inside to write 
yourself something better.

If the MIBs don't have the useful information in the key (i.e., the OID) 
such that you can do a single query+transaction to get the info you 
require, you need to store the getbulk/getnext-walk in a (fast, 
reliable, device friendly) manner in a hashtable and then your lookups 
will be of linear time when you query that information.

	Anyhow, Virgil uses this script and I'm led to believe he has some 
large VLANs, too (though maybe only 512 hosts max).

-andrew



More information about the cisco-nsp mailing list