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 back to user mode Router>disable
Config Terminal Puts you in global configuration mode and change the running-config Router#config t
Hostname Sets the name of a router Router(config)#hostname R1
Banner Creates a banner for users who log into the router Router(config)#banner motd #
Enable Password Sets the encrypted enable password Router(config)#enable password
Enable Secret Sets the encrypted enable secret. Supersedes the enable password if set Router(config)#enable secret
Line Aux Puts in the auxiliary interface configuration mode Router(config)#line aux 0 Router(config-line)#login
Router(config)# password cisco
Line Console 0 Puts you in the console configuration mode Router(config)#line console 0 Router(config-line)#login
Router(config)# password cisco
Line Vty Puts you in VTY (Telnet) interface configuration mode Router(config-line)#line vty 0 4 Router(config-line)#login
Router(config)# password cisco
Service Password-encryption Encrypts the user mode and enable password Router(config)#service password-encryption
Terminal History Size Changes your history size from the default of 10 up to 256 Router#terminal history size 25
Telnet Tests IP connectivity and configures a router Telnet [destination ip] Router#telnet 172.16.10.2
Ping Tests IP connectivity Ping [destination ip] Router#ping 172.16.10.2
Interface Fastethernet 0/0 Puts you in interface configuration mode for a fastethernet port Router(config)#int fa 0/0
Interface Serial 1 Puts you in configuration mode for interface serial 1 and can be used for show commands Router(config)#int serial 1
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 interface Router(config-if)#bandwidth 64
Copy Run Start Short for copy running-config, startup-config. Places a configuration into NVRAM Router#copy run start
Erase Startup Deletes the startup-config Router#erase startup-config
Show Controllers S 0 Show the DTE or DCE status of an interface Router#sh controllers s 0
Show History Shows you the last 10 commands entered by default Router#sh history
Show Interface S 0 Shows the statistics of interface serial 0 Router#sh int s 0
Show Run Short for show running-config. Shows the configuration currently running on the router Router#sh run
Show Start Short for show startup-config. Shows the backup configuration stored in NVRAM Router#sh start
Show Terminal Shows you your configured history size Router#sh terminal
Show Version Shows you statistic of the router Router#sh ver
Shutdown Puts an interface in administratively-down mode Router(config-if)#shutdown


IP Routing Commands

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


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 to your router Router#clear line 2
Config-register Tells the router how to boot and to change the configuration register setting Router(config)#config-register 0x0101
Copy flash tftp Copies a file from flash memory to a tftp host Router# copy flash tftp
Copy run start Copies the running-config file to the startup-config file Router#copy run start
Copy run tftp Copies the running-config file to a tftp host Router#copy run tftp
Copy tftp flash Copies a file from a tftp host to flash memory Router#copy tftp flash
Copy tftp run Copies a configuration from a tftp host to the running-config file Router#copy tftp run
Erase startup-config Deletes the contents of NVRAM on a router Router#erase startup-config
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 frequencies Router#sh cdp
Show cdp entry Same as show cdp neighbor detail, but does not work on a 1900 switch Router#sh cdp entry
Show cdp interface Shows the individual interfaces enabled with cdp Router#sh cdp interface
Show cdp neighbor Shows the directly connected neighbors and the details about them Router#sh cdp nei
Show cdp neighbor detail Shows the ip address and IOS version and type, and includes all of the information from the show cdp neighbor command Router#sh cdp neighbor detail
Show cdp traffic Shows the cdp packets sent and received on a device and any errors Router#sh cdp traffic
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 remote device Router#sh sessions




Share your views...

0 Respones to "IOS Commands"

Post a Comment

 

Contributors

Our Partners

DISCLAIMER: This site does not store any files on its server. I only index and link to content provided by other sites. All the files are from internet. In case of any query/objection regarding copyright or privacy, please inform me at Contact me and leave your comment here. I will immediately respond to you.