Cisco CCNA Command Summary

This article will attempt to summarize the CCNA commands found in both ICND Part 1 and 2 as well as the current CCNA exam (640-802). While it is not possible to list an exhaustive list of IOS commands, it does cover the majority of commands that will appear on the CCNA exam. Older CISCO command lists may contain additional commands, such as IPX, that are no longer present on the CCNA exam.

If you follow the Cisco Lab articles of WebTech360, you will see that they are all in English, so the command table below I will "play" in a bilingual style, "half lean half fat" so that you can understand but still not feel strange when using all Vietnamese.

Common CCNA Commands

Cisco commands to access modes

Describe

Command

User mode

Switch>

Enter Privilege mode

Switch>enable

Privileged mode

Switch#

Enter configuration mode

Switch#configure terminal

Global Config mode

Switch(config)#

Enter Interface mode

Switch(config)#interface fa0/1

Interface mode

Switch(config-if)

Return to global configuration (Return to Global Config)

Switch(config-if)exit

Exit Global Config mode

Switch(config)#exit

Return to user mode

Switch#disable

Logout

Switch>exit

Common shortcuts

Describe

Shortcuts

Recall Previous command (Call Previous command)

Up arrow or p

Recall Next command

Down arrow or n

Start command

a

End of command

e

Delete input

d

Exit Configuration Mode

z

Refresh the output on the screen

R

Complete the order

TAB

CISCO switch configuration command

Describe

Command

Configure device system name

Switch(config)#hostname sw1

Sets the encrypted enable password

Switch(config)#enable secret cisco

Sets the unencrypted enable password

Switch(config)#enable password cisco

Enable password encryption on all clear text password within the configuration file

Switch(config)#service password-encryption

Configure a Message Of The Banner, with an ending character of $

Switch(config)#banner motd $

Assign IP address to vlan (assign ip to vlan)

Switch(config)#int vlan 1

Switch(config-if)#ip addr 172.22.1.11

255.255.255.0

Assign Default gateway, note the mode: assign default gateway.

Switch(config)#ip default-gateway 10.1.1.1

Select one interface: select 1 interface.

Switch(config)#int fa0/1

Select a range of interfaces (version dependent): select a range of interfaces.

Switch(config)#int range fa0/1 – 12

Set the interface description: Write a description for the interface.

Switch(config-if)#description

Add vlan using config mode: add vlan using config mode.

switch(config)#vlan 11 switch(config-vlan)#name test

Configure Interface fa0/1 @ speed 100 Mbps and full duplex: Configure int fa0/1 @ speed 100Mbps and full duplex.

Switch(config-if)#speed 100 Switch(config-if)#duplex full

Assign interface to vlan: assign int to vlan.

switch(config-if)#switchport access vlan 11

Enable Port Security: Enable port security.

Switch(config-if)#switchport mode access Switch(config-if)#switchport port-security Switch(config-if)#switchport port-security mac-address sticky

Disable Interface: disable int

Switch(config-if)shutdown

Enable Interface: allows int operations.

Switch(config-if)no shutdown

Configures 5 Telnet sessions each with a password of 'cisco': allows 5 Telnet sessions at a time, password is cisco.

Switch(config)#line vty 0 4

Switch(config-line)#login

Switch(config-line)#password cisco

Enable and define console password of 'cisco': Enable and define console password of 'cisco'.

Switch(config)#line child 0

Switch(config-line)#login

Switch(config-line)#password cisco

Synchronise console messages (keep what you have typing on the screen): Synchronise console messages, keep what you have typing on the screen.

Switch(config-line)#logging synchronous

Set the timezone and automatically adjust: Set the timezone and automatically adjust.

Switch(config)#clock timezone gmt 0 Switch(config)#clock summer-time gmt recurring

Sets the switch priority for the vlan: Sets the priority for the vlan.

Switch(config)#spanning-tree vlan 1 priority 4096

Enables portfast: Enables portfast.

Switch(config)#int fa0/1

Switch(config-if)#spanning-tree portfast

Enables RSTP: Enables RSTP, other options are PVST and MST.

Switch(config)#spanning-tree mode rapid-pvst

Creates a vlan: Creates a vlan. This command is executed in config mode, not in the vlan database, and the int vlan command does not create a vlan.

Switch(config)#vlan 2 Switch(config-vlan)#name sales

Assign an interface to vlan 2: Assign int to vlan 2.

Switch(config-if)#switchport access vlan 2

Force int to be trunk unconditionally. Other modes available are access and dynamic.

Switch(config-if)#switchport mode trunk

Manually assign a switch to a VTP domain. A switch automatically becomes part of a VTP domain if it is in a "null" domain and receives a VTP frame.

Switch(config)#vtp domain lab

Change VTP mode from default server to client. It cannot be changed in client mode.

Switch(config)#vtp mode client

Cisco router configuration commands

Set a console password to cisco: Set the console password to Cisco. Router(config)#line con 0
Router(config-line)#login
Router(config-line)#password cisco
Set a telnet password: Set a telnet password. Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password cisco
Stop console timing out: Console is not logged off. Router(config)#line child 0
Router(config-line)#exec-timeout 0 0
Set the enable password to cisco: Set the enable password to cisco. Router(config)#enable password cisco

Set the enable secret password to peter:

Set the secret password to peter. This password overrides the enable password and is encrypted in the configuration file.

Router(config)#enable secret peter
Enable an interface: Enable the interface. Router(config-if)#no shutdown
To disable an interface: Turn off the interface. Router(config-if)#shutdown
Set the clock rate for a router with a DCE cable to 64K: Set the clock rate for the router with a DCE cable to 64000. Router(config-if)clock rate 64000
Set a logical bandwidth assignment of 64K to the serial interface: Assign logical bandwidth to the serial interface. Router(config-if)bandwidth 64
To add an IP address to an interface: Add an IP to the interface. Router(config-if)#ip addr 10.1.1.1 255.255.255.0
To enable RIP on all 172.16.xy interfaces: Enable RIP on all 172.16.xy interfaces Router(config)# router rip
Router(config-router)#network 172.16.0.0
Disable RIP: Disable RIP. Router(config)#no router rip
To enable IRGP with an AS of 200, to all interfaces: Enable IRGP with AS 200 for all interfaces. Router(config)#router igrp 200
Router(config-router)#network 172.16.0.0
Disable IGRP: Disable IGRP. Router(config)#no router igrp 200
The remote network static route is 172.16.1.0, with mask 255.255.255.0, next hop 172.16.2.1, with cost 5 hops. Router(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.1 5
Disable CDP for the whole router: Disable CDP for the whole router. Router(config)#no cdp run
Enable CDP for the whole router: Enable CDP for the whole router. Router(config)#cdp run
Disable CDP on an interface: Turn off CDP on the interface. Router(config-if)#no cdp enable

Enable the http server to SDM can be used: Enable the http server to use SDM.

Router(config)#ip http server

Defines a username and password: Sets a username (sue) and password (cisco). Can be used for PPP authentication or user access.

Router(config)#username sue password cisco

Define local hosts file in unix, like:

/etc/hosts in unix

Router(config)#ip host mypc 10.1.1.3

Disables DNS lookup. Useful when commands are mistyped.

Router(config)#no ip domain-lookup

Sets the logical (not physical) bandwidth for the interface. Commonly used by routing protocols, SNMP queries.

Router(config)#int s0

Router(config-if)#bandwidth

Set physical clock

Router(config-if)#clock rate 64000

Set the serial interface WAN encapsulation: In addition to hdlc, other options are PPP and frame-relay.

Router(config-if)#encapsulation hdlc

Authentication on PPP is optional: This command enables chap on the interface, the other option is PAP.

Router(config-if)#ppp authentication chap

Select LMI type. If LMI type is not configured correctly it will be detected automatically.

Router(config-if)#frame-relay lmi-type cisco

Static routing. Static routing type has Administrative Distance (AD) of 1, so it will override any dynamic routing.

Router(config)#ip route 50.0.0.0 255.0.0.0

10.1.2.1

Enables RIP version 1 on all LOCAL interfaces which have a 10.xxx address: Enables RIP v1 on all LOCAL interfaces which have a 10.xxx address

Enables RIP version 2: Enable RIP v2

Router(config)#router rip

Router(config-router)#network 10.0.0.0

Router(config-router)#version 2

Enable the router to provide a DHCP service: Set up DHCP on the router.

Router(config)#ip dhcp pool MYPOOL

Router(dhcp-config)#network 10.1.1.0 255.255.255.0

Router(dhcp-config)#default-router 10.1.1.1 Router(dhcp-config)#exit

Router(config)#ip dhcp excluded-address 10.1.1.1 10.1.1.99

Config register settings: Specifies what the router will do when it boots.

Router(config)#config-register 0x2102

Create a sub logical interface under the physical interface.

Enable 802.1q trunking on the interface.

Set IP address.

Router(config)#int fa0/0.1

Router(config-subif)#encapsulation dot1Q 1

Router(config-subif)#ip address 10.1.1.1

255.255.255.0

Enable OSPF on any local interface starting with IP address 10.1.xx

Router(config-)#router ospf 1

Router(config-router)#network 10.1.0.0

0.0.255.255 area 0

EIGRP can be configured the same as RIP or using the mask option.

Router(config)#router eigrp 1

Router(config-router)#network 172.16.0.0 Or

Router(config-router)#network 172.16.2.0

0.0.0.255

Set the ACL standard. This standard uses numbers from 1 to 99.

Router(config)#access-list 1 permit

172.16.1.1

Set up Extended ACL. The first address is the source IP address.

Router(config)#access-list 101 deny tcp host

172.16.1.1 host 172.16.2.1 eq telnet Router(config)#access-list 101 permit ip any any

Use the group command to attach an ACL to an interface: Use the group command to attach an ACL to an interface.

Router(config)#interface fa0/0

Router(config-if)#ip access-group 1 out

Example of using ACL names instead of numbers.

Router(config)#ip access-list extended my_list

Router(config-ext-nacl)# deny tcp host

172.16.1.1 host 172.16.2.1 eq ftp

Router(config-ext-nacl)# permit ip any any

Assign ACL to interface by name.

Router(config)#int fa0/0

Router(config-if)#ip access-group my_list in

Configuring a static NAT to allow a server to be access via the Internet, using the IP address on interface s0/0/1: Configuring a static NAT to allow a server to be access via the Internet, using the IP address on interface s0/0/1.

Router(config)#ip nat inside source static

10.1.1.2 interface s0/0/1

Defining interface which NAT takes place between: Defines the interface which NAT takes place between.

Router(config)#int fa0/0.1

Router(config-if)#ip nat inside

Enables RIPng: Enables RIPng

Router(config)#ipv6 unicast-routing

Router(config)#ipv6 router rip ccna

Router(config)#int s0/0/0

Router(config-if)#ipv6 rip ccna enable

Privilege Commands on Switch

Describe

Command

Enable automatic setup dialog when device starts without configuration.

Switch#setup

Displays the config held in DRAM. Which is lost if not copy run start command is not used: Displays the config held in DRAM. Which is lost if not copy run start command is not used.

Switch#show running-config

Displays the NVRAM (None volatile) config: Displays the NVRAM configuration.

Switch#show startup-config

Saves the config: Saves the configuration, without this command all changes, configuration will be lost.

Switch#copy running-config startup-config

Saves the running config to a TFTP server: Saves the running config to a TFTP server.

Switch#copy running-config tftp

Copy IOS files to a TFTP server: Copy IOS files to a TFTP server.

Switch#copy flash tftp

Copies files from a TFTP server to the device flash: Copy files from TFTP server to the device flash.

Switch#copy tftp flash

Erase the config held in NVRAM: Erase the configuration held in VNRAM. If this command is executed with reload, all configuration will be lost.

Switch#erase startup-config

Reboots the device: Reboots the switch.

Switch#reload

Abort sequence: Cancel a command, procedure

6

Suspend Telnet Session: Suspend the telnet session

Press 6 at the same time, release all keys and immediately press x

Show the current sessions: View the current sessions, any session with * is the active session.

Switch#show sessions

Forcible closes a telnet session: Force closes a telnet session.

Switch#disconnect

Set the device local clock: Set the local time for the device. This command is not available in configuration mode.

Switch#clock set 10:00:00 April 2 2008

Display the IOS version along with other useful info: View the IOS version and other useful information such as system uptime, register configuration...

Switch#show version

View flash file contents.

Switch#show flash

Watch the time.

Switch#show clock

View currently logged in users.

Switch#show users

By default displays the last 10 commands: View the last 10 commands used.

Switch#show history

Displays the ARP cache: View the ARP cache.

Switch#show arp

Displays the spanning tree status on vlan 1: Views the spanning tree status on vlan 1.

Switch#show spanning-tree vlan 1

Lists all the configured vlans: Lists all the configured vlans.

Switch#show vlan

Displays VTP info such as VTP mode, VTP domain, VTP counter: Displays VTP info such as VTP mode, VTP domain, VTP counter.

Switch#sh vtp status

Ping selected address: Ping an IP address.

Switch#ping 10.1.1.1

Extended ping: Must be performed in privilege mode.

Switch#ping

Display the interface status: Display the interface status.

Switch#show int fa0/1

Displays the vlan status and the IP address VLAN 1 (often the management vlan): View VLAN 1 status.

Switch#show interfaces vlan 1

Displays a list of CDP neighbors: View a list of CDP neighbors.

Switch#show cdp neighbors

Extended information on the above: View more information than the above command.

Switch#show cdp neighbors details

Display CDP packets as they arrive: View CDP packets as they arrive.

Switch#debug cdp packets

Display ping packets as they arrive: Display ping packets as they arrive.

Switch#debug icmp packets

Display switch MAC Addresses table. These entries are learned from the source mac address in the Ethernet frames:

Switch#show mac address-table

Privilege Commands, show command on Router

Request

Cisco Commands

Enter privileged mode

enable

Return to user mode from privileged

disable

Log out of the router

logout/exit/quit

View router version

Router#show version

View current configuration (DRAM)

Router#show running-config

View startup configuration (NVRAM)

Router#show startup-config

View IOS, flash file size

Router#show flash

View all recorded router logs.

Router#show log

View interface status of interface e0

Router#show interface e0

Displays the interface operational status and IP addresses for all router interfaces: Views the interface operational status and IP addresses for all router interfaces.

Router#show ip interface brief

View cable type on s0

Router#show controllers 0

View connected cdp devices

Router#show cdp neighbor

View details on all devices

Router#show cdp entry *

Displays all the configured routing protocols: View all the configured routing protocols.

Router#show ip protocols

Displays the IP routing table: Displays the IP routing table.

Router#show ip route

Show access list

Router#show access-lists

See which router can see the ISDN switch

Router#show isdn status

Displays the NAT translations: View the NET translations.

Router#show ip nat translations

View physical cable configuration:

DTE/DCE, x.21, V.35,

RS232

Router#show controllers s 0

Displays the end-to-end status: Displays the end-to-end status

Router#show frame-relay pvc

Displays the type of LMI and the number LMI frames: Displays the type of LMI and the number LMI frames.

Router#show frame-relay lmi

Displays the frame relay inverse ARP table: Displays the frame relay inverse ARP table.

Router#show frame-relay map

View ospf neighbor list and their status

Router#show ip ospf neighbor

View ospf interface status.

Router#show ip ospf interface

View eigrp neighbor list and their status.

Router#show ip eigrp neighbor

View EIGRP interface status.

Router#show ip eigrp interface

View all trunk ports on the device

Router#show interface trunk

ping IPv6

Router#ping 2000:1000:500:3::1

Copy command on Cisco router

Request Cisco Commands
Save current configuration from DRAM to NVRAM copy running-config startup-config
Merge NVRAM configuration into DRAM copy startup-config running-config
Copy DRAM configuration to TFTP server copy running-config tftp
Merge TFTP configuration with current router configuration stored in DRAM copy tftp runing-config
Backup IOS to TFTP server copy flash tftp
Upgrade router IOS from TFTP server copy tftp flash

Debug command on Cisco router

Request Cisco Commands
Enable debugging for RIP debug ip rip
View summary IGRP debug information debug ip igrp events
View detailed IGRP debug information debug ip igrp transactions
Debug IPX RIP debug ipx routing activity
Debug IPX SAP debug IPX SAP
Enable debugging for CHAP or PAP debug ppp authentication
Turn off all debugging no debug all

debug all

See also: CCNP_BCMSN Lab: Trunk Configuration

Tags: #System
Sign up and earn $1000 a day ⋙

Leave a Comment

Summary of ways to fix Windows 10 black screen error

Summary of ways to fix Windows 10 black screen error

Windows 10 has proven to be a reliable operating system, but like other versions, users may face many problems while using Windows 10. One of the “worst” problems that users often encounter is the black screen error.

What is the use of the shortcut Ctrl + Z on Windows? Probably more than you think

What is the use of the shortcut Ctrl + Z on Windows? Probably more than you think

Ctrl + Z is an extremely common key combination on Windows. Ctrl + Z basically allows you to undo actions in all areas of Windows.

Do not click on any shortened link until you are sure it is safe!

Do not click on any shortened link until you are sure it is safe!

Shortened URLs are convenient for cleaning up long links, but they also hide the real destination. If you want to avoid malware or phishing, blindly clicking on that link is not a wise choice.

14 Windows Apps and Software You Need on Your New Computer

14 Windows Apps and Software You Need on Your New Computer

Below is a list of recommended software when installing a new computer, so you can choose the most necessary and best applications on your computer!

How to know if a link is safe or not?

How to know if a link is safe or not?

Nowadays, malicious links appear more and more and are shared through social networks at a dizzying speed. Just clicking on a malicious link can bring potential dangers to you.

How to clone Windows settings to take your workflow anywhere

How to clone Windows settings to take your workflow anywhere

Carrying an entire operating system on a flash drive can be very useful, especially if you don't have a laptop. But don't think this feature is limited to Linux distributions - it's time to try cloning your Windows installation.

How to change the Windows 11 Recycle Bin icon

How to change the Windows 11 Recycle Bin icon

Switching the Recycle Bin icon in Windows 11 simplifies wallpaper customization, giving you the look and feel that suits your taste or theme.

4 Ways to Change File Extensions in Windows 11

4 Ways to Change File Extensions in Windows 11

This article explains how to change file extensions in Windows 11, as well as discusses the difference between file extensions and file types.

3 Ways to Enable and Disable Windows 11 AutoPlay

3 Ways to Enable and Disable Windows 11 AutoPlay

Although it is quite convenient, many people do not like AutoPlay because of security issues. In this guide, you will learn some ways to enable or disable AutoPlay Windows 11.

How to enable/disable Language bar Windows 11

How to enable/disable Language bar Windows 11

Depending on the needs of use, users can quickly enable or disable the Language bar on the computer. Below are instructions to enable or disable the Language bar Windows 11.

How to know if someone has installed surveillance software on your laptop?

How to know if someone has installed surveillance software on your laptop?

Luckily, there are some simple ways to detect hidden surveillance software and regain control of your privacy.

How to update TPM 1.2 to TPM 2.0 for Dell laptops, Dell computers

How to update TPM 1.2 to TPM 2.0 for Dell laptops, Dell computers

Dell provides users with an update solution from TPM 1.2 to TPM 2.0.

How to find the maximum RAM capacity of your computer

How to find the maximum RAM capacity of your computer

When buying a new desktop or laptop, you can save some money by buying a device with basic specifications. You can increase its performance later by upgrading the RAM.

What is Cloudflare WARP? Should I use it?

What is Cloudflare WARP? Should I use it?

WARP is a VPN that helps you connect to the Internet using Cloudflare's 1.1.1.1 DNS while optimizing and securing (i.e. encrypting) your connection. 1.1.1.1 is one of the fastest and most secure DNS options.

Cisco CCNA Command Summary

Cisco CCNA Command Summary

This article will attempt to cover the CCNA commands in both ICND part 1 and 2 as well as the current CCNA exam (640-802).

Summary of ways to fix Windows 10 black screen error

Summary of ways to fix Windows 10 black screen error

Windows 10 has proven to be a reliable operating system, but like other versions, users may face many problems while using Windows 10. One of the “worst” problems that users often encounter is the black screen error.

What is the use of the shortcut Ctrl + Z on Windows? Probably more than you think

What is the use of the shortcut Ctrl + Z on Windows? Probably more than you think

Ctrl + Z is an extremely common key combination on Windows. Ctrl + Z basically allows you to undo actions in all areas of Windows.

Do not click on any shortened link until you are sure it is safe!

Do not click on any shortened link until you are sure it is safe!

Shortened URLs are convenient for cleaning up long links, but they also hide the real destination. If you want to avoid malware or phishing, blindly clicking on that link is not a wise choice.

14 Windows Apps and Software You Need on Your New Computer

14 Windows Apps and Software You Need on Your New Computer

Below is a list of recommended software when installing a new computer, so you can choose the most necessary and best applications on your computer!

How to know if a link is safe or not?

How to know if a link is safe or not?

Nowadays, malicious links appear more and more and are shared through social networks at a dizzying speed. Just clicking on a malicious link can bring potential dangers to you.

How to clone Windows settings to take your workflow anywhere

How to clone Windows settings to take your workflow anywhere

Carrying an entire operating system on a flash drive can be very useful, especially if you don't have a laptop. But don't think this feature is limited to Linux distributions - it's time to try cloning your Windows installation.

How to change the Windows 11 Recycle Bin icon

How to change the Windows 11 Recycle Bin icon

Switching the Recycle Bin icon in Windows 11 simplifies wallpaper customization, giving you the look and feel that suits your taste or theme.

4 Ways to Change File Extensions in Windows 11

4 Ways to Change File Extensions in Windows 11

This article explains how to change file extensions in Windows 11, as well as discusses the difference between file extensions and file types.

3 Ways to Enable and Disable Windows 11 AutoPlay

3 Ways to Enable and Disable Windows 11 AutoPlay

Although it is quite convenient, many people do not like AutoPlay because of security issues. In this guide, you will learn some ways to enable or disable AutoPlay Windows 11.

How to enable/disable Language bar Windows 11

How to enable/disable Language bar Windows 11

Depending on the needs of use, users can quickly enable or disable the Language bar on the computer. Below are instructions to enable or disable the Language bar Windows 11.

How to know if someone has installed surveillance software on your laptop?

How to know if someone has installed surveillance software on your laptop?

Luckily, there are some simple ways to detect hidden surveillance software and regain control of your privacy.

How to update TPM 1.2 to TPM 2.0 for Dell laptops, Dell computers

How to update TPM 1.2 to TPM 2.0 for Dell laptops, Dell computers

Dell provides users with an update solution from TPM 1.2 to TPM 2.0.

How to find the maximum RAM capacity of your computer

How to find the maximum RAM capacity of your computer

When buying a new desktop or laptop, you can save some money by buying a device with basic specifications. You can increase its performance later by upgrading the RAM.

What is Cloudflare WARP? Should I use it?

What is Cloudflare WARP? Should I use it?

WARP is a VPN that helps you connect to the Internet using Cloudflare's 1.1.1.1 DNS while optimizing and securing (i.e. encrypting) your connection. 1.1.1.1 is one of the fastest and most secure DNS options.