Cisco Systems ME 3400 Switch User Manual


  Open as PDF
of 1086
 
10-5
Cisco ME 3400 Ethernet Access Switch Software Configuration Guide
OL-9639-06
Chapter 10 Configuring Command Macros
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 the hostname address 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-created macro called snmp by using the macro global trace
global configuration command to find any syntax or configuration errors in the macro when 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 the
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 Table 10-1.
Ta ble 10-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.