Cisco IOS Commands

Share on:

This is the master list of some of the many Cisco IOS Commands that go with the CCNA track. This list also talks about what each command does in brief detail. You may also find that some commands may or may not be used for a CCNA level but offer some important information. If you don't know what a command does or understand it, I would look at Cisco documentation. Since this is a pretty big list of commands you can see the links to move to the different sections within this page. Enjoy! Privileged Mode Set a password for console access Set a Password for virtual terminal (telnet) access Set a password for auxiliary (modem) access Setting up the Router General Commands Processes and Statistics CDP Commands Miscellaneous Commands Privileged Mode: [code]Router>enable[/code] This command "enable"will get you in privileged mode in the router or switch. [code]Router#disable Router>[/code] This command "disable" will put you back to the user mode in the router or switch. [code]Router(config)#enable password knowing[/code] This will put a unencrypted password on the privileged mode (in this example the password would be "knowing") [code]Router(config)#enable secret knowing[/code] This command will put an encrypted password on the privileged mode (in this example the password would be "knowing") Set a password for console access: [code]Router(config)#line console 0 Router(config-line)#login % Login disabled on line 0, until 'password' is set Router(config-line)#password allknowing[/code] This sets the password as "allknowing" when accessed by the consolde line in a router or switch. Set a Password for virtual terminal (telnet) access: [code]Router(config)#line vty 0 4 Router(config-line)#login % Login disabled on line 66, until 'password' is set % Login disabled on line 67, until 'password' is set % Login disabled on line 68, until 'password' is set % Login disabled on line 69, until 'password' is set % Login disabled on line 70, until 'password' is set Router(config-line)#password knowingall[/code] Remember you must have a password on telnet to access the router or switch with a telnet session otherwise the router or switch will close the session immediately. This sets the password as "knowingall" Set a password for auxiliary (modem) access: [code]Router(config)#line aux 0 Router(config-line)#login Router(config-line)#password all[/code] This sets the password as "all" when accessed via the auxiliary port. Setting up the Router: [code]Router#show running-config Building configuration... [/code] This command "show running-config" shows the details of the running configuration file in RAM. [code]Router#show startup-config[/code] This command "show startup-config" shows the details of the startup configuration file in NVRAM (If there is one saved) [code]Router#setup --- System Configuration Dialog --- Continue with configuration dialog? [yes/no]: [/code] This command will start the automatic setup process, (The same as when you first boot the router) [code]Router#configure terminal [/code] This command "configure terminal" is used to execute configuration commands from the terminal. [code]Router#configure memory[/code] This command "configure memory" is used to execute configuration commands stored in NVRAM. [code]Router#configure network[/code] This command "configure network" is used to retrieve configuration from a TFTP server. [code]Router#copy startup-config running-config[/code] This command "copy startup-config running-config" will copy the startup configuration file to the running configuration file. [code]Router#copy running-config startup-config[/code] This command "copy running-config startup-config" will copy the running configuration fiel to the startup configuration file. [code]Router(config)#boot system flash[/code] This command "boot system flash" will tell the router which IOS file in flash to boot from. [code]Router(config)#boot system tftp[/code] This command "boot system tftp" will tell the router which IOS file on the TFTP server to boot from. [code]Router(config)#boot system rom[/code] This command "boot system rom" will tell the router to boot from ROM at next boot. [code]Router#copy flash tftp:[/code] This command "copy flash tftp:" will copy the flash to a TFTP server. [code]Router#copy tftp flash:[/code] This command "copy tftp flash:" will restore flash from a TFTP server. [code]Router#copy running-config tftp[/code] This command "copy running-config tftp" will copy the current running configuration file to a TFTP server. [code]Router#copy tftp running-config[/code] This command "copy tftp running-config" will restore the running configuration file from a TFTP server. General Commands: [code]Router(config-if)#no shutdown[/code] The command "no shutdown" will enable the interfaces on the router [code]Router#reload[/code] The command "reload" will restart the router. [code]Router#show version[/code] The command "show version" displays the Cisco IOS version, uptime, of the router, how the router started, where the system was loaded from, along with the configuration register. [code]Router#show clock[/code] The command "show clock" will display the date and time. [code]Router#show history[/code] The command "show history" will display the past commands that you entered earlier. [code]Router#show debug[/code] This command "show debug" will show all debugging that is currently enabled. [code]Router#no debug all[/code] The command "no debug all" turns off all possible debugging. [code]Router#show users[/code] This command "show users" will show users that are connected to the router [code]Router#show protocols[/code] This command "show protocols" displays which protocols are configured. [code]Router(config)#banner motd # Enter TEXT message.End with the character '#'.[/code] The command "banner motd" will set or change the banner. (The "#" symbol at the end is a custom symbol the user uses) [code]Router(config)#hostname R1[/code] The command "hostname" is used to configure the hostname of the router (for this example the router's hostname is "R1") [code]Router#clear counters[/code] The command "clear counters" will clear the connection counters. Processes and Statistics [code]Router#show processes[/code] The command "show processes" shows the active processes running on the router. [code]Router#show processes cpu[/code] The command "show processes cpu" shows CPU statistics. [code]Router#show memory[/code] The command "show memory" shows memory statistics. [code]Router#show flash[/code] The command "show flash" describes the flash memory and displays the size of the files and the amount of free flash memory. [code]Router#show buffers[/code] The command "show buffers" displays the stats for the router buffer pools. [code]Router#show stacks[/code] The command "show stacks" shows the reason for last reboot, and monitors the stack use of the processes and interrupts routines. CDP Commands- Cisco Discovery Protocol uses a layer 2 multicast over SNAP capable links to send data. [code]Router#show cdp neighbors[/code] Shows directly connected neighbors. [code]Router#show cdp neighbors[/code] Shows and displays more information about the neighbor device. [code]Router#show cdp interface[/code] Shows which interfaces are running CDP. (Example Output) [code]Router#show cdp interface fastEthernet 0/1 Vlan1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Holdtime is 180 seconds FastEthernet0/0 is up, line protocol is down Sending CDP packets every 60 seconds Holdtime is 180 seconds FastEthernet0/1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Holdtime is 180 seconds[/code] Shows CDP information on a specific interface. (Example Output) [code]FastEthernet0/1 is administratively down, line protocol is down Sending CDP packets every 60 seconds Holdtime is 180 seconds[/code]   [code] Router#show cdp entry ? * all CDP neighbor entries WORD Name of CDP neighbor entry[/code] Shows CDP neighbor detail based on the name of that device and or all CDP entries. [code]Router(config)#cdp timer 160[/code] Change how often CDP information is sent. (updates) (This example is 160 seconds this can be any number the default is 60) [code]Router(config)#cdp holdtime 240[/code] Change how long to wait before removing CDP information. (neighbor) (This example is 240 seconds this can be any number the default is 180) [code]Router(config-if)#no cdp enable[/code] Turns off CDP on a specific interface. [code]Router(config-if)#cdp enable[/code] Turns on CDP on a specific interface. [code]Router(config)#cdp run[/code] Turns on CDP globally. (On by default) [code]Router(config)#no cdp run[/code] Turns off CDP globally. Miscellaneous Commands Show detail status of interfaces [code]R1#show controllers ?   Async Async UART internal info   Async Async interface   E1 E1 controller internal state   FastEthernet FastEthernet IEEE 802.3   J1 J1 controller internal state   Serial Serial   T1 T1 controller internal state   T3 T3 controller internal state   XTagATM Extended Tag ATM interface   vsi VSI information | Output modifiers [/code] To find out if the connected serial interface is DCE or DTE? [code]R1#show controllers serial 0/1 Interface Serial0/1 Hardware is GT96K DCE 530, clock rate 2000000 idb at 0x65F84D48, driver data structure at 0x65F8C454 wic_info 0x65F8CA80 Physical Port 0, SCC Num 0 [/code] To configure the clock rate on serial interfaces [code]R1#config t Enter configuration commands, one per line. End with CNTL/Z. R1(config)#interface serial 0/1 R1(config-if)#clock rate 64000[/code] To set the bandwidth (This is not the physical bandwidth, mainly for routing protocol calculation) [code]R1(config-if)#bandwidth 640[/code] That's the list! Like before these are the most common and are usually used in the CCNA area when troubleshooting. If you want to find more information check out Cisco documentation and like always I hope this was informative and if you have an idea on the next topic that deals with ICND1 or ICND2 let me know. :)