[c-nsp] VLANs and snmp
Nicolai Strøm Gylling
nsg at webpartner.dk
Fri Sep 3 04:55:16 EDT 2004
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
_______________________________________________
cisco-nsp mailing list cisco-nsp at puck.nether.net https://puck.nether.net/mailman/listinfo/cisco-nsp
archive at http://puck.nether.net/pipermail/cisco-nsp/
More information about the cisco-nsp
mailing list