These commands need to be memorized and understood. They will be used on the exam, and they will be used in any position managing Cisco devices. You got to know the commands.
Enable command
The enable command is required to access the higher functions of Privileged EXEC mode. Enable mode is usually protected by a password (see below). Privileged EXEC mode is indicated by the pound sign (#) in the prompt.
Show commands
Show commands are used to display information about the router or switch.
Command | Purpose | show running-config | Displays the active, or current, configuration. The running configuration exits in RAM and is lost when the router or switch is rebooted. |
---|---|
show startup-config | Displays the stored configuration. The startup configuration is stored in Flash memory and is loaded into RAM when the router or switch is rebooted. |
show version | Displays the version of the IOS, as well as information about the hardware configuration of the router or switch. |
show interface [Interface type] [Inteface x/y] | Displays status of any interface: Serial, Ethernet, VLAN, loopback, etc. The most common physical interfaces for a router are serial and Ethernet/Fast Etherenet/Gigabit Ethernet. The most common physical interfaces for a switch are Fast Ethernet/Gigabit Ethernet. |
show ip interface brief | Displays a summary of the status of all interfaces on a router or switch. |
show vlan | Displays all VLANs on a switch and the ports assigned to each VLAN. |
Configuration Commands
Configuration commands are used to change the configuration of a router or switch. When configuration mode is invoked by the configuration terminal command, the router or switch is in global configuration mode. Commands entered in global configuration mode either
•Affect the entire router or switch
•Enter a specific configuration mode, such as interface configuration mode, line configuration mode, etc.
Command | Purpose |
---|---|
configure terminal | Invokes global configuration mode in the Command Line Interface (CLI). Indicated by (config) in the prompt. |
hostname [text] | Creates a custom host name. The hostname value can be any alpha-numeric value,but must start with an alpha character. The hostname is documentation; that is, it does not affect the function of the router or switch. |
enable password [text] | Creates an enable password required to access Privileged EXEC mode. Used to prevent unauthorized access to higher level functions, such as configuration changes. The enable password is stored in clear text and is considered vulnerable. |
enable secret [text] | Creates an encrypted password required to access Privileged EXEC mode. Used to prevent unauthorized access to higher level functions, such as configuration changes. An enable secret password will have priority over an enable password. Enable secret passwords are considered more secure. |
line console 0 | Used to access console configuration mode. |
line vty 0 15 | Accesses vty configuration mode. vty provides remote, telnet management. In line vty mode, all following configurations for vty apply to all 16 lines (0 – 15)(Note: older versions of IOS may be limited to 5 sessions: line vty 0 4) |
password [text] | Used to configure all management lines: console, vty, auxilliary (aux one routers only. Creates a password required to access the router or switch |
login | Used to configure all management lines: console, vty, auxilliary (aux one routers only.Requires the use of the password created by the password command. |
Crtl-Z | Control key + “z” key. Terminates configuration mode |
Interface Configuration Mode
Interface configuration mode is accessed from global configuration. Interface configuration mode is invoked when an interface is specified in Global Configuration Mode.
Command | Purpose |
---|---|
interface [type][slot#/port#] | The interface types installed on a router or switch can be displayed by using the "show ip interface brief" command. For an explanation of slot and port... |
description [text] | Documentation for the interface. Does not affect interface function. |
speed [10, 100, 1000] | Disables auto-negotiation for interface data transfer rate on Ethernet/Fast Ethernet/Gigabit Ethernet iterface and configures the interface for a single speed. Each interface has a maximum speed: Ethernet: 10Mbps, Fast Ethernet: 100Mbps, Gigabit: 1,000MBPS. An interface can run at lower speeds, but cannot exceed maximum rate for the interface (An Ethernet interface cannot run 10Mbps, a Fast Ethernet can run 10Mbps or 100Mbps, but it cannot run 1,000Mbps, etc.) |
duplex [full half] | Establishes duplex for data transfer. Half duplex can transmit and receive, but not at the same time. Full duplex can transmit and receive at the same time. Full duplex mode disables CSMA-CD. |
ip address [x.x.x.x y.y.y.y] | Assigns an IP address to an interface. Note: all router interfaces can be assigned an IP address. One layer 2 switches such as the 2950, only the VLAN interface can be assigned an IP address. |
shutdown/ no shutdown | Shutdown disables an interface in IOS. It will not activate and transfer data. No shutdown reverses the shutdown command, allowing the interface to activate if all connectivity requirements are met. |
Configuration Management Command
The following commands are used to store configurations, delete configurations and load configurations. All configuration commands must be entered in Privileged EXEC (enable) mode.
Command | Purpose |
---|---|
copy | The copy command is used to copy router and switch configurations to different locations. The command requires two locations or qualifiers:
copies the active configuration in RAM to Flash memory. The running-config exists in RAM, the startup-config exists in Flash. TFTP indicates a remote TFTP server to store the configuration. Using the command to save the startup-config or to copy to a TFTP server overwrites the existing configuration. Used the copy command to copy to the running configuration merges the changes with the existing running-config. |
erase startup-config | Command erases the startup-config. Used to restore router or switch to factory defaults. |