
22-12
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 22 Configuring Cisco IOS Auto Smartport Macros
Configuring Auto Smartport Macros
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
The following represents the anti-macro portion of the automacro:
if [[ $LINKUP -eq NO ]]; then
conf t
interface $INTERFACE
no macro description $TRIGGER
no switchport access vlan 1
if [[ $AUTH_ENABLED -eq NO ]]; then
no switchport mode access
fi
no switchport port-security
no switchport port-security maximum 1
no switchport port-security violation restrict
no switchport port-security aging time 2
no switchport port-security aging type inactivity
no spanning-tree portfast
no spanning-tree bpduguard enable
exit
fi
}
Switch(config)#
end
lists the supported shell keywords your can apply in your macros and antimacro statements.
Table 22-4
Supported Cisco IOS Shell Keywords
Command
Description
{
Begin the command grouping.
}
End the command grouping.
[[
Use as a conditional construct.
]]
Use as a conditional construct.
else
Use as a conditional construct.
-eq
Use as a conditional construct.
fi
Use as a conditional construct.
if
Use as a conditional construct.
then
Use as a conditional construct.
-z
Use as a conditional construct.
$
Variables that begin with the $ character are
replaced with a parameter value.
#
Use the # character to enter comment text.
Содержание Catalyst 4500 Series
Страница 2: ......
Страница 4: ......
Страница 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...