cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2053
Views
0
Helpful
4
Replies

help using snmp to set trunk port

barry.ard
Level 1
Level 1

I need some assistance in locating the mib/variables to allow me to set a trunk port and add/remove vlans on that interface. The equivalent of:

switchport mode trunk

switchport trunk encapsulation dot1q

switchport trunk allowed vlan 400,401

This is on a 4506 running IOS 12.2.25 but will later include other IOS based switches. I could use setHostConfig and but would like to avoid that if possible.

Thanks,

Barry

4 Replies 4

ToddWarren
Level 1
Level 1

Not sure if this will give you all you need, but.....the closest I could find are:

CISCO-L2L3-interface-config-mib

CICSO-VTP-MIB

Hopefully, these 2 MIB's can maybe lead you in the right direction. Go here to view these:

http://tools.cisco.com/Support/SNMP/do/BrowseMIB.do?local=en&step=2

Hi Todd,

I had looked at the CISCO-VTP-MIB and my first thoughts was that it was just informational but after closer inspection I think it will do what I want but not without a lot of pain.

Thanks for your input.

Barry.

"There is no joy, if there is no pain." author unknown, but probably a Cisco Sales Engineer :o).

rolf.fischer_2
Level 1
Level 1

Barry,

I really would not recommend to do so.

First you need to know which interface-index is associated to the interface. That's not a big thing but it has to be done first.

Then you need to change several OIDs in the CISCO-VTP-MIB, like vlanTrunkPortDynamicStatus (1.3.6.1.4.1.9.9.46.1.6.1.1.14.Index). (This one is read-only access so you can't set it, it's just an example for trunk related OIDs)

A VERY good source for OIDs is http://www.mibdepot.com, use the search function.

(Try keyword: TrunkPortDynamicStatus to get an idea)

But, like mentioned before, you need to change several OIDs and you really need to know what you're doing.

I personally read (GET, GETNEXT) information like that from my devices but I wouldn't set them.

And: Different plattform - different OIDs.

Hope, that helped at least a little bit.

Regards

Rolf