11-3

Catalyst 2960 Switch Software Configuration Guide

78-16881-01

Chapter 11      Configuring Smartports Macros

Configuring Smartports Macros

Smartports Macro Configuration Guidelines

Follow these guidelines when configuring macros on your switch:

•

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 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.

•

When a macro is applied globally to a switch or to a switch interface, all existing configuration on 

the interface is retained. This is helpful when applying an incremental configuration.

•

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.

•

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. If a command fails because of a syntax error or a configuration error, the macro 

continues to apply the remaining commands.

•

Some CLI commands are specific to certain interface types. If a macro is applied to an interface that 

does not accept the configuration, the macro will fail the syntax check or the configuration check, 

and the switch will return 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.

There are Cisco-default Smartports macros embedded in the switch software (see 

Table 11-1

). You can 

display these macros and the commands they contain by using the 

show parser macro

 user EXEC 

command.

Follow these guidelines when you apply a Cisco-default Smartports macro on an interface:

•

Display all macros on the switch by using the 

show parser macro

 user EXEC command. Display 

the contents of a specific macro by using the 

show parser macro

 

macro-name

 user EXEC 

command.

•

Keywords that begin with 

$

 mean that a unique parameter value is required. Append the 

Cisco-default macro with the required values by using the 

parameter

 

value

 keywords. 

Page 217
Image 217
Open full-size image

2960 specifications

Cisco Systems 2960 series switches are a prominent solution in the networking landscape, known for their reliability, scalability, and feature-rich offerings. Ideal for small to medium-sized enterprises, these switches provide a robust foundation for network infrastructure, ensuring optimal performance and connectivity.

One of the standout features of the Cisco 2960 series is its Layer 2 switching capabilities. The switches support multiple VLANs (Virtual Local Area Networks), allowing network administrators to segment traffic efficiently and enhance security protocols. This is crucial in modern networks where managing traffic and isolating sensitive information is a priority.

The Cisco 2960 series also incorporates advanced Quality of Service (QoS) features, enabling the prioritization of critical applications and services. This functionality ensures that time-sensitive data, such as voice and video traffic, maintains a high quality of service even in congested networks. With support for IEEE 802.1p and DSCP marking, administrators can fine-tune their network performance to meet specific organizational needs.

Power over Ethernet (PoE) is another significant characteristic of the Cisco 2960 series. This feature allows switches to deliver electrical power alongside data over Ethernet cables to devices such as IP phones, wireless access points, and surveillance cameras. With PoE, organizations can reduce clutter from power cables and increase deployment flexibility for various devices.

In terms of security, the Cisco 2960 series is equipped with a range of integrated security features. The switch supports port security, 802.1X authentication, and Access Control Lists (ACLs), providing robust defenses against unauthorized access and potential network vulnerabilities. These security measures are essential for protecting sensitive data and ensuring compliance with industry regulations.

Moreover, the Cisco 2960 series offers enhanced network management capabilities with Cisco's Intelligent Network Services. This includes support for Simple Network Management Protocol (SNMP), Cisco Prime, and Embedded Event Manager (EEM), allowing for efficient monitoring, troubleshooting, and policy enforcement across the network.

Additionally, the Cisco 2960 switches provide various models and configurations, catering to different networking needs. Options include models with varying port densities, uplink configurations, and stacking capabilities, making it easy for organizations to choose solutions that align perfectly with their requirements.

In summary, the Cisco 2960 series is a versatile and essential component of modern networking environments. Its advanced features, including Layer 2 support, QoS, PoE, robust security, and diverse management tools, make it an excellent choice for organizations looking to build a strong and secure network infrastructure.