- Preface
- Overview
- Using the Command-Line Interface
- Assigning the Switch IP Address and Default Gateway
- Configuring Cisco IOS Configuration Engine
- Configuring MODBUS TCP
- Administering the Switch
- Configuring Switch Alarms
- Configuring Switch-Based Authentication
- Configuring SDM Templates
- Configuring IEEE 802.1x Port-Based Authentication
- Configuring Web-Based Authentication
- Configuring Interfaces
- Configuring Smartports Macros
- Configuring VLANs
- Configuring Private VLANs
- Configuring IEEE 802.1Q and Layer 2 Protocol Tunneling
- Configuring STP
- Configuring MSTP
- Configuring Optional Spanning-Tree Features
- Configuring Resilient Ethernet Protocol
- Configuring Flex Links and the MAC Address-Table Move Update Feature
- Configuring DHCP Features and IP Source Guard
- Configuring Dynamic ARP Inspection
- Configuring LLDP and LLDP-MED
- Configuring IGMP Snooping and MVR
- Configuring Port-Based Traffic Control
- Configuring CDP
- Configuring UDLD
- Configuring SPAN and RSPAN
- Configuring RMON
- Configuring System Message Logging
- Configuring SNMP
- Configuring Embedded Event Manager
- Configuring Network Security with ACLs
- Configuring Control-Plane Security
- Configuring QoS
- Configuring EtherChannels and Link State Tracking
- Configuring IP Unicast Routing
- Configuring IPv6 Unicast Routing
- Configuring IPv6 MLD Snooping
- Configuring IPv6 ACLs
- Configuring HSRP
- Configuring Cisco IOS IP SLAs Operations
- Configuring Enhanced Object Tracking
- Configuring Ethernet OAM, CFM, and E-LMI
- Configuring IP Multicast Routing
- Configuring MSDP
- Troubleshooting
- Configuring Online Diagnostics
- Supported MIBs
- Working with the Cisco IOS File System, Configuration Files, and Software Images
- MODBUS TCP Registers
- Unsupported Commands in Cisco IOS Release 12.2(53)EX
Configuring Smartports Macros
Understanding Smartports Macros
Smartports macros provide a convenient way to save and share common configurations. You can use Smartports macros to enable features and settings based on the location of a switch in the network and for mass configuration deployments across the network.
Each Smartports macro is a set of CLI commands. The switch software has a set of default macros. You can also create your own macros. Smartports macros do not contain new CLI commands; they are simply a group of existing CLI commands.
A macro can be user defined or system default (which cannot be edited by user).
Configuring Smartports Macros
- Default Smartports Configuration
- Smartports Configuration Guidelines
- Creating Smarports Macros
- Applying Smartports Macros
Default Smartports Configuration
There are no Smartports macros enabled on the switch.
|
|
|
|---|---|
|
|
|
Use this global configuration macro to configure the switch settings for the industrial Ethernet environment. This macro is automatically applied when you use Express Setup to initially configure the switch. Note You must first apply the cisco-cg-global macro for the interface configuration macros to work properly. |
|
Use this global configuration macro to configure the password settings for the switch. |
|
Use the no form of this global configuration macro to delete the macro from the switch. |
|
Use this global configuration macro to configure SPAN functionality to analyze traffic on another port of the switch. |
|
Use the no form of this global configuration macro to delete the macro from the interface. |
|
|
|
|
Use this interface configuration macro for increased network security and reliability when connecting a desktop device, such as a PC, to a switch port. This macro is optimized for utility deployments. |
|
Use the no form of this interface configuration macro to delete the macro from the switch. |
|
Use this interface configuration macro when connecting the switch to an IED. |
|
Use the no form of this interface configuration macro to delete the macro from the switch. |
|
Use this interface configuration macro when connecting the switch and a WAN router. This macro is optimized for utility deployments. |
|
Use the no form of this interface configuration macro to delete the macro from the switch. |
|
Use this interface configuration macro when connecting a ring of switches. This macro is optimized for utility deployments. |
|
Use the no form of this interface configuration macro to delete the macro from the switch. |
|
Use this interface configuration macro when connecting the switch and a wireless access point. This macro is optimized for utility deployments. |
|
Use the no form of this interface configuration macro to delete the macro from the switch. |
|
Use this interface configuration macro for increased network security and reliability when connecting a desktop device, such as a PC, to a switch port. This macro is optimized for utility deployments. |
|
Use the no form of this interface configuration macro to delete the macro from the interface. |
|
|
1.Cisco-default Smartports macros vary, depending on the software version running on your switch. |
Smartports Configuration Guidelines
- You can apply a macro globally or to a specific switch interface.
- When creating a macro, do not use the exit or end commands or change the command mode by using interface interface-id. This could cause commands that follow exit, end, or interface interface-id to execute in a different command mode.
- When creating a macro, all CLI commands should be in the same configuration mode.
- When you apply a macro to an interface, the CLI commands within the macro are configured on the interface. The existing interface configurations are not lost.
The new commands are added to the interface and are saved in the running configuration file. This is helpful when applying an incremental configuration
- If a command fails because of a syntax or a configuration error, the macro continues to apply the remaining commands. You can use the macro global trace macro-name global configuration command or the macro trace macro-name interface configuration command to apply and debug a macro to find any syntax or configuration errors.
- When creating a macro that requires the assignment of unique values, use the parameter value keywords to designate values specific to the interface. Keyword matching is case sensitive. All matching occurrences of the keyword are replaced with the corresponding value. Any full match of a keyword, even if it is part of a larger string, is considered a match and is replaced by the corresponding value.
- Macro names are case sensitive. For example, the commands macro name Sample-Macro and macro name sample-macro will result in two separate macros.
- Some macros might contain keywords that require a parameter value. You can use the macro global apply macro-name ? global configuration command or the macro apply macro-name ? interface configuration command to display a list of any required values in the macro. If you apply a macro without entering the keyword values, the commands are invalid and are not applied.
- If you modify a macro definition by adding or deleting commands, the changes are not reflected on the interface where the original macro was applied. You need to reapply the updated macro on the interface to apply the new or changed commands.
- Some CLI commands are specific to certain interface types. If you apply a macro to an interface that does not accept the configuration, the macro fails the syntax or the configuration check, and the switch returns an error message.
- Applying a macro to an interface range is the same as applying a macro to a single interface. When you use an interface range, the macro is applied sequentially to each interface within the range. If a macro command fails on one interface, it is still applied to the remaining interfaces.
- When you apply a macro to a switch or a switch interface, the macro name is automatically added to the switch or interface. You can display the applied commands and macro names by using the show running-config user EXEC command.
- When you apply a macro to a user network interface (UNI) or enhanced network interface (ENI), you must first enable the port. UNIs and ENIs are disabled by default.
Creating Smarports Macros
Beginning in privileged EXEC mode, follow these steps to create a Smartports macro:
The no form of the macro name global configuration command only deletes the macro definition. It does not affect the configuration of those interfaces on which the macro is already applied.
This example shows how to create a macro that defines the switchport access VLAN and the number of secure MAC addresses and also includes two help string keywords by using # macro keywords :
Applying Smartports Macros
Beginning in privileged EXEC mode, follow these steps to apply a Smartports macro:
You can delete the cisco-cg-password and cisco-sniffer global macros on a switch by entering the no version of each command in the macro. The cisco-cg-global global macro does not have a no version. You can delete a macro-applied configuration on a port by entering the default interface interface-id interface configuration command.
This example shows how to display the cisco-desktop macro and how to set the access VLAN ID to 25 on an interface:
Displaying Smartports Macros
To display the Smartports macros, use one or more of the privileged EXEC commands in Table 13-2 .
|
|
|
|---|---|
Displays the Smartports macro description for all interfaces or for a specified interface. |
Feedback