Start a Conversation

Solved!

Go to Solution

1 Rookie

 • 

2 Posts

36

November 4th, 2023 04:52

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.

Moderator

 • 

3.4K Posts

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,

1 Rookie

 • 

2 Posts

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.

Moderator

 • 

3.1K Posts

06-11-2023 06:05 PM

Hello Royal_One,

 

You have that correct. You would use CLI to make configuration changes and SNMP for monitoring.

DELL-Charles R

Social Media and Communities Professional
Dell Technologies | Enterprise Support Services
#IWork4Dell

Did I answer your query? Please click on ‘Accept as Solution’. ‘Thumbs up’ the posts you like!

No Events found!

Top