Basic IOS Commands



Basic IOS Commands
A Cisco router without a startup-config file will enter in the setup mode, which you can exit to access the Command Line Interface (CLI). The setup mode offers the Basic Management and Extended Setup. You can enter the setup mode again with the command setup at the CLI.

Cursor Commands:



General commands entered in the “#” mode:
clock set hh:mm:ss d month yyyy: sets the current time and date.
show history/terminal: shows last 10 commands (history) or terminal config and history buffer size (terminal).
terminal history size size: sets the history buffer size where size is between 0-256.
terminal no editing: disable or enable the terminal editing keys in the table above.
show version: displays basic IOS and router information, as well as names of config files and boot images, and config register.
show flash: displays the content of the Flash memory, and if only one IOS is in Flash memory, will output the same as show version.
show startup-config/running-config: displays current and NVRAM based configuration files.
copy running-config startup-config: used and required to save the current configuration. Reverse to restore.
erase startup-config: resets the router’s NVRAM. The router will boot in setup mode next time.
ping/trace/telnet: tools provided to verify connectivity. U=Unreachable, ?=Unknown packet received, .=Time down, P=Unreachable port received.
clear counters interface: clears the “show interface” counters on this interface.
show controllers type number: information about the physical interface itself. A space is required between type and number.
reload: reboots the router and reloads the startup-config file.
boot system rom/flash img: indicate what image the router will use during the next boot.
boot system tftp img address: tells the router to use the configuration file img from a tftp server at address.
config terminal/memory/network: used modify the configuration from the running-config, the startup-config or a from a TFTP server.
Commands entered in the Global Configuration “(config)#” mode:
hostname name: used to define a hostname that is locally significant only.
enable [secret] password password: sets enable or secret mode password. secret will override the non-secure password if set and is encrypted.
[no] service password-encryption: encrypts or not (no) the enable and line passwords.
banner login/motd char: sets the login or message of the day banners, where char is the delimiting character.
interface type [slot/]number[.subinterface]. You can skip the space between the interface type and its number. Certain switches equipped with VIP cards use the syntax interface type slot/pan/number[.subinterface] where pan is the Port Adapter Number.
line (vty number number)/(aux/ console number): used to enter the configuration of the console, aux line or VTY lines (telnet).
Commands entered in the “(config-if)#” mode:
description name: used to define a description for the interface. Name must have underscores rather than spaces. show run and show int 0/n will both show the descriptions set on the interfaces.
no shutdown: used and required to bring up an interface. The interface will show as administratively down.
ip address ipaddress subnetmask: used to set the IP address and subnet mask of an interface.
clock rate bps: sets the clock rate on serial ports.
bandwidth kbps: sets the bandwidth of a serial port for routing and STP protocols to establish the best path.
Commands entered in the “(config-line)#” mode:
logging synchronous: stops console msgs from overwriting command line inputs.
exec-timeout min sec: sets the time-out to min sec for the console.
[no] login: used to set the password when followed by password password. A password is required on the VTY lines before Telnet can be used by default unless no login is used.
Router Memory:
ROM: Read-Only Memory which stores the bootstrap startup program, the power-on self-test (POST) procedures and a baseline IOS. The ROM also contains the ROM monitor, used for manufacturing testing and troubleshooting, and the Mini-IOS, or RXBOOT, which can be used to bring up an interface and load a Cisco IOS into flash memory.
Flash Memory: EEPROM (Electronically Erasable Programmable Read-Only Memory) which stores the IOS (Internetwork Operating System).
NVRAM: Non-Volatile Random Access Memory stores the startup config. A switch has a separate VTP NVRAM which can be deleted with the delete vtp command.
RAM or DRAM: Random Access Memory - holds dynamic info such as the current configuration file, the current IOS, caching and buffering.