ADTRAN Switch Engine (ASE) CLI Configuration

Transcription

ADTRAN Switch Engine (ASE)CLI ConfigurationConfiguration Guide6AMCCG0001-29CJune 2020

To the Holder of this DocumentCLI ConfigurationTo the Holder of this DocumentThis document is intended for the use of ADTRAN customers only for the purposes of the agreement underwhich the document is submitted, and no part of it may be used, reproduced, modified or transmitted in anyform or means without the prior written permission of ADTRAN.The contents of this document are current as of the date of publication and are subject to change withoutnotice.Trademark Information“ADTRAN” and the ADTRAN logo are registered trademarks of ADTRAN, Inc. Brand names and productnames included in this document are trademarks, registered trademarks, or trade names of their respectiveholders.Disclaimer of LiabilityThe information or statements given in this document concerning the suitability, capacity, or performance of thementioned hardware or software products are given “as is”, and any liability arising in connection with suchhardware or software products shall be governed by ADTRAN’s standard terms and conditions of sale unlessotherwise set forth in a separately negotiated written agreement with ADTRAN that specifically applies to suchhardware or software products.To the fullest extent allowed by applicable law, in no event shall ADTRAN be liable for errors in this documentfor any damages, including but not limited to special, indirect, incidental or consequential, or any losses, suchas but not limited to loss of profit, revenue, business interruption, business opportunity or data, that may arisefrom the use of this document or the information in it.Copyright 2020 ADTRAN, Inc.All Rights Reserved.26AMCCG0001-29C

CLI ConfigurationRevision HistoryRevision HistoryRev AMarch 2019Rev BJuly 2019Removed OSPF from the context-sensitive help commandoutput example.Rev CMay 2020Updated format and supported hardware.6AMCCG0001-29CInitial Release3

Table of ContentsCLI Configuration in ASETable of ContentsOverview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Hardware and Software Requirements and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . 5CLI Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Introduction to Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5How Commands Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Understanding Command Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Quickstart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Connecting to the CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Logging In and Resetting Configuration to Factory Default . . . . . . . . . . . . . . . . . . . . . . . . . . . .Setting Device Hostname and Admin User Password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Setting VLAN 1 IP Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Displaying and Saving Configuration to Flash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1213131415CLI Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Abbreviating Keywords and Parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using the Keyboard. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Basic Line Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Filtering Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Banners. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Ethernet Interface Naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171717212425Configuring the System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Configuration Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Resetting or Removing Configuration with no. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Managing Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Adding, Modifying, and Deleting Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Using Show Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Listing All Show Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Using Context-Sensitive Help for Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Show running-config . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Default vs. Non-default vs. All Defaults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30313232Working with Configuration Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Reverting to Default Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Booting from a Backup File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Using Reload Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Working with Software Images. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Warranty and Contact Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Warranty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38Contact Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3846AMCCG0001-29C

CLI Configuration in ASEOverview1. OverviewThis configuration guide describes basic usage and configuration of the Command Line Interface (CLI), acomprehensive management interface for use with ADTRAN Switch Engine (ASE) products. While CLIdescribes the method used to communicate, such as by console or Telnet, it also refers to the way informationis passed to the unit. As a text-based user interface, the CLI prompts you to input commands line by linewhen you interface with the ASE unit (hence the name command line interface).CLI is the only management interface accessible on the serial console. Even without network connectivity,ASE devices can be managed using a serial connection.2. Hardware and Software Requirements and LimitationsASE CLI Configuration is supported on the ASE products outlined in Table1 below:Table 1. Supported ProductsProductP/NNetVanta 1560-08-150W Switch17108108PF2NetVanta 1560-24-740W Switch17108124PF2NetVanta 1560-48-740W Switch17108148PF2NetVanta 1560-08-65W Switch17101561PF2NetVanta 1560-24-370W Switch17101564PF2NetVanta 1560-48-370W Switch17101568PF23. CLI OverviewIntroduction to CommandsThe most important part is understanding that commands make the ASE unit function. The right commandslead to a fully functioning unit, whereas improperly entered or forgotten commands prevent the unit fromfunctioning. To properly use commands, you must understand what function you want the ASE unit tocomplete and what syntax the unit understands as instructions. Each command has its own role within theoperating system, and it is the responsibility of the operator to become familiar with specific commands andcommand sets.The following are key characteristics of the CLI: It is modal (certain operations are possible or impossible in specific modes) It is line-based (there are no screen editing features) It executes commands instantly upon end-of-line It is privilege-based (certain operations require the user to have a certain privilege level to succeed) It implements industrial de facto behavior for network equipment CLIs (structurally and behaviorally, itresembles CLIs found on other equipment while still possessing unique characteristics in some areas)The CLI can be accessed directly using the serial console, or over the network through telnet or ssh. In eachcase, the user has to log in before CLI commands can be executed. This begins a session that lasts untillogout.6AMCCG0001-29C5

CLI OverviewCLI Configuration in ASEMultiple sessions can co-exist at the same time, each providing separate environments: logged-in user ID,privilege level, command history, mode, and session settings. It is therefore perfectly possible for the sameuser to control several concurrent sessions, such as one serial console session and one ssh session.The user database is either local or provided by a RADIUS or TACACS server. In case of a local userdatabase, passwords and privilege levels are maintained on the device.How Commands FunctionA command is a single line of syntax composed of two main parts. The most important part is the commanditself, or the command word. Most command words are short and straightforward (for example, do, exit, orconfigure). Command words are entered immediately after the command prompt in the CLI.The second part of a command is its argument. An argument is a specification that modifies the command. Inthe command show version, show is the command word and version is the argument because it modifiesthe command show. Commands can have any number of arguments, depending upon the action required ofthe unit, and in some instances you have a choice of arguments to use.Optionally, some commands use variables to specify information relevant only to your ASE unit. Thesevariables are identified with angled brackets ( ). The description of the information required is containedwithin the symbols and displayed in italics. For example, the following command provides the command wordhostname and includes the variable host name :hostname host name Command words are not case sensitive, thus show, SHOW, and Show are identical. Conversely,parameters may either be case-sensitive or not, depending on the command and parameter inquestion.ASE Command SystemADTRAN products, training tools, and manuals follow a specific system for entering and referencingcommands. Items that are typed in bold are the required commands and arguments for a certain action. Inthe following documentation, you will see commands in bold after an example prompt. They look similar tothis: enable# configure terminal(config)# line vty 1(config-line)#In the example above, the characters , #, (config)#, and (config-line)# are the prompts after whichcommands are entered. In this example, the words in bold (enable, configure terminal, and line vty 1) arethe entire commands and constitute what should be typed after the prompt. It is important to pay attention tothe prompt you are given when communicating with your unit, because certain commands only work in certainmodes, which are signified by the prompt.In certain commands, you are given a choice of arguments. If this is the case, the manual or guide will placethe argument in brackets separated by a vertical bar ( ) between your choices as seen in this example:(config)# clock [summer-time timezone]Again, remember the # is your prompt, the command word is clock, and your choices of arguments aresummer-time, and timezone.66AMCCG0001-29C

CLI Configuration in ASECLI OverviewCertain commands require you to enter your own information which are called variables. Information within acommand line that pertains to your personal unit is set off with angled brackets ( ). The description of theinformation required is contained within the angled brackets and is displayed in italics. For example:# hostname host name In this case, # is your prompt, the command word is hostname, and the information needed from you is thename of the host (unit) ( host name ).Understanding Command ModesAs you begin communication, you should understand the command modes. Just as there are different levelsof commands in the CLI, there are different modes for commands within ASE itself. Each command modeenables the user to access more commands, and make more changes in the unit’s configuration.The modesare further influenced by the privilege level of the user; some modes or commands are only accessible toadministrators while others require no privileges beyond login. See Understanding Privilege Levels on page11 for more information on privilege levels.The ASE CLI has three main command modes: Basic, Enable, and Global Configuration. These commandmodes are organized in a three-tiered hierarchy with Basic at the bottom, then Enable, and Global Configuration at the top. In addition, configuration command sets are available from Global Configuration mode.These command sets are broken down into categories of similar functions. For example, all commandspertaining to configuring the interfaces are grouped together.Basic ModeInteraction with your unit begins at the Basic mode. The commands supported at this command tier arelimited, as is interaction with the unit itself. The Basic mode prevents users without access to the higher tieredcommands from changing the preferred configurations of the unit. Table 2 describes the Basic mode.Table 2. Basic ModeModeAccess By.Mode PromptAccessible CommandsBasicBeginning an ASE session Display system information Perform traceroute and pingfunctionsEnable ModeEnable mode is one step up from the Basic mode. ADTRAN suggests that a password be required to accessthe Enable mode. Refer to the quick start guides shipped with your unit and located online at https://supportforums.adtran.com for more information on configuring a password.From the Enable mode, you can access the configurations of your product, as well as handle how your unitboots and runs, among other things. Table 3 describes the Enable mode.Table 3. Enable ModeModeAccess By.Mode PromptAccessible CommandsEnableEntering enable while in theBasic mode as follows:# Manage the startup and runningconfigurations Enable and disable debugcommands View show command output Enter any of the configuration modes enable6AMCCG0001-29C7

CLI OverviewCLI Configuration in ASEGlobal Configuration ModeThe Global Configuration mode is the highest level tier within ASE. The Global Configuration mode allows theuser to make changes regarding the entire product system. All of your system’s configurations are accessedthrough the Global Configuration mode. From this level, you can access not only line configurations, routerconfigurations, and interface configurations, but also any other configurations or parameters on your system.Table 4 describes the Global Configuration mode.Table 4. Global ModeModeAccess By.Mode PromptAccessible CommandsGlobalConfigEntering config while at theEnable mode as follows:(config)# Set the system’s Enable-levelpassword(s) Configure the system global IPparameters Configure the SNMP parameters Enter any of the configuration modes enable##config tConfiguration Command SetsConfiguration Command Sets contain a group of commands that are specific to a particular interface, feature,protocol, etc. For example, there are specific command sets for VLANs, Ethernet interfaces, and IP. Table 5summarizes some of the command sets available in the ASE CLI. These command sets are available fromGlobal Configuration Mode.Table 5. Configuration Command Sets Summary8Command SetAcceessed By.DescriptionDHCP Pool ConfigSpecifying a Dynamic Host Configuration Protocol (DHCP) client poolname as follows:(config)#ip dhcp pool name Configure DHCP client poolsPrompt: hostname(config-dhcp-pool)#Gigabit EthernetInterfaceSpecifying a Gigabit Ethernet interface number at the Global Configuration mode prompt as follows:(config)#interface gigabitethernet port type list Configure Gigabit Ethernet interfacesPrompt: hostname(config-if)#IPMC ProfileSpecifying an IP Multicast profilename as follows:(config)#ipmc profile name Configure IP Multicast profilesPrompt: hostname(config-ipmc-profile)#JSON NotificationHost ConfigSpecifying a JavaScript ObjectNotation (JSON) RPC name as follows:(config)#json notificationhost name Configure JSON notification hostsPrompt: hostname(config-json-notif-host)#LineSpecifying a terminal line number,console terminal line number, orvirtual terminal line number as follows:(config)#line [ number console 0 vty number ]Configure terminal linesPrompt: hostname(config-line)#6AMCCG0001-29C

CLI Configuration in ASECLI OverviewTable 5. Configuration Command Sets Summary (Continued)Command SetAcceessed By.DescriptionSNMP Server HostSpecifying a SNMP server hostname as follows:(config)#snmp-server host name Configure SNMP server host entriesPrompt: hostname(config-snmps-host)#STP AggregationConfigSpecifying Spanning Tree ProtocolAggregation mode as follows:(config)#spanning-treeaggregationConfigure Spanning Tree ProtocolaggregationPrompt: hostname(config-stp-aggr)#VLANSpecifying a VLAN ID at the GlobalConfiguration mode prompt as follows:(config)#vlan vlan list Configure active VLANsPrompt: hostname(config-vlan)#VLAN InterfaceSpecifying a VLAN interface number at the Global Configurationmode prompt as follows:(config)#interface vlan vlan list Configure VLAN interfacesPrompt: hostname(config-if-vlan)#Command Mode TransitionsA user can transition between command modes and configuration command sets, subject to the user’sprivilege level and the current session privilege level (see Understanding Privilege Levels on page 11).The Basic Mode privilege level can be raised to a higher value if an enable password has been configured forthat level. This elevation is done with the enable level command, where level is a value between 1 and 15.The reverse operation (lowering the privilege level) is achieved with the disable command.Once in Enable mode, it is possible to enter into Global Configuration mode by entering the commandconfigure terminal. Exit from Global Configuration mode is achieved by entering the command end or exitor pressing Ctrl-Z.Access to a configuration command set (for example, Ethernet interfaces) goes through Global Configurationor another command set. Thus, it is possible to change directly from the VLAN command set to the GigabitEthernet interface command set.Each mode and command set implements a scope for commands. Inside each mode, a particular subset ofcommands is available. To access other commands, one must generally change modes/command sets. Thischange is necessary because there are commands with identical prefixes in different modes. For example,there are commands that begin with ‘ip’ in Enable, Global Configuration, and VLAN Interface Configurationmodes.There is one exception to this: Enable mode commands (whether privileged or unprivileged) are accessiblefrom within Global Configuration or one of the command sets by using the do command. See Using the doCommand to Execute Commands Across Modes on page 11.Figure 1 shows the possible transitions between three major command modes and command

ADTRAN products, training tools, and manuals follow a specific system for entering and referencing commands. Items that are typed in bold are the required