SNMP Question: Can I configure VLANs remotely using SNMP?

kylef

Golden Member
Jan 25, 2000
1,430
0
0
Most of the uses of SNMP I've seen involve querying information from a network device, for reporting statistics.

I want to actually configure ports on a switch to either set up VLANs or enable/disable port mirroring. This is for a lab environment.

I'm fairly new to SNMP's capabilities. From what I understand, each manufacturer (or even each device) has its own set of objects that can be queried, and these are not standardized. So, even if this were possible, any scripts that worked with one type of switch would probably not work with another switch, correct?

Thanks for any pointers.
 

dphantom

Diamond Member
Jan 14, 2005
4,763
327
126
Correct. MIBs are unique to the manufacturer and device.

"The MIB is a method of describing managed objects by specifying the names, types, and order of the fields (or variables) that make up the object. The MIB can either be a standard one or can be what is known as an enterprise MIB.
Enterprise MIBs are those written by vendors for their particular object. The managed object can furnish both standard MIB and enterprise MIB information if there is an enterprise MIB written for it. There are many enterprise MIBs. CISCO systems, Cabletron, and IBM, for example, all have MIBs for their equipment. "

 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
yes, you can do just about anything with SNMP.

And most of the good stuff is proprietary to the device. It almost has to be.
 

kylef

Golden Member
Jan 25, 2000
1,430
0
0
Any reasonably-priced switches in particular that this is KNOWN to work on?

Or should I go with a brand-name switch like a Catalyst or Extreme Networks just to be safe?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
what exactly are you trying to do?

write your own SNMP set scripts? Or just use a tool to control the switch?

Generally the higher end switches have more tools/more controls (and better tools written for them), but that doesn't mean you have to get one. it all depends on what you're trying to accomplish.
 

kylef

Golden Member
Jan 25, 2000
1,430
0
0
I'll be writing some scripts to configure the VLAN(s) myself. Believe it or not, in our situation it would actually be preferable to use the SNMP APIs directly (in either Windows or in Perl) rather than using a proprietary tool, in order to eliminate the dependency on the tool. Then, to my understanding, we would only depend on the MIB for the particular switch we selected.

One of my concerns is that most of the lower-end managed switches (like Netgear) do not include management software for free, so I'm worried that trying to figure out the MIB for such a switch would be difficult. The OIDs do not seem to be included in the documentation, so I'm not sure where I would find them to know what values I should set to configure the VLANs. Are some switch manufacturers better than others at documenting this stuff?
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
Originally posted by: DainBrammage
Just get a Cisco 2950 and CLI into it or go throgh the web interface...

when you want to automate things that doesn't work.

the beauty of SNMP is setting things automatically, without a silly human having to enter commands.
 

cmetz

Platinum Member
Nov 13, 2001
2,296
0
0
spidey07, expect automates Cisco and other real CLIs well. Too bad some switch vendors don't understand the whole CLI concept (silly ANSI menu-driven interfaces, for example).

SNMP is okay if you have high-level tools that can deal with all the vendors you've got (typically, that means it's expensive software), or if you have pretty much one vendor and can write to their MIB only. I've found that SNMP gets less and less viable as you have more vendors in your network, especially for things like VLANs, which everybody seems to want to do differently. Hopefully, the standardized VLAN MIB will be supported by more current products and the interoperability problems will die off in time. SNMP has had a lot of that kind of growing pains.

kylef, if there is a MIB, the vendor should publish it somewhere and/or give it to you. Try Google first, and if that doesn't work try their tech support. Most manufacturers are happy to give you a copy of their MIBs. A lot of the MIBs are standardized, but typically the newer features on switches will not yet have standardized MIBs and/or won't yet be implemented. So typically the basic stuff you can use the standard MIBs for, and the more advanced stuff you'll need the vendor's MIBs for.

Suggestion to all, Cisco has a network management program out for free that talks to Cisco's gear, and if that's your thing I've heard it's okay. It might be possible to use said program to configure VLANs on a network of Cisco switches using SNMP.
 

kylef

Golden Member
Jan 25, 2000
1,430
0
0
Originally posted by: cmetz
Hopefully, the standardized VLAN MIB will be supported by more current products and the interoperability problems will die off in time. SNMP has had a lot of that kind of growing pains.
By "VLAN MIB" are you referring to RFC 2674, "Definitions of Managed Objects for Bridges with Traffic Classes, Multicast Filtering, and Virtual Lan Extensions (VLAN)"?

I've seen a few switches that claim to support this MIB... For instance, the Allied Telesyn Rapier-i series. If I were to write some scripts to configure VLANs according to this MIB, would the script work for any vendor implementing it, or would I still need vendor-specific mappings? (As I said, I'm still new to MIBs).

 

DainBrammage

Platinum Member
May 16, 2000
2,394
1
81
when you want to automate things that doesn't work.

the beauty of SNMP is setting things automatically, without a silly human having to enter commands.

Uhhhh someone still has to program the SNMP manager or set the options....

and the Cisco Supports SNMP. and yes you can script the CLI