Port security enable/disable using snmp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 04:48 AM - edited 07-14-2021 06:29 AM
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
- Labels:
-
Network Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 04:52 AM
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! '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 05:28 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2021 08:35 AM
- 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! '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2021 06:11 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2021 11:46 PM
- 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! '
