snmp vlan-table

Sorry for crossposting, but I am not sure if either of theses groups is the right one. I hope to find someone who can help me with a tip or info.

I am trying to get the vlan-table of a switch via snmp

1.3.6.1.4.1.9.5.1.9.2.1.1 in CISCO-STACK-MIB works for a catalyst switch (WS-C4006 Software, Version NmpSW: 8.1(1)), but on a C3500XL I get no response.

(the error is: Error in packet Reason: (noSuchName) There is no such variable name in this MIB. Failed object: SNMPv2-SMI::enterprises.9.5.1.9.2.1.1)

according to the Cisco SNMP Object Navigator

formatting link
this SNMP-object is deprecated.

So I am wondering if there is a different object, that is currently in use.

If you know how I could get the vlan-table from a switch via snmp or have a link to some info about the subject, I'd very much appreciate your help.

kind regards, Herlind

Reply to
Herlind Wurth
Loading thread data ...

In article , Herlind Wurth wrote: :Sorry for crossposting, but I am not sure if either of theses groups is the :right one. I hope to find someone who can help me with a tip or info.

:I am trying to get the vlan-table of a switch via snmp

:1.3.6.1.4.1.9.5.1.9.2.1.1 in CISCO-STACK-MIB works for a catalyst switch :(WS-C4006 Software, Version NmpSW: 8.1(1)), but on a C3500XL I get no :response.

Could you expand on what you mean by a "the vlan table" ? What properties are you hoping to be able to examine?

In IOS, a VLAN interface shows up in the interface table:

interfaces.ifTable.ifEntry.ifType.PORTNUMBER = 135 -> l2vlan 136 -> l3ipvlan 137 -> l3ipxvlan

If you want to know whether a particular IP or MAC is associated with a particular VLAN interface, you can walk at.atTable.atEntry For example,

at.atTable.atEntry.atPhysAddress.3.1.192.168.135.9 = Hex: 00 30 A3 00 08 19

The '3' there is the interface number.

(Recall that it is possible for any particular MAC to be associated with multiple IPs or multiple VLANs.)

There used to be issues with "snmp community indexing", but my searching suggests that might only have been for CatOS ftp://ftp.cisco.com/pub/mibs/supportlists/wsc6509/wsc6509-communityIndexing.html

"snmp-server context" seems to have appeared and disappeared more than once... I'm a bit lost as to the present state of snmp contexts.

Reply to
Walter Roberson

Hi Walter!

I just need a list of all the VLANs that exist on the switch.

1.3.6.1.4.1.9.5.1.9.2.1.1 (on the Catalyst) gives me:

$ snmpwalk -c public -v 1 switch 1.3.6.1.4.1.9.5.1.9.2.1.1 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.1 = INTEGER: 1 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.2 = INTEGER: 2 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.3 = INTEGER: 3 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.4 = INTEGER: 4 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.5 = INTEGER: 5 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.6 = INTEGER: 6 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.7 = INTEGER: 7 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.8 = INTEGER: 8 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.9 = INTEGER: 9 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.50 = INTEGER: 50 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.51 = INTEGER: 51 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.99 = INTEGER: 99 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.100 = INTEGER: 100 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.101 = INTEGER: 101 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.1002 = INTEGER: 1002 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.1003 = INTEGER: 1003 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.1004 = INTEGER: 1004 SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.1005 = INTEGER: 1005

I just want to get a list like that on a switch with cisco ios.

thanks for the help, Herlind

Reply to
Herlind Wurth

In article , Herlind Wurth wrote: :I just need a list of all the VLANs that exist on the switch. :1.3.6.1.4.1.9.5.1.9.2.1.1 (on the Catalyst) gives me:

:$ snmpwalk -c public -v 1 switch 1.3.6.1.4.1.9.5.1.9.2.1.1 :SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.1 = INTEGER: 1 :SNMPv2-SMI::enterprises.9.5.1.9.2.1.1.2 = INTEGER: 2

walk interfaces.ifTable.ifEntry.ifName and match against Vlan in the interface name results.

I do not know at the moment if there is a more direct way.

Reply to
Walter Roberson

I do not have access to any of these boxes, but filtering on the interface type might be another option to check out.

/js

Reply to
Juergen Schoenwaelder

Hi Walter!

Can you please elaborate a little more on how I should do that.

I can find no Object "interfaces.ifTable.ifEntry.ifName"

under interfaces.ifTable.ifEntry = 1.3.6.1.2.1.2.2.1 I can't find any ifName Do you mean ifDescr (2)?

the only ifName I can find is ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName =

1.3.6.1.2.1.31.1.1.1.1

Both give me a list with the names of the interfaces. So how can I match them against the VLAN?

thanks, Herlind

Reply to
Herlind Wurth

In article , Herlind Wurth wrote: :Can you please elaborate a little more on how I should do that.

:I can find no Object "interfaces.ifTable.ifEntry.ifName"

:under interfaces.ifTable.ifEntry = 1.3.6.1.2.1.2.2.1 I can't find any ifName :Do you mean ifDescr (2)?

Yes, sorry.

:the only ifName I can find is ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifName = :1.3.6.1.2.1.31.1.1.1.1

That one works too.

:Both give me a list with the names of the interfaces. So how can I match :them against the VLAN?

The interface name in the MIB will be "vl" or "vlan" (possibly uppercase) followed by the VLAN number.

If you need to figure out which interface is "above" or "below" another interface, there is now a MIB for that; I found the reference once, but I think I lost it again.

Reply to
Walter Roberson

It is in the IF-MIB, see RFC 2863 for the current version.

/js

Reply to
Juergen Schoenwaelder

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.