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:
Ctrl+A | start of line | Ctrl+F or -> | forward one char | Ctrl+R | redisplays a line | Ctrl+Z | ends configuration mode |
Ctrl+E | end of the line | Esc+F | forward one word | Ctrl+U | erases a line | Tab | completes the command |
Ctrl+B or <- | back one char | Ctrl+D or bksp | deletes one char | Ctrl+W | erases a word | Ctrl+P | displays the previous command (like arrow up) |
Esc+B | back one word |
Press return to initiate the user EXEC mode: “>” [whatever]: indicate that whatever is the default or current option. | enable/disable: used to enter or exit the privileged EXEC mode. logout/exit: to terminate the session. exit goes up one level. |
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.