cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3121
Views
0
Helpful
5
Replies

Port security enable/disable using snmp

Amardeep Singh
Level 1
Level 1

Hi Guys,

 

I am researching on setting the port segregation on the cisco switch using snmp. Is there any MIB that I can use to achieve this?

 

I want to enable/disable the port security on an interface / port. 

 

It tried using the cpsIfPortSecurityStatus identifier, but it gives error:

 

snmpset -c private TEST cpsIfPortSecurityStatus.5 integer 1

 

snmp2_set(): Error in packet at 'SNMPv2-SMI::enterprises.9.9.315.1.2.1.1.1.10120': commitFailed 

 

Thanks

 

 

5 Replies 5

marce1000
VIP
VIP

 

 - FYI : https://www.cisco.com/c/en/us/support/docs/ip/simple-network-management-protocol-snmp/15217-copy-configs-snmp.html

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Hi,

 

The above link shows how to copy over the configs. I want to achieve something different like I need mib/variables to allow me to set a trunk port and add/remove vlans on that interface. 

 

interface GigabitEthernet1/0/8
switchport trunk allowed vlan 101

 

 - You can also use the procedures in the mentioned-link to upload/merge small configuration-snippets into an existing running configuration hence applying changes as you describe. There are no-direct mib-variables for  that.

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

I also tried using the cpsIfPortSecurityStatus for setting the status on the interface.

 

Example : 

 

snmpset -c private TEST cpsIfPortSecurityStatus.0105 integer 1 

But it gives the error - 

'SNMPv2-SMI::enterprises.9.9.315.1.2.1.1.2.10105': notWritable (That object does not support modification)

 Please suggest.

 

 -  Verify/check  snmp rw community , also post switch model if problem does not get resolved

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Review Cisco Networking for a $25 gift card