EasyManuals Logo

Cisco Catalyst 3750-X User Manual

Cisco Catalyst 3750-X
1438 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #441 background imageLoading...
Page #441 background image
14-15
Catalyst 3750-X and 3560-X Switch Software Configuration Guide
OL-21521-01
Chapter 14 Configuring Auto Smartports Macros
Configuring Auto Smartports
Configuring Auto Smartports User-Defined Macros
The Cisco IOS shell provides basic scripting capabilities for configuring the user-defined Auto
Smartports macros. These macros can contain multiple lines and can include any CLI command. You
can also define variable substitution, conditionals, functions, and triggers within the macro. This
procedure is optional.
Beginning in privileged EXEC mode, follow these steps to map a user-defined event trigger to a
us
er-defined macro.
This example shows how to map a user-defined event tri
gger called media player to a user-defined
macro.
a. Connect the media player to an 802.1x- or MAB-enabled switch port.
b. On the RADIUS server, set the attribute-value pair to auto-smart-port =MP_EVENT.
c. On the switch, create the event trigger MP_EVENT, and enter the user-defined macro commands
shown below.
d. The switch recognizes the attribute-value pair=MP_EVENT response from the RADIUS server and
applies the macro associated with this event trigger.
Switch(config)# shell trigger MP_EVENT mediaplayer
Switch(config)# macro auto execute
MP_EVENT {
if [[ $LINKUP -eq YES ]]; then
conf t
interface $INTERFACE
macro description $TRIGGER
switchport access vlan 1
switchport mode access
switchport port-security
switchport port-security maximum 1
switchport port-security violation restrict
switchport port-security aging time 2
switchport port-security aging type inactivity
spanning-tree portfast
spanning-tree bpduguard enable
exit
fi
if [[ $LINKUP -eq NO ]]; then
Command Purpose
Step 1
configure terminal Enter global configuration mode.
Step 2
macro auto execute event trigger
[parameter=value] {function
contents}
Specify a user-defined macro that maps to an event trigger.
{fu
nction contents} Specify a user-defined macro to associate with the
trigger. Enter the macro contents within braces. Begin the Cisco IOS shell
commands with the left brace and end the command grouping with the right
brace.
(Optional) par
ameter=value—Replace default values that begin with $, enter
new values in the form of name value pair separated by a space:
[<name1>=<value1> <name2>=<value2>...].
Step 3
end Return to privileged EXEC mode.
Step 4
show running-config Verify your entries.
Step 5
copy running-config startup-config (Optional) Save your entries in the configuration file.

Table of Contents

Other manuals for Cisco Catalyst 3750-X

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cisco Catalyst 3750-X and is the answer not in the manual?

Cisco Catalyst 3750-X Specifications

General IconGeneral
Switching Capacity160 Gbps
Stacking Bandwidth64 Gbps
Max Stacking Units9
Layer SupportLayer 2 and Layer 3
Form FactorRack-mountable
DRAM256 MB
Flash Memory64 MB
ModelCisco Catalyst 3750-X Series
Ports24 or 48 10/100/1000 Ethernet ports
Uplink Interfaces4 SFP or 2 SFP+
FeaturesStackWise Plus, EnergyWise
ImageIP Base or IP Services
Operating Temperature0 to 40°C
Operating Humidity10 to 85% noncondensing

Related product manuals