Networks Training

  • About
  • My Books
  • SUGGESTED TRAINING
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / Cisco Routers / Cisco Router Configuration Commands – CLI Cheat Sheet

Cisco Router Configuration Commands – CLI Cheat Sheet

Written By Harris Andrea

cisco router basic configuratio commandsn

In a previous post, I have published a Cisco Switch Commands Cheat Sheet tutorial. Since these kinds of posts are useful as a reference for many people, I have decided to create also a Cisco Router Commands Cheat Sheet with the most useful and the most frequently used Command Line Interface (CLI) configuration commands for Cisco Routers.

Cisco IOS routers are probably the most complete, versatile and feature-rich networking devices. There are whole books written about Cisco router configurations and commands.

Therefore it’s not possible to create a cheat sheet with all of the CLI commands of Cisco routers in one blog post. However, the list below I believe summarizes the most important ones so its a good starting point for a networking professional.

Table of Contents

    • Download Free Cisco Commands Cheat Sheets
  • Show/Verification Commands:
  • Saving and Deleting Configurations
  • Device Name:
  • Device Security Commands:
  • Configuring Router Interfaces
    • Serial interfaces
    • Ethernet Ports
  • Configure Routing
    •  Static Routing
    • Default routing
    • Dynamic Routing
      • RIP version 1:
      • RIP version 2:
      • RIP Verification Commands
      • EIGRP
      • EIGRP verification commands
      • OSPF
      • OSPF Authentication
      • OSPF Verification Commands
  •  Configure Access Control Lists
  • Configure Network Address Translation (NAT)
    • Dynamic NAT overload (PAT)
    • Static NAT
  • DOWNLOAD THE CHEAT SHEET AS PDF FILE
  • Related Posts

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

We use Elastic Email as our marketing automation service. By submitting this form, you agree that the information you provide will be transferred to Elastic Email for processing in accordance with their Terms of Use and Privacy Policy. Also, you allow me to send you informational and marketing emails from time-to-time.

Although there is a wide range of Cisco router models, the commands below will work on most devices running IOS with no problems. Make sure to download the cheat sheet in PDF format for future reference (by subscribing above).

Show/Verification Commands:

Router#show version                                                    

[Displays information about running IOS version, hardware model etc]

Router#show flash:                                                                   

[Displays information about Flash memory]

Router#show ip interface brief                                              

[Displays interface status and IP addresses for all interfaces]

Router#show ip protocols                                                        

[Displays configured routing protocols such as RIP,EIGRP, OSPF etc]

Router#show ip route                                                                

[Displays the routing table]

Router#show cdp neighbors                                                    

[Displays information about directly connected devices]

Router#show cdp neighbors detail                                        

[Displays Detailed information about neighboring connected devices]

Router#show running-config                                                  

[Displays currently running configuration]

Router#show startup-config                                                    

[Displays configuration in NVRAM which will be loaded after reboot]

Router#show history                                                                  

[Displays all commands in the history buffer]

 Router#show tech-support                                                            

[Send the output of this command to Cisco tech support when you open a support ticket in TAC]

Saving and Deleting Configurations

Router#copy running-config startup-config                      

[Save the running config to NVRAM to be used at next reboot ]

Router#copy running-config tftp:                                        

MORE READING:  How to Configure Cisco Router 3G-4G Mobile Cellular Connection

[Copy the running config to a TFTPserver for backup]

Router#copy tftp: running-config                                          

[Load the saved configuration from TFTP server to DRAM]

Router#erase startup-config                                                

[Delete the startup config from NVRAM

Device Name:

Router(config)#hostname MyRouter                                      

[Set hostname for the router]

Device Security Commands:

MyRouter(config)#enable secret test1                                  

[Sets encrypted secret password for Privilege exec mode (“enable” mode)]

MyRouter(config)# line con 0
MyRouter(config)# password strongconsolepass
MyRouter(config)# login

 [Secure the console with a password]

 MyRouter(config)# line vty 0 4
MyRouter(config)# password strongtelnetpass
MyRouter(config)# login

 [Secure the telnet terminal lines with a password]

MyRouter(config)# service password-encryption

[Encrypt all passwords on the device]

Configuring Router Interfaces

Serial interfaces

MyRouter(config)#interface s0/0/0                                            

 [Entering into serial interface s0/0/0 configuration mode]

 MyRouter(config-if)#ip address 10.10.10.1 255.255.255.0  

 [Set ip address and subnet mask on the interface]

 MyRouter(config-if)#clock rate 64000                                      

 [Assign a clock rate]

 MyRouter(config-if)#no shut                                                      

 [Turns the interface on]

Ethernet Ports

 MyRouter(config)#int f0/1                                                              

 [Entering into ethernet interface fastethernet0/1 configuration mode]

MyRouter(config-if)#ip address 192.168.1.1 255.255.255.0    

 [Set ip address and subnet mask on the interface]]

 MyRouter(config-if)#no shut                                                          

 [Turns the interface on]

Configure Routing

 Static Routing

 1st method:

MyRouter(config)#ip route 20.20.20.0 255.255.255.0 10.10.10.2

 [20.20.20.0=Destination Network , 255.255.255.0 = subnet mask of destination network , 10.10.10.2 = next-hop address]

 2nd method:

MyRouter(config)#ip route 20.20.20.0 255.255.255.0 serial 0/0/0

 [Same as above but instead of gateway you specify the exit interface]

 MyRouter(config)#ip route 20.20.20.0 255.255.255.0 10.10.10.2 150

 [Set administrative distance of 150 if needed. For static route, default is 1]

Default routing

MyRouter(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.2                    

 [Send all packets destined for a network not in the routing table to 10.10.10.2(next hop)]

OR

MyRouter(config)#ip route 0.0.0.0 0.0.0.0 serial 0/0/0                            

 [Send all packets destined for network not in the routing table out serial 0/0/0 interface]

Dynamic Routing

RIP version 1:

MyRouter(config)#router rip                                                                  

 [Enable RIP as routing Protocol]

 MyRouter(config-router)#network 10.10.10.0                                    

 [10.10.10.0 is the directly connected network we want to advertise]

RIP version 2:

MyRouter(config)#router rip                                                                  

 [Enable RIP as routing Protocol]

 MyRouter(config-router)#version 2                                                      

 [Enable RIP version 2. Version 1 is default]

 MyRouter(config-router)#network 10.10.10.0                                    

 [10.10.10.0 is the directly connected network we want to advertise]

 MyRouter(config-router)#no auto-summary                                      

 [Turns off auto-summarization- optional]

 MyRouter(config-router)#auto-summary                                                  

 [Turns on auto summarization – optional]

RIP Verification Commands

 MyRouter#sh ip route

MyRouter#sh ip rip database

MyRouter#sh ip route rip

EIGRP

 MyRouter(config)#router eigrp 10            

 [Enable EIGRP process. 10 is autonomous system (AS) number, AS can be any number b/w 1 and 65535. All routers should be in the same AS to build a neighbor relationship.]

 MyRouter(config-router)#network 172.16.10.0 0.0.0.255  

 [172.16.10.0/24 is the network to advertise]

 MyRouter(config-router)#no auto-summary

 [Turns off the auto-summarization – Optional]

EIGRP verification commands

MyRouter#show ip eigrp neighbors                

MORE READING:  Adjusting MSS and MTU on Cisco 800 routers for PPPoE over DSL

 [Displays neighbor table]

 MyRouter#show ip eigrp interfaces                

 [Displays information for each interface running EIGRP]

 MyRouter#show ip eigrp topology                  

 [Displays the topology table. Shows feasible successors]

OSPF

 MyRouter(config)#router ospf 10                      

 [Enables OSPF process number 10. Process ID is any number b/w 1-65535. It doesn’t need to be matched with neighbor routers]

 MyRouter(config-router)#network 10.10.10.0 0.0.0.255 area 0

 [Any interface with an address of 10.10.10.x is to be put into AREA 0 and will advertise and receive OSPF routes]

OSPF Authentication

 Simple

MyRouter(config)#router ospf 10
MyRouter(config-router)#area 0 authentication              

 [Enables simple authentication. Password will be sent in clear text]

MyRouter(config-router)#exit
MyRouter(config)#int s0/0/0
MyRouter(config-if)#ip ospf authentication-key 1234

 [Sets password to 1234 for AREA 0 authentication]

MD5 Encryption

MyRouter(config)#router ospf 10
MyRouter(config-router)#area 0 authentication message-digest

 [Enables MD5 password encryption]

 MyRouter(config-router)#exit
MyRouter(config)#int s0/0/0
MyRouter(config-if)#ip ospf message-digest-key 10 md5 1234  

 [10 is the key id. This value must be the same on neighboring routers. Md5 indicates that MD5 algorithm is  used and 1234 is the password and must be same on the neighboring routers]

OSPF Verification Commands

 MyRouter#show ip ospf                                                          

 [Displays basic configured ospf information]

 MyRouter#show ip ospf interfaces                                        

 [Displays OSPF interfaces information]

 MyRouter#show ip ospf neighbor

 [Displays all ospf neighbors and their states]

MyRouter#show ip route ospf

 [Show routes learned by ospf]

 Configure Access Control Lists

MyRouter(config)# access-list 101 deny tcp 10.1.1.0 0.0.0.255 any eq 80
MyRouter(config)# access-list 101 permit ip any any

[Configure an extended ACL to deny access to port 80 for network 10.1.1.0/24 and allow everything else]

MyRouter(config)# interface fastEthernet 1/0
MyRouter(config-if)# ip access-group 101 in

[Apply ACL 101 in the inbound direction on interface fe1/0]

Configure Network Address Translation (NAT)

Dynamic NAT overload (PAT)

MyRouter(config)# interface fastEthernet 1/0
MyRouter(config-if)# ip nat inside

 [Specify which interface will be the inside for NAT, i.e the source IPs of packets coming to this interface will be translated]

MyRouter(config)# interface fastEthernet 1/1
MyRouter(config-if)# ip nat outside

 [Specify which interface will be the outside for NAT, i.e packets going out from this interface will be translated]

MyRouter(config)# access-list 1 permit 192.168.1.0 0.0.0.255
MyRouter(config)# ip nat inside source list 1 interface fastEthernet 1/1 overload

 [Access list 1 specifies that inside source network 192.168.1.0/24 will be translated to the IP address of fastEthernet1/1. Very useful for providing internet access to internal private addresses]

Static NAT

MyRouter(config)# interface fastEthernet 1/0
MyRouter(config-if)# ip nat inside

MyRouter(config)# interface fastEthernet 1/1
MyRouter(config-if)# ip nat outside

[Define again the inside and outside NAT interfaces]

MyRouter(config)# ip nat inside source static 192.168.1.1 50.1.1.1

[Private IP 192.168.1.1 will be translated statically to Public IP 50.1.1.1 (one-to-one mapping)]

DOWNLOAD THE CHEAT SHEET AS PDF FILE

Related Posts

  • How to Configure a Loopback Interface on Cisco Router & Switch
  • Comparison of Static vs Dynamic Routing in TCP/IP Networks
  • Cisco OSPF DR-BDR Election in Broadcast Networks – Configuration Example
  • How to Configure Port Forwarding on Cisco Router (With Examples)
  • Adjusting MSS and MTU on Cisco 800 routers for PPPoE over DSL

Filed Under: Cisco Routers

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

We use Elastic Email as our marketing automation service. By submitting this form, you agree that the information you provide will be transferred to Elastic Email for processing in accordance with their Terms of Use and Privacy Policy. Also, you allow me to send you informational and marketing emails from time-to-time.

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books ("Cisco ASA Firewall Fundamentals" and "Cisco VPN Configuration Guide") which are available at Amazon and on this website as well.

Comments

  1. vikram says

    January 27, 2016 at 8:26 am

    very good articles. pl. share such useful articles more

  2. Rodrigo Araujo says

    January 27, 2016 at 5:10 pm

    Hi Harris,

    Congratulations about your blog and your ebook :-)

    Could you please add too about BGP4 to setup ASN and IPs ?

    Thanks,
    Rodrigo Araujo
    ITMNETWORKS
    Brazil

  3. Harris Andrea says

    January 27, 2016 at 7:52 pm

    Thanks Rodrigo, will consider your suggestion about BGP

  4. Ken Cutler says

    February 6, 2016 at 4:08 am

    I do not subscribe to the social media you require to get a PDF of the Cisco Router Command and other cheatsheets. How can I get PDFs of the Router commands and Switch commands cheatsheets??? Thank you.

  5. Harris Andrea says

    February 6, 2016 at 11:27 am

    Just sent you an email Ken

  6. John Bannister says

    August 23, 2016 at 1:41 pm

    Hi Harris,

    Brilliant blogs and info however similarly to Ken I do not subscribe to the social media you require to get a PDF of the Cisco Router Command and other cheatsheets. How can I get PDFs of the Router commands and Switch commands cheatsheets??? Thank you.

  7. Harris Andrea says

    August 23, 2016 at 4:48 pm

    John,
    Please check your email.

    Harris

  8. Art says

    November 6, 2016 at 1:02 pm

    Hi Harris

    I have 2 of you ebooks on the Asa firewall, wondering how can I get the Router and switch cheat sheet talked about on your blog???.

    I’m also checking on the new Cisco Asa 5506 tutorials….

    Will you be creating another ebook for that model or basically all the same applies ? From the 5505 Asa tutorial and guides you already have.

    Thanks

    Art

  9. Harris Andrea says

    November 6, 2016 at 5:17 pm

    Art,

    See the email I have sent you.

    Harris

  10. Trang D. Nguyen says

    November 18, 2016 at 4:11 pm

    Hi Harris,

    I would like to get pdf copy of your cheat sheets and have your permission to pass on to students at my college. I haven’t had the opportunity to review copies of your books. Although the college uses Cisco Press, students are constantly asking for supplemental publications. I will see if I could get deskcopy from your publisher to let students preview before they decide to buy.

  11. Harris Andrea says

    November 19, 2016 at 5:35 pm

    Hi Trang,

    I will send you the cheat sheets on your email in a while. You can certainly pass on the PDF files to your students.

    Please let me know if you need anything.

    Harris

  12. Lou says

    February 5, 2017 at 6:54 pm

    Hi – Thank you for the great site. I signed up but can not get the ROUTE or SWITCH cheat sheets?

  13. Harris Andrea says

    February 5, 2017 at 8:51 pm

    Lou,

    Please check your email.

    Harris

  14. Lou says

    February 5, 2017 at 8:57 pm

    Harris,
    Thank you again & have a nice day!
    Lou

  15. Lexy says

    May 3, 2017 at 10:37 pm

    Hi – Thank you for the great site. I signed up but can not get the PDF cheat sheets?

  16. Harris Andrea says

    May 4, 2017 at 2:18 pm

    Lexy,

    You will receive an email with a link to confirm your registration. Then you will receive a second email with a link to download the PDFs.

    Harris

  17. Agui says

    September 20, 2018 at 2:58 am

    Ok

  18. MD.Kalim Ullah Chowdhury says

    October 4, 2018 at 4:49 am

    i am new To cisco routimg.want to be an expert in Routing.
    I need All command Collection To learn send me please With Details

  19. Kailash says

    January 28, 2019 at 9:59 am

    Hi ,

    Greetings!

    Can I get the commands list of switch and router PDF.

    Thanks!

  20. nani says

    March 29, 2019 at 5:39 am

    heloo,
    can u please send me pdf file on switch and router cheet sheet to my emaid id….

  21. Burlhouse says

    June 24, 2019 at 2:28 pm

    Thanks for the information,really helpful!!

    Regards

  22. Luamba Jeremias says

    October 2, 2019 at 7:31 am

    useful! keep it updated.

  23. Hanu says

    March 17, 2021 at 4:03 am

    Awesome, so nice of you, it was very useful to me, I also need to have the details of all the command list used for BGP configuration and troubleshooting purpose….Please share

  24. Harris Andrea says

    March 17, 2021 at 6:43 am

    Sorry, I don’t have this right now.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this site

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2023 | Privacy Policy | Terms and Conditions | Hire Me | Contact | Amazon Disclaimer | Delivery Policy

211 shares