10-5
Cisco ME 3400 EthernetAccess Switch SoftwareConfiguration Guide
78-17058-01
Chapter10 Configuring Command Macro s Displaying Command Macros
You can delete a global macro-applied configuration on a switch only by entering the no version of each
command that is in the macro. You can delete a macro-applied configuration on an interface by entering
the default interface interface-id interface configuration command.
This example shows how to apply the user-created macro called snmp, to set th e host nam e addr ess to
test-server, and to set the IP precedence value to 7:
Switch(config)# macro global apply snmp ADDRESS test-server VALUE 7
This example shows how to debug the user -crea ted ma cro c alle d snmp by using the macro global trace
global configuration command to find any syntax or configuration errors in the macro w hen it is applied
to the switch.
Switch(config)# macro global trace snmp VALUE 7
Applying command...‘snmp-server enable traps port-security’
Applying command...‘snmp-server enable traps linkup’
Applying command...‘snmp-server enable traps linkdown’
Applying command...‘snmp-server host’
%Error Unknown error.
Applying command...‘snmp-server ip precedence 7’
This example shows how to apply the user-created macro called desktop-config and to verify t he
configuration.
Switch(config)# interface gigabitethernet0/2
Switch(config-if)# macro apply desktop-config
Switch(config-if)# end
Switch# show parser macro description
Interface Macro Description
--------------------------------------------------------------
Gi0/2 desktop-config
--------------------------------------------------------------
This example shows how to apply the user-created macro called desktop-config and to replace all
occurrences of VLAN 1 with VLAN 25:
Switch(config-if)# macro apply desktop-config vlan 25
Displaying Command Macros
To display the command macros, use one or more of the privileged EXEC commands in Table10-1.
Table10-1 Commands for Displaying Command Macros
Command Purpose
show parser macro Displays all configured macros.
show parser macro name macro-name Displays a specific macro.
show parser macro brief Displays the configured macro names.
show parser macro description [interface
interface-id]Displays the macro description for all interfaces or for a specified
interface.