11-03-2011 06:44 AM
I want to add the command "no logging event link-status" to all switchport mode access ports EXCEPT for the ones with the following switchport access vlans: 4022,4032,4042,4052,4072 & 4082. How do I create a compliance template to do this?
LMS 3.2, RME 4.3.1
Solved! Go to Solution.
11-03-2011 11:22 AM
Try this pattern for the prereq:
+ switchport access vlan [#(?!(4022|4032|4042|4052|4072|4082)).*#]
11-03-2011 07:57 AM
Try this:
Name: VlanPrereq
IsPrereq: Yes
Sub-mode: interface [#(Fast|Gigabit)Ethernet#]
Body:
+ switchport access vlan [#(?!(4022|4032|4042|4052|4072|4082))#]
Name: DeployLinkStatus
Prereq: VlanPrereq
Parent: VlanPrereq
Body:
+ no logging event link-status
11-03-2011 08:09 AM
Tried it & it didn't work. Here is a sample config of the ports. Command should not deploy on ports fa1 & 3 & gi1 but should deploy on fa2,4-8.
interface FastEthernet0/1
description NetOps Data/VoIP
switchport access vlan 4082
switchport mode access
switchport nonegotiate
switchport voice vlan 4083
snmp trap mac-notification change added
spanning-tree portfast
ip dhcp snooping trust
!
interface FastEthernet0/2
description NetOps Data/VoIP
switchport access vlan 661
switchport mode access
switchport nonegotiate
switchport voice vlan 4083
snmp trap mac-notification change added
spanning-tree portfast
!
interface FastEthernet0/3
switchport trunk encapsulation dot1q
switchport mode trunk
switchport nonegotiate
spanning-tree portfast trunk
spanning-tree bpduguard disable
ip dhcp snooping trust
!
interface FastEthernet0/4
description NetOps Data/VoIP
switchport access vlan 661
switchport mode access
switchport nonegotiate
switchport voice vlan 4083
ip access-group POLICY in
authentication order dot1x mab webauth
authentication port-control auto
authentication fallback WEB_AUTH_PROFILE
mab
snmp trap mac-notification change added
no snmp trap link-status
dot1x pae authenticator
dot1x timeout tx-period 5
no lldp transmit
spanning-tree portfast
!
interface FastEthernet0/5
description NetOps Data
switchport access vlan 661
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/6
description NetOps Data/VoIP
switchport access vlan 661
switchport mode access
switchport nonegotiate
switchport voice vlan 4083
snmp trap mac-notification change added
spanning-tree portfast
!
interface FastEthernet0/7
description VoIP Phone 43170
switchport access vlan 661
switchport mode access
switchport nonegotiate
switchport voice vlan 4083
snmp trap mac-notification change added
!
interface FastEthernet0/8
description Docking Station
switchport access vlan 661
switchport mode access
switchport nonegotiate
switchport voice vlan 4083
snmp trap mac-notification change added
!
interface GigabitEthernet0/1
description Feed from c3750uhs011a fa3/0/30
switchport trunk encapsulation dot1q
switchport mode trunk
switchport nonegotiate
rmon collection history 10101 owner campusmanager buckets 10 interval 300
spanning-tree portfast trunk
spanning-tree bpduguard disable
ip dhcp snooping trust
!
11-03-2011 10:38 AM
Sorry, typo:
Name: VlanPrereq
IsPrereq: Yes
Sub-mode: interface [#(Fast|Gigabit)Ethernet.*#]
Body:
+ switchport access vlan [#(?!(4022|4032|4042|4052|4072|4082))#]
Name: DeployLinkStatus
Prereq: VlanPrereq
Parent: VlanPrereq
Body:
+ no logging event link-status
11-03-2011 11:11 AM
Now I get CM0152 Prerequisite Commands does not exist in device archive
11-03-2011 11:22 AM
Try this pattern for the prereq:
+ switchport access vlan [#(?!(4022|4032|4042|4052|4072|4082)).*#]
11-03-2011 11:29 AM
That did it! Thank you!!!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide