Most Commonly Used Cisco IOS commands for Lab Exercises

Key: bold = commands & keywords you type, <italics> = command parameters

 

copy running-config startup-config

P

Copies the current router configuration to Nvram for use at next boot up

copy startup-config running-config

P

Sets the router configuration back to its startup configuration

show version

U,P

Displays basic router and IOS info

show interfaces

U,P

Displays information on each router interface

show ip route

U,P

Displays current routing table

show access-lists

U,P

Displays each access control list

ip routing

G

Turns on ip routing

no ip routing

G

Turns off ip routing

ip route <network> <mask> <nexthop>

G

Adds a static route

no ip route <network> <mask> <nexthop>

G

Removes a static route

enable

U

moves user from user mode to privileged mode

configure terminal

P

Moves user from privileged mode to global configuration mode

interface <interface description or name>

G

Moves user from global configuration mode to interface configuration mode

exit

U,P

Logs off the router

exit

G

Returns user to privileged mode

exit

I,L,R

Returns user to global configuration mode

ip address <ip address> <mask>

I

Sets ip address of an interface

router rip

G

Turns on routing information protocol

no router  rip

G

Turns off routing information protocol

network <network IP address>

R

Turn on rip broadcasts for certain networks and therefore interfaces

enable secret <password>

G

Set at enable secret password

no cdp run

G

Turns off cisco discovery protocol (and therefore duplex warnings)

debug ip rip

P

Displays rip traffic

no debug ip rip

P

Turns off display of rip traffic

shutdown

I

Shutdown/disable an interface

no shutdown

I

Bring up/enable an interface

Line vty   0  4

L

Enter virtual terminal line configuration mode

password <password>

L

Set a virtual terminal password (telnet password)

access-list <number1-99> <permit|deny> <ip> <mask>

G

Add a line to a standard access list granting or denying access from an ip or network

access-list <number100-199> <permit|deny> <protocol, e.g., tcp, udp, ip …> <src ip>  <src mask> <dest ip> <dest mask> eq <port number or mnemonic, e.g., telnet, www, domain…>

G

Add a line to an extended access list granting or denying access to or from a particular ip or network for a particular protocol on a particular port.  ANY can be substituted for <from ip and mask> or <to ip and mask>.  HOST can be substituted for 0.0.0.0 mask.  ESTABLISHED can be substituted for <port number>

no access-list <number>

G

Removes an access-list

ip access-group <number> <in|out>

I

Enables an access list either inbound or outbound on an interface.

no ip access-group <number> <in|out>

I

De-associates an access-list with an interface

ip helper-address <ip address>

I

Redirects DHCP broadcast packets to a specific host

ip domain-lookup

G

Enables DNS client on router.

no ip domain-lookup

G

Disables DNS client on router.   This prevents the name resolution attempts that occur if you mistype an IOS command

ip name-server <server ip address>

G

Configure DNS server for router

no service config

G

Turn off attempts to contact TFTP server for config

ip domain-name <domain name>

G

Sets default domain name for resolution

 


 

Code       Mode Name                                          Command                              Prompt Appearance

_______________________________________________________________________________

U             = user mode                                          (none*)                                  prompt is:              routername>

P              = privileged exec mode                        enable                                prompt is:              routername#

G             =global configuration mode               config term                   prompt is:              routername(config)#

I               =interface configuration mode           interface fastethernetn/m           prompt is:              routername(config-if)#

L              =virtual terminal line config mode     line vty 0 4                prompt is:              routername(config-line)#

R             = router configuration mode              router rip                     prompt is:              routername(config-router)#

 

* User mode is what you get after initial connection via hyperterminal