cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1784
Views
0
Helpful
1
Replies

Cisco Nexus - Event manager skip command

ltillman1
Level 1
Level 1

Hi There,

I'd like to 'protect' the switchport trunk allowed vlan command on interfaces, so that vlan's can be configured only with the add/remove/exept/all/none commands.
In IOS I can do this with the attached script ('borrowed' from http://networkengineering.stackexchange.com/questions/1190/accidentally-removed-allowed-vlans-from-cisco-switch-dot1q-trunk)

Unfortunually this doen't work on Nexus-OS Switches. Anyone who can help me with this?

event manager applet forbid-vlan-trunk
event cli pattern "switchport trunk allowed vlan\s+[0-9]" skip yes sync no
action 1.0 syslog msg "switchport trunk allowed vlan MUST be configured via add/remove"
1 Accepted Solution

Accepted Solutions

Joe Clarke
Cisco Employee
Cisco Employee

While CLI applets that block commands from running are possible in NX-OS, it does not appear you can match config commands.  So while you could match, for example, "show run" you can't match the "switchport trunk allowed vlan" command.

View solution in original post

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

While CLI applets that block commands from running are possible in NX-OS, it does not appear you can match config commands.  So while you could match, for example, "show run" you can't match the "switchport trunk allowed vlan" command.