Previous Topic

Next Topic

Book Contents

Command Modes

The CLI groups commands into modes according to the command function. Each of the command modes supports specific software commands. The commands in one mode are not available until you switch to that particular mode, with the exception of the User EXEC mode commands. You can execute the User EXEC mode commands in the Privileged EXEC mode. The command prompt changes in each command mode to help you identify the current mode.

Table below describes the command modes.

Command Modes

Command Mode

Prompt

Mode Description

User EXEC

Switch>

Contains a limited set of commands to view basic system information.

Privileged EXEC

Switch#

Allows you to issue any EXEC command, enter the VLAN mode, or enter the Global Configuration mode.

Global Config

Switch (Config)#

Groups general setup commands and permits you to make modifications to the running configuration.

VLAN Config

Switch (Vlan)#

Groups all the VLAN commands.

Interface Config

Switch (Interface unit/slot/port)#

Switch (Interface Loopback id)#

Switch (Interface Tunnel id)#

Switch (Interface unit/slot/port

(startrange)-unit/slot/port(endrange)#

Manages the operation of an interface and provides access to the router interface configuration commands.

Use this mode to set up a physical port for a specific logical connection operation. This mode is also used to manage the operation of a range of interfaces.

Line Console

Switch (config-line)#

Contains commands to configure outbound

telnet settings and console interface settings, as well as to configure console login/enable

authentication.

Line SSH

Switch (config-ssh)#

Contains commands to configure SSH login/

enable authentication.

Line Telnet

Switch (config-telnet)#

Contains commands to configure telnet login/

enable authentication.

AAA IAS User Config

Switch (Config-IAS-User)#

Allows password configuration for a user in the IAS database.

Mail Server Config

Switch (Mail-Server)#

Allows configuration of the email server.

Policy Map Config

Switch (Config-policy-map)#

Contains the QoS Policy-Map configuration commands.

Policy Class Config

Switch (Config-policy-class-map)#

Consists of class creation, deletion, and matching commands. The class match commands specify Layer 2 and general match criteria.

Class Map Config

Switch (Config-class-map)#

Contains the QoS class map configuration commands.

Router OSPF Config

Switch (Config-router)#

Contains the OSPF configuration commands.

Router RIP Config

Switch (Config-router)#

Contains the RIP configuration commands.

Router BGP Config

Switch (Config-router)#

Contains the BGP4 configuration commands.

MAC Access-list Config

Switch (Config-mac-access-list)#

Allows you to create a MAC Access-List and to enter the mode containing MAC Access-List configuration commands.

TACACS Config

Switch (Tacacs)#

Contains commands to configure properties for the TACACS servers.

DHCP Pool Config

Switch (Config dhcp-pool)#

Contains the DHCP server IP address pool configuration commands.

DHCPv6 Pool Config

Switch (Config dhcp6-pool)#

Contains the DHCPv6 server IPv6 address pool configuration commands.

ARP Access-List Config Mode

Switch (Config-arp-access-list)#

Contains commands to add ARP ACL rules in an ARP Access List.

VRF Config

Switch (Config-vrf-<vrf-name>)#

Contains commands to configure route distinguisher and IP route for particular VRF.

Erps ring config

switch (Config-ERP-Ring-ring id)#

contains commands to configure ERPS rings.

Erps ringlet config

switch (Config-ERP-Ringlet-ringlet-Id)#

Contains commands to configure ERPS ringlets.

Table below explains how to enter or exit each mode.

Command Mode

Access Method

Exit or Access Previous Mode

User EXEC

This is the first level of access.

To exit, enter logout.

Privileged EXEC

From the User EXEC mode, enter enable

To exit to the User EXEC mode, enter exit or press Ctrl-Z.

Global Config

From the Privileged EXEC mode, enter configure.

To exit to the Privileged EXEC mode, enter exit, or press Ctrl-Z.

VLAN Config

From the Privileged EXEC mode, enter vlan database

To exit to the Privileged EXEC mode, enter exit, or press Ctrl-Z.

Interface Config

From the Global Config mode, enter:

interface unit/slot/port or interface loopback id or interface tunnel id interface unit/slot/port(startrange)-unit/slot/port(endrange)

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Line Console

From the Global Config mode, enter line console.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

AAA IAS User

Config

From the Global Config mode, enter aaa ias-user username name.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Mail Server Config

From the Global Config mode, enter mail-server address

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Policy Map Config

From the Global Config mode, enter policy-map.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Policy Class Config

From the Policy Map mode enter class.

To exit to the Policy Map mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Class Map Config

From the Global Config mode, enter class-map, and specify the optional keyword ipv4 to specify the Layer 3 protocol for this class.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Router OSPF Config

From the Global Config mode, enter router ospf.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Router RIP Config

From the Global Config mode, enter router rip.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

Router BGP Config

From the Global Config mode, enter router bgp as number

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

MAC Access-list Config

From the Global Config mode, enter mac access-list extended name.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

TACACS Config

From the Global Config mode, enter tacacs-server host ip-addr, where ip-addr is the IP address of the TACACS server on your network.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

DHCP Pool Config

From the Global Config mode, enter ip dhcp pool pool-name.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

DHCPv6 Pool Config

From the Global Config mode, enter ip dhcpv6 pool pool-name.

To exit to the Global Config mode, enter exit. To return to the Privileged EXEC mode, enter Ctrl-Z.

ARP Access-List Config Mode

From the Global Config mode, enter the arp access-list command.

To exit to the Global Config mode, enter the exit command. To return to the Privileged EXEC mode, enter Ctrl-Z.

VRF Config

From the Global Config mode, enter vrf <vrf-name>

To exit to the Global Config mode, enter the exit command.

Erps ring Config

From Global Config mode, enter switch (Config-ERP-Ring-ring-Id)#

To exit to the Global Config mode, enter the exit command.

Erps ringlet Config

From Global Config mode, enter switch (Config-ERP-Ringlet-ringlet-Id)#

To exit to the Global Config mode, enter the exit command.

See also

TEJOS Modules

Command Completion and Abbreviation

CLI Error Messages

CLI Line-Editing Conventions

Using CLI Help

Accessing and Using CLI