Cisco WS-C6506 Software Manual page 1432

Catalyst 6500 series switch
Hide thumbs Also See for WS-C6506:
Table of Contents

Advertisement

Using SmartPorts
In the above examples, $CDPVER is a global variable and $DATAVLAN and $AUXVLAN are per-port
variables. $DATAVLAN is also defined as a global variable. If a macro is using the variable
$DATAVLAN and the macro is applied to a port other than ports 3/2 or 3/3, the macro would use the
value of 77 for that port. After a variable and its values are defined, they are stored in NVRAM.
Using Special Variables
A macro could have a variable that is not predefined; the variable would get its value when the macro is
applied. #MODPORT is one such variable. For example, assume that a macro has the variable
#MODPORT in its definition. When the macro is applied on a module/port, the variable #MODPORT
is replaced by the module/port (mod/port) on which the macro is applied. An example is as follows:
Console> (enable) set macro name videophone
Enter macro commands one per line. End with character @.
set port enable #MODPORT
set vlan $DATAVLAN #MODPORT
set port auxiliaryvlan #MODPORT $AUXVLAN
@
Console> (enable)
In the above example, #MODPORT is a special variable that gets its value when the macro videophone
is applied on a port.
#MODPORT is currently the only special variable supported.
Note
Applying a User-Defined Macro
After the macro is created, it can be applied to a port. When a macro is applied to a port, the commands
in the macro definition are executed on the switch. If the commands in the macro definition use any
variables, the variables are replaced by their respective user-defined values and then the commands are
executed. Use the set port macro mod/port name_of_macro command to apply a macro to a port.
To create and execute a user-defined macro, perform these steps:
Step 1
Create the macro.
Console> (enable) set macro name videophone
Enter macro commands one per line. End with character @.
set port enable #MODPORT
set vlan $DATAVLAN #MODPORT
set port auxiliaryvlan #MODPORT $AUXVLAN
@
Macro videophone successfully created
Console> (enable)
Define the macro variables.
Step 2
Console> (enable) set macro variable $DATAVLAN 3 3/2
Variable DATAVLAN successfully created
Console> (enable) set macro variable $DATAVLAN 5 3/3
Console> (enable) set macro variable $AUXVLAN 4 3/2
Catalyst 6500 Series Switch Software Configuration Guide—Release 8.7
55-50
Chapter 55
Configuring a VoIP Network
OL-8978-04

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Catalyst 6506Catalyst 6509Catalyst 6513

Table of Contents