Quick Reference Guide
Using the Command Line Interface | 31
Mode-based Command Hierarchy
As introduced above, the CLI is divided into various modes. Commands in a particular mode are not
available until the operator switches to that mode, with the exception of the User Exec mode
commands. The User Exec mode commands may also be executed in the Privileged Exec mode.
Interface VLAN In the Global Config mode,
enter the command
interface
vlan
vlanid.
hostname (conf-if-vl-vlan-id) # To exit to the Global Config mode, enter the
exit command, or press Ctrl-Z to switch to
the User Exec mode.
Line Config Mode In the Global Config mode,
enter the
lineconfig
command
hostname (line) # To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Mac Access List
Config
In the Global Config mode,
enter the
mac access-list
extended command
hostname (Mac-Access-List
Config)#
To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Interface
ManagementEthernet
In the Global Config mode,
enter the
interface
managementethernet
command
hostname (Config-if-ma)# To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Policy Map In the Global Config mode,
enter the
policy-map
command
hostname (Config-policy-map)# To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Policy Class In the Policy Map mode enter
the
class command
hostname
(Config-policy-classmap)#
To exit to the Policy Map mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Router OSPF Config In the Global Config mode,
enter the
router ospf
command
hostname (Config-router)# To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Router RIP Config In the Global Config mode,
enter the
router rip command
hostname (Config-router)# To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Bwprovisioning -
bwallocation Config
Mode
From the Bwprovisioning
mode, enter the
bwallocation command.
Switch
(Config-bwp-bwallocati
on)#
To exit to the Bwprovisioning mode, enter
exit. To return to the User Exec mode, enter
ctrl-Z.
Stacking Config In the Global Config mode,
enter the
stack command.
hostname (Config-stack)# To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
TACACS Config In the Global Config mode,
enter the
tacacs-server
host ip-address command.
hostname (Tacacs)# To exit to the Global Config mode, enter the
exit command. To return to the User Exec
mode, enter Ctrl-Z.
Table 4-2. Command Modes
Command Mode Mode Access Method Prompt Exit or Access Previous Mode