Cisco Systems WSC2960X48TDL Information About Using the Command-Line Interface, Command Modes

Page 13

C H A P T E R 1

Using the Command-Line Interface

This chapter contains the following topics:

Information About Using the Command-Line Interface, page 1

How to Use the CLI to Configure Features, page 5

Information About Using the Command-Line Interface

This section describes the Cisco IOS command-line interface (CLI) and how to use it to configure your switch.

Command Modes

The Cisco IOS user interface is divided into many different modes. The commands available to you depend on which mode you are currently in. Enter a question mark (?) at the system prompt to obtain a list of commands available for each command mode.

You can start a CLI session through a console connection, through Telnet, a SSH, or by using the browser.

When you start a session, you begin in user mode, often called user EXEC mode. Only a limited subset of the commands are available in user EXEC mode. For example, most of the user EXEC commands are one-time commands, such as show commands, which show the current configuration status, and clear commands, which clear counters or interfaces. The user EXEC commands are not saved when the switch reboots.

To have access to all commands, you must enter privileged EXEC mode. Normally, you must enter a password to enter privileged EXEC mode. From this mode, you can enter any privileged EXEC command or enter global configuration mode.

Using the configuration modes (global, interface, and line), you can make changes to the running configuration. If you save the configuration, these commands are stored and used when the switch reboots. To access the various configuration modes, you must start at global configuration mode. From global configuration mode, you can enter interface configuration mode and line configuration mode.

This table describes the main command modes, how to access each one, the prompt you see in that mode, and how to exit the mode.

Catalyst 2960-X Switch Interface and Hardware Component Configuration Guide, Cisco IOS Release 15.0(2)EX

OL-29034-01

1

Image 13
Contents First Published July 10 Americas HeadquartersPage N T E N T S Contents Configuring Auto-MDIX41 Configuring System MTU Configuring EEE Viii Convention Description Document ConventionsBold font Element Vertical barsReader Alert Conventions Related Documentation Obtaining Documentation and Submitting a Service RequestXii Command Modes Information About Using the Command-Line InterfaceThis chapter contains the following topics Configure Mode Access Method Prompt Exit Method About This ModeQuit Ctrl-ZCommand or Action Purpose Step Using the Help SystemMode HelpNo and default Forms of Commands Understanding Abbreviated CommandsCLI Error Messages Configuration Logging How to Use the CLI to Configure FeaturesConfiguring the Command History Error Message MeaningRecalling Commands Changing the Command History Buffer SizeCommand or Action Disabling the Command History Feature Enabling and Disabling Editing FeaturesPrivileged Exec mode Terminal no historyEditing Commands through Keystrokes Editing Command Lines That Wrap Access-list Searching and Filtering Output of show and more CommandsShow more command begin include exclude regular-expression Show more command begin include excludeCommand or Action Example OL-29034-01 Information About Configuring Interface Characteristics Finding Feature InformationInterface Types This module contains the following topicsPort-Based VLANs Switch PortsTrunk Ports Switch Virtual InterfacesEtherChannel Port Groups Power over Ethernet PortsUSB Mini-Type B Console Port Using the Switch USB PortsUSB Type a Ports Interface ConnectionsConnecting VLANs with the Switch Interface Configuration ModeFeature Default Ethernet Interface ConfigurationDefault Setting Layer 2 or switching mode switchport command VLANs 1Speed and Duplex Configuration Guidelines Interface Speed and Duplex ModeIeee 802.3x Flow Control Configuring Interfaces Procedure How to Configure Interface CharacteristicsGigabit Ethernet port 1 on switch 1 is selected Either gigabitethernet 1/0/1Adding a Description for an Interface Configure terminalDescription string Show interfaces interface-id descriptionConfigure terminal Enters global configuration mode Configuring a Range of InterfacesInterface range port-rangemacro Verifies the configuration of the interfaces in the range Configuring and Using Interface Range MacrosDefine interface-range macroname Setting the Interface Speed and Duplex Parameters Configuring Ethernet InterfacesInterface range macro macroname Nonegotiate Speed 10 100 1000 auto 10Command or Action Purpose Configuring Ieee 802.3x Flow ControlEnd Returns to privileged Exec mode Configuring SVI Autostate ExcludeEnter interface configuration mode Shutting Down and Restarting the Interface Switchport autostate excludeAn SVI line state up or down Interface vlan vlan-id gigabitethernet interface-idThis configuration applies to all switches in a stack Configuring the Console Media TypeConfigure terminal Line console Media-type rj45 End Shutdown Shuts down an interfaceConfigure terminal Enters the global configuration mode Configuring the USB Inactivity TimeoutCommand Purpose Monitoring Interface CharacteristicsShow interfaces interface-id status err-disabled Show interfaces interface-id switchportClearing and Resetting Interfaces and Counters Identifying Interfaces on a Stack-Capable Switch Examples Configuration Examples for Interface CharacteristicsConfiguring a Range of Interfaces Examples Adding a Description to an Interface ExampleSetting Interface Speed and Duplex Mode Example Configuring and Using Interface Range Macros ExamplesConfiguring the Console Media Type Example To disable the configuration, use these commands Configuring the USB Inactivity Timeout ExampleStandards and RFCs Standard/RFC NoneTechnical Assistance Description Link Cisco IOS Release 15.02EX This feature was introducedRelease Modification OL-29034-01 Restrictions for Auto-MDIX Prerequisites for Auto-MDIXThis module contains the following sections How to Configure Auto-MDIX Information about Configuring Auto-MDIXConfiguring Auto-MDIX on an Interface Auto-MDIX on an InterfaceMonitoring Auto-MDIX This example shows how to enable auto-MDIX on a port Example for Configuring Auto-MDIXInformation about the Ethernet Management Port Prerequisites for Ethernet Management PortsSupported Features on the Ethernet Management Port Ethernet Management Port Direct Connection to a SwitchDisabling and Enabling the Ethernet Management Port How to Configure the Ethernet Management PortWhat to Do Next Additional ReferencesRelated Topic Bootloader commandsMIBs Document TitleOL-29034-01 Configuring LLDP, LLDP-MED, and Wired Location Service Lldp Supported TLVs Lldp and Cisco Switch StacksLldp and Cisco Medianet LLDP-MED Supported TLVs Wired Location Service Configuration Guidelines Default Lldp ConfigurationLldp run Enables Lldp globally on the switch Configure terminal Lldp runLLDP, and enter interface configuration mode Enabling LldpLldp transmit Enables the interface to send Lldp packets Configuring Lldp CharacteristicsLldp receive Enables the interface to receive Lldp packets Show lldp Verifies the configurationSwitchconfig# lldp holdtime Command or Action Purpose Step Configuring LLDP-MED TLVsLldp med-tlv-select Specifies the TLV to enable Lldp med-tlv-select End Copy running-config startup-configConfiguration mode. The range is 1 to Configuring Network-Policy TLVDscp dvalue none untagged Voice voice-signalingvlan vlan-idcosShow network-policy profile Verifies the configuration Configuring Location TLV and Wired Location ServiceWay Use one of the followingInformation, and enter interface configuration mode Exit Returns to global configuration modeUse one of the following Verifies the configuration Enters location information for an interfaceCommand or Action Purpose Example Enabling Wired Location Service on the SwitchNmsp enable Enables the Nmsp features on the switch Configuring Network-Policy TLV ExamplesNmsp notification interval attachment location Command Description Civic location OL-29034-01 System MTU Guidelines Information about the MTUConfiguring the System MTU How to Configure MTU SizesShow system mtu Verifies your settings Configuration Examples for System MTUReload Reloads the operating system Additional References for System MTU Restrictions for PoE Configuring PoEInformation about PoE Power over Ethernet PortsSupported Protocols and Standards Class Powered-Device Detection and Initial Power AllocationPower Management Modes Power Monitoring and Power Policing Maximum Power Allocation Cutoff Power on a PoE Port Configuring a Power Management Mode on a PoE Port How to Configure PoEShow power inline Budgeting Power for Devices Connected to a PoE PortNever static max max-wattage No cdp run Optional Disables CDP Budgeting Power to All PoE portsConfigure terminal No cdp run Budgeting Power to a Specific PoE PortSpecifies the physical port to be configured, and enter Configuring Power PolicingPower inline consumption wattage Show power inline police Show errdisable recovery Power inline police actionlog errdisable ExitConfiguration mode Power inline police actionlog errdisableWhile still providing power to the port Power inline police action log-Generates a syslog messageDown the port and puts the port in the error-disabled state Configuration Examples for Configuring PoE Monitoring Power StatusBudgeting Power Example EEE Overview Information About EEEDefault EEE Configuration How to Configure EEEEEE is disabled by default Restrictions for EEEPower efficient-ethernet auto Specifies the interface to be configured, and enterCommand Monitoring EEEThis example shows how to enable EEE for an interface Configuration Examples for Configuring EEEThis example shows how to disable EEE for an interface Feature History and Information for Configuring EEE OL-29034-01 D E PoE