[c-nsp] VLANs and snmp

John Wong johnwk at unimelb.edu.au
Fri Sep 3 09:16:45 EDT 2004


OR you may want to check out this excellent package called
Netdisco (www.netdisco.org) that utilizes the perl package
SNMP::Info to make it much easier to get that kind of info
from the switch.

Michael Markstaller wrote:
> CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB is for whatever, probably platforms with routed ports.. 
> doesn't work on any of my cat-boxes 29xx/35xx/5500 so CISCO-VLAN-MEMBERSHIP-MIB-V1SMI is the right place for Vincent..
> 
> Michael
> 
> 
>>-----Original Message-----
>>From: cisco-nsp-bounces at puck.nether.net 
>>[mailto:cisco-nsp-bounces at puck.nether.net] On Behalf Of 
>>Nicolai Strøm Gylling
>>Sent: Friday, September 03, 2004 10:55 AM
>>To: cisco-nsp at puck.nether.net
>>Subject: RE: [c-nsp] VLANs and snmp
>>
>>
>>Hi
>>
>>The standard interface information, ifIndex, ifDescr, 
>>ifOperStatus, ifAdminStatus, you can get by snmpwalk'ing 
>>.interfaces like
>>
>>	Snmpwalk ip public .interfaces
>>
>>For the vlan/port relationship, try looking at the 
>>CISCO-VLAN-IFTABLE-RELATIONSHIP-MIB.my MIB available from 
>>Cisco's FTP-site. 
>>You could start by doing a snmpwalk on the following 
>>OID(cviVlanInterfaceIndexEntry):
>>
>>	Snmpwalk ip public .1.3.6.1.4.1.9.9.128
>>
>>That will give you a list of the Vlan/port relationship, eg.
>>
>>	enterprises.9.9.128.1.1.1.1.3.5.0 = 23, Vlan5 on ifIndex 23.
>>	enterprises.9.9.128.1.1.1.1.3.10.0 = 25, Vlan10 on ifIndex 25.
>>	...
>>
>>/Nicolai
>>
>>-----Original Message-----
>>From: Vincent De Keyzer [mailto:vincent at dekeyzer.net] 
>>Sent: 2. september 2004 18:25
>>To: cisco-nsp at puck.nether.net
>>Subject: [c-nsp] VLANs and snmp
>>
>>Hello,
>>
>> 
>>
>>Is there a way to obtain via snmp the VLAN information of a 
>>switch (in my case, Catalyst 3524)?
>>
>> 
>>
>>My broader problem is the following: I would like to write a 
>>script that shows, for all ports of a switch, the following data:
>>
>>*	Interface name
>>*	Interface description
>>*	Operational and administrative status
>>*	VLAN it belongs to
>>
>> 
>>
>>If could gather this via an expect script (telnet, sh int, sh 
>>vlan); but I'd prefer to do it via snmp.
>>
>> 
>>
>>Any ideas?
>>
>> 
>>
>>Vincent


More information about the cisco-nsp mailing list