Command Modes

The CLI groups commands into modes according to the command function. Each of the command modes supports specific LCOS SX 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 1 describes the command modes and the prompts visible in that mode.

Note:

The command modes available on your switch depend on the software modules that are installed. For example, a switch that does not support BGPv4 does not have the BGPv4 Router Command Mode.

Table 1. CLI 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 Database 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 Database 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)# Switch (Interface lag lag-intf-num)# Switch (Interface vlan vlan-id)# 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. You can also use this mode to manage the operation of a range of interfaces. For example the prompt may display as follows: Switch (Interface 1/0/1-1/0/4) # Enters LAG Interface configuration mode for the specified LAG. Enters VLAN routing interface configuration mode for the specified VLAN ID.
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, Layer 3, and general match criteria.
Class Map Config Switch (Config-class-map)# Contains the QoS class map configuration commands for IPv4.
Ipv6_Class-Map Config Switch (Config-class-map)# Contains the QoS class map configuration commands for IPv6.
Router OSPF Config Switch (Config-router)# Contains the OSPF configuration commands.
Router OSPFv3 Config Switch (Config rtr)# Contains the OSPFv3 configuration commands.
Router RIP Config Switch (Config-router)# Contains the RIP configuration commands.
BGP Router Config Switch (Config-router)# Contains the BGP4 configuration commands.
Route Map Config Switch (config-route-map)# Contains the route map configuration commands.
IPv6 Address Family Config Switch (Config-router-af)# Contains the IPv6 address family configuration commands.
L2VPN Address Family Config Switch (config-router-af-l2vpn-evpn)# Configure Ethernet VPN settings.
Peer Template Config (Config-rtr-tmplt)# Contains the BGP peer template configuration commands.
RADIUS Dynamic Authorization Config (Config-radius-da) Contains the Radius Dynamic Authorization 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.
IPv4 Access-list Config Switch (Config-ipv4-acl)# Allows you to create an IPv4 named or extended Access-List and to enter the mode containing IPv4 Access-List configuration commands.
IPv6Access-list Config Switch (Config-ipv6-acl)# Allows you to create an IPv6 Access-List and to enter the mode containing IPv6 Access-List configuration commands.
Management Access-list Config Switch (config-macal)# Allows you to create a Management Access-List and to enter the mode containing Management Access-List configuration commands.
TACACS Config Switch (Tacacs)# Contains commands to configure properties for the TACACS servers.
User-Group Configuration Switch (config-usergroup) Contains user group commands
Task-Group Configuration Switch (config-taskgroup) Contains task group commands
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.
Stack Global Config Switch (Config stack)# Allows you to access the Stack Global Config Mode.
ARP Access-List Config Switch (Config-arp-access-list)# Contains commands to add ARP ACL rules in an ARP Access List.
Support Mode Switch (Support)# Allows access to the support commands, which should only be used by the manufacturer's technical support personnel as improper use could cause unexpected system behavior and/or invalidate product warranty.
VLAN Config Switch (vlan vlan-id)# Contains commands to configure private VLAN settings on a VLAN, FIP snooping, and to configure the RSPAN mode.
Maintenance Domain Config Switch (config-md)# Contains commands to create maintenance associations and configure per-maintenance domain parameters.
Maintenance Association Config Switch (config-ma)# Contains commands to configure continuity check message CCM) settings.
Service Instance Config Switch (config-service-mode)# Contains commands to configure settings related to Ethernet Virtual Circuits.
ERSPAN Source Session Configuration Mode Switch (config-erspan-src)# Configure the source interface for ERSPAN and access ERSPAN Source Session Destination Configuration mode
ERSPAN Source Session Destination Configuration Mode Switch (config-erspan-src-dst)# Configure the ERSPAN origin and destination IPv4 addresses, session ID, and various characteristics of the packets in the ERSPAN traffic.
ERSPAN Destination Session Configuration Mode Switch (config-erspan-src)# Configure the destination interface for ERSPAN and access ERSPAN Destination Session Source Configuration mode
ERSPAN Destination Session Source Configuration Mode Switch (config-erspan-dst-src)# Configure the ERSPAN destination IP address and ERSPAN session ID.
Track Configuration Mode Switch (config-track)# Configure settings to track the state of an IP Service Level Agreements (SLAs) operation
IP SLA Configuration Mode Switch (config-ip-sla)# Configure an IP SLA ICMP echo operation
IP SLA ICMP ECHO Configuration Mode Switch (config-ip-sla-echo)# Configure IP SLA ICMP parameters.
LDAP Search Map Config Switch (config-ldap-search-map)# Configure search map details for fetching user privilege level.
Service Instance Config Switch (service-mode)# Configures Ethernet Virtual Service (EVS) service instance settings for an interface.
MiM Tunnel Config Switch (config-tunnel-minm)# Configures the virtual MAC-in-MAC tunnel.
MiM Service Instance Config Switch (config-tunnel-srv)# Configures the virtual MAC-in-MAC tunnel service instance.
Ethernet Ring Profile Config Switch(config-erp-profile1) Configures an Ethernet ring profile.
Ethernet Ring Config Switch (config-erp-name)# Configures Ethernet ring settings.
Ethernet Ring Instance Config Switch (config-erp-inst-number)# Configures Ethernet ring instance settings.
Ethernet Ring Instance APS-Channel Config Switch (config-erp-inst-number-aps)# Configures an Ethernet ring instance APS channel.
MACsec Policy Config Switch (Config-mka-policy)# Creates or configures a MACsec Key Agreement (MKA) Protocol policy and enters MKA policy configuration mode.
Key Chain Config Switch (Config-key-chain)# Creates or configures a MACsec key chain, and enters Key Chain configuration mode.

Table 2 explains how to enter or exit each mode. To exit a mode and return to the previous mode, enter exit. To exit to Privileged EXEC mode, press Ctrl+z.

Note:

Pressing Ctrl+z from Privileged EXEC mode exits to User EXEC mode. To exit User EXEC mode, enter logout.

Table 2. CLI Mode Access and Exit
Command Mode Access Method
User EXEC This is the first level of access.
Privileged EXEC From the User EXEC mode, enter enable.
Global Config From the Privileged EXEC mode, enter configure.
VLAN Database From the Privileged EXEC mode, enter vlan database.
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) interface lag lag-intf-num interface vlan vlan-id
Line Console From the Global Config mode, enter line console.
Line SSH From the Global Config mode, enter line ssh.
Line Telnet From the Global Config mode, enter line telnet.
AAA IAS User Config From the Global Config mode, enter aaa ias-user username name.
Mail Server Config From the Global Config mode, enter mail-server address
Policy-Map Config From the Global Config mode, enter policy-map.
Policy-Class-Map Config From the Policy Map mode enter class.
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. See class-map for more information.
VPC From Global Config mode, enter vpc.
Ipv6-Class-Map Config From the Global Config mode, enter class-map and specify the optional keyword ipv6 to specify the Layer 3 protocol for this class. See class-map for more information.
Router OSPF Config From the Global Config mode, enter router ospf.
Router OSPFv3 Config From the Global Config mode, enter ipv6 router ospf.
Router RIP Config From the Global Config mode, enter router rip.
BGP Router Config From the Global Config mode, enter router bgp asnumber.
Route Map Config From the Global Config mode, enter -route-map map-tag.
IPv6 Address Family Config From the BGP Router Config mode, enter address-family ipv6.
L2VPN Address Family Config From the BGP Router Config mode, enter address-family l2vpn evpn
Peer Template Config From the BGP Router Config mode, enter template peer name to create a BGP peer template and enter Peer Template Configuration mode.
MAC Access-list Config From the Global Config mode, enter mac access-list extended name.
IPv4 Access-list Config From the Global Config mode, enter ip access-list name.
IPv6 Access-list Config From the Global Config mode, enter ipv6 access-list name.
Management Access-list Config From the Global Config mode, enter management access-list name.
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.
User-Group Configuration Mode From the Global Config mode, enter usergroup usergroup-name.
Task-Group Configuration Mode From the Global Config mode, enter taskgroup taskgroup-name.
DHCP Pool Config From the Global Config mode, enter ip dhcp pool pool-name.
DHCPv6 Pool Config From the Global Config mode, enter ip dhcpv6 pool pool-name.
Stack Global Config Mode From the Global Config mode, enter the stack command.
ARP Access-List Config Mode From the Global Config mode, enter arp access-list.
Support Mode From the Privileged EXEC mode, enter support.
Note:

The support command is available only if the techsupport enable command has been issued.

VLAN Config From the Global Config mode, enter vlan vlan-id
Maintenance Domain Config From the Global Config mode, enter ethernet cfm domain domain-name level level
Maintenance Association Config From the Maintenance Domain Config mode, enter service service-name vlan vlanID
Service Instance Config From Interface Config mode, enter service instance
ERSPAN Source Session Configuration Mode From the Global Config mode, enter monitor session session-id type erspan-source
ERSPAN Source Session Destination Configuration Mode From the ERSPAN Source Session Configuration Mode, enter destination.
ERSPAN Destination Session Configuration Mode From the Global Config mode, enter monitor session session-id type erspan-destination
ERSPAN Destination Session Source Configuration Mode From the ERSPAN Destination Session Configuration Mode, enter source.
Track Configuration Mode From Global Config mode, enter track object-number ip sla operation-number
IP SLA Configuration Mode From Global Config mode, enter ip sla operation-number
SLA ICMP ECHO Configuration Mode From IP SLA Config mode, enter icmp-echo destination-ip-address
LDAP Search Map Config From Global Config mode, enter ldap search-map map-name
Service Instance Config From Interface Config mode, enter service instance number ethernet name
MiM Tunnel Config From Global Config mode, enter ethernet mac-tunnel virtual number
MiM Service Instance Config From MiM Tunnel Config mode, enter service instance number.
Ethernet Ring Profile Config From Global Config mode, enter ethernet ring g8032 profile name.
Ethernet Ring Config From Global Config mode, enter ethernet ring g8032 name.
Ethernet Ring Instance Config From Ethernet Ring Config mode, enter instance number.
Ethernet Ring Instance APS-Channel Config From Ethernet Ring Instance Config mode, enter aps-channel.
MACsec Policy Config From Global Config mode, enter mka policy {policy-name}
Key Chain Config From Global Config mode, enter key chain {key-chain-name} macsec

www.lancom-systems.com

LANCOM Systems GmbH | A Rohde & Schwarz Company | Adenauerstr. 20/B2 | 52146 Wuerselen | Germany | E‑Mail info@lancom.de

LANCOM Logo