
Solved!
Go to SolutionChanging Access Vlan via PYSNMP
I would like to change 'switchport access vlan <>' configuration via PYSNMP library.
For example, I would like change the configuration 'switchport access vlan 202' to 'switchport access vlan 201' via SNMP. The interface is in 'switchport mode access' mode.
VLAN membership mode........................... Access Mode
VLAN membership................................ 202
What MIB objects need to be changed for the same ?
I'm doing the following, but it does not work.
- Removing the bit for the if_index from 1.3.6.1.2.1.17.7.1.4.3.1.4.202
- Adding the bit for the if_index to 1.3.6.1.2.1.17.7.1.4.3.1.4.201
If I also change '1.3.6.1.2.1.17.7.1.4.5.1.1.<if_index>' MIB to 201, it adds 'switchport general pvid 201' configuration, but 'switchport access vlan 202' remains as is.
snmpget/snmpwalk output shows this for 201 ... it does not change whatever I do.
snmpget -v2c -c public <ip> 1.3.6.1.2.1.17.7.1.4.3.1.2.201
SNMPv2-SMI::mib-2.17.7.1.4.3.1.2.201 = Hex-STRING: 90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
snmpget -v2c -c public <ip> 1.3.6.1.2.1.17.7.1.4.3.1.4.201
SNMPv2-SMI::mib-2.17.7.1.4.3.1.4.201 = Hex-STRING: 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00
SNMP configuration on switch has this:
snmp-server community "public" rw
What am I missing ?
Appreciate your quick help on this.
Responses (0)
Solutions (0)
