You are on page 1of 5

CCNA IOS Commands

Router modes

Modes Description
Router> User mode
Router# Privileged mode
Router(config)# Global configuration mode
Router(config-if)# Interface mode

Basic IOS Commands

Command Description Syntax


Enable Puts you into privileged mode Router>enable
Disable Takes you from privileged mode Router>disable
back to user mode
Config Terminal Puts you in global configuration Router#config t
mode and change the running-config
Hostname Sets the name of a router Router(config)#hostname R1
Banner Creates a banner for users who log Router(config)#banner motd #
into the router
Enable Password Sets the encrypted enable password Router(config)#enable password
Enable Secret Sets the encrypted enable secret. Router(config)#enable secret
Supersedes the enable password if
set
Line Aux Puts in the auxiliary interface Router(config)#line aux 0
configuration mode
Router(config-line)#login

Router(config)# password cisco


Line Console 0 Puts you in the console configuration Router(config)#line console 0
mode
Router(config-line)#login

Router(config)# password cisco


Line Vty Puts you in VTY (Telnet) interface Router(config-line)#line vty 0 4
configuration mode
Router(config-line)#login

Router(config)# password cisco


Service Encrypts the user mode and enable Router(config)#service
Password- password password-encryption
encryption
Terminal Changes your history size from the Router#terminal history size 25
History Size default of 10 up to 256
Telnet Tests IP connectivity and configures Telnet [destination ip]
a router
Router#telnet 172.16.10.2
Ping Tests IP connectivity Ping [destination ip]

Router#ping 172.16.10.2
Interface Puts you in interface configuration Router(config)#int fa 0/0
Fastethernet 0/0 mode for a fastethernet port
Interface Serial 1 Puts you in configuration mode for Router(config)#int serial 1
interface serial 1 and can be used for
show commands
Ip Address Sets an IP address on an interface Router(config)#ip address
172.16.10.2 255.255.255.0
Bandwidth Sets the bandwidth on a serial Router(config-if)#bandwidth 64
interface
Copy Run Start Short for copy running-config, Router#copy run start
startup-config. Places a
configuration into NVRAM
Erase Startup Deletes the startup-config Router#erase startup-config
Show Show the DTE or DCE status of an Router#sh controllers s 0
Controllers S 0 interface
Show History Shows you the last 10 commands Router#sh history
entered by default
Show Interface S Shows the statistics of interface Router#sh int s 0
0 serial 0
Show Run Short for show running-config. Router#sh run
Shows the configuration currently
running on the router
Show Start Short for show startup-config. Shows Router#sh start
the backup configuration stored in
NVRAM
Show Terminal Shows you your configured history Router#sh terminal
size
Show Version Shows you statistic of the router Router#sh ver
Shutdown Puts an interface in administratively- Router(config-if)#shutdown
down mode

IP Routing Commands

Command Description Syntax


Ip route Creates static and default routes Ip route [destination_network] [mask]
on a router [next_hop_address or exitinterface]
[administrative_distance] [permanent]

Example: Router(config)#ip route


172.16.20.0 255.255.255.0 172.16.10.2
No ip route Removes a static default rout Router(config)#no ip route 172.16.20.0
255.255.255.0 172.16.10.2
Router RIP Turns on ip rip routing on a Router(config)#router rip
router
Network Tells the routing protocol what Router(config-if)#network 172.16.20.0
network to advertise
Router igrp Turns on ip igrp routing on a Router igrp[Autonomous system no.]
AS router
Router(config)#router igrp 10
Debug ip rip Sends console messages Router#debug ip rip
displaying information about rip
packets being sent and received
on a router interface
Debug ip igrp Provides a summary of the igrp Router#debug ip igrp events
events routing information running on
the network
Debug ip igrp Shows message requests from Router#debug ip igrp transactions
transactions neighbor routes asking for an
update and the broadcast sent
from your router to that
neighbor router
Show ip route Displays the ip routing table Router#sh ip route
Show Shows the routed protocols and Router#sh protocols
protocols network addresses configured
on each interface
Show ip Shows the routing protocols and Router#sh ip protocols
protocols timers associated with each
routing protocol configured on a
router

Managing Internetwork

Command Description Syntax


Cdp enable Turns on cdp on an individual interface Router#cdp enable
No cdp enable Turns off cdp on an individual interface Router#no cdp enable
Cdp run Turns on cdp on a router Router#cdp run
No cdp run Turns off cdp completely on router Router#no cdp run
Cdp holdtime Changes the holdtime of cdp packets Router(config)#cdp holdtime
240
Cdp timer Changes the cdp update timer Router(config)#cdp timer 90
Clear line Clears a connection connected via telnet Router#clear line 2
to your router
Config-register Tells the router how to boot and to Router(config)#config-register
change the configuration register setting 0x0101
Copy flash tftp Copies a file from flash memory to a tftp Router# copy flash tftp
host
Copy run start Copies the running-config file to the Router#copy run start
startup-config file
Copy run tftp Copies the running-config file to a tftp Router#copy run tftp
host
Copy tftp flash Copies a file from a tftp host to flash Router#copy tftp flash
memory
Copy tftp run Copies a configuration from a tftp host to Router#copy tftp run
the running-config file
Erase startup- Deletes the contents of NVRAM on a Router#erase startup-config
config router
Ip host Creates a host table on a router Ip host[hostname] [ip address]
Example: Router(config)#ip
host router2 172.16.10.2
No ip host Removes a hostname from a host table Router(config)#no ip host
router2 172.16.10.2
Show cdp Displays the cdp timer and holdtime Router#sh cdp
frequencies
Show cdp Same as show cdp neighbor detail, but Router#sh cdp entry
entry does not work on a 1900 switch
Show cdp Shows the individual interfaces enabled Router#sh cdp interface
interface with cdp
Show cdp Shows the directly connected neighbors Router#sh cdp nei
neighbor and the details about them
Show cdp Shows the ip address and IOS version Router#sh cdp neighbor detail
neighbor detail and type, and includes all of the
information from the show cdp neighbor
command
Show cdp Shows the cdp packets sent and received Router#sh cdp traffic
traffic on a device and any errors
Show flash Shows the files in flash memory Router#sh flash
Show hosts Shows the contents of the host table Router#sh hosts
Show sessions Shows your connections via telnet to Router#sh sessions
remote device

You might also like