- Overview
- Assigning the Switch IP Address and Default Gateway
- Configuring Switch Boot Optimization
- Administering the Switch
- Configuring the Switch Alarms
- Configuring SDM Templates
- Configuring Smartports Macros
- Configuring LLDP and LLDP-MED
- Configuring Port-Based Traffic Control
- Configuring CDP
- Configuring SPAN and RSPAN
- Configuring RMON
- Configuring System Message Logging
- Configuring SNMP
- Configuring Embedded Event Manager
- Configuring Cisco IOS IP SLAs Operations
- Configuring Ethernet OAM, CFM, and E-LMI
- Configuring Online Diagnostics
- Supported MIBs
Configuring Smartports Macros
This chapter describes how to configure Smartports macros on the Cisco Industrial Ethernet 2000U Series (IE 2000U) and Connected Grid Switches, hereafter referred to as switch . This chapter includes the following sections:
Information About 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).
Prerequisites
Guidelines and Limitations
- 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.
Default Settings
There are no Smartports macros enabled on the switch. The system default macros are listed in Table 7-1 .
|
|
|
|---|---|
|
|
|
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. |
Configuring Smartports Macros
This section includes the following topics:
Creating Smartports Macros
BEFORE YOU BEGIN
Review the “Guidelines and Limitations” section.
DETAILED STEPS
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.
EXAMPLE
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
BEFORE YOU BEGIN
Review the “Guidelines and Limitations” section.
DETAILED STEPS
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.
EXAMPLE
This example shows how to display the cisco - desktop macro and how to set the access VLAN ID to 25 on an interface:
Verifying Configuration
|
|
|
|---|---|
Displays the Smartports macro description for all interfaces or for a specified interface. |
Configuration Example
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 :
This example shows how to display the cisco-desktop macro and how to set the access VLAN ID to 25 on an interface:
Feature History
|
|
|
|---|---|
Feedback