1 Rookie
•
2 Posts
0
46
Changing 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.
DELL-Young E
Moderator
Moderator
•
4K Posts
1
November 6th, 2023 06:50
Hello
We cannot change the switch ports configuration by configuring SNMP. If you want to change the port configuration you need to change port configuration as the switchport accesses VLAN 202 through switch CLI command line. SNMP is a monitoring tool used in switches.
https://dell.to/3u2pCEe
Above is the KB for VLAN and port configuration on N series switches
How to Configure Switchport Modes on Dell EMC Networking N Series Switch | Dell US
OID values can be used for monitoring the switch and retrieving info based on SNMP queries..
A switch is an agent and SNMP is a server application which runs on desktop or laptop or server computers.
Respectfully,
Royal_One
1 Rookie
1 Rookie
•
2 Posts
0
November 6th, 2023 16:47
@DELL-Young E Thank you so much for your quick response. Appreciate it.
As I understood from your response (please correct me if I am wrong), we cannot configure / change 'switchport access vlan' configuration (or, any other switchport configuration for that matter) via SNMP for Dell switches (We're using N series and S series switches). It needs to be done only via CLI.