Cisco IOS commands every networking student should know
By Prof. Bhagyashri Thorat · Assistant Professor, E&TC, I²IT Pune
These are the commands you will type in your first Packet Tracer lab and keep using all the way to the CCNA exam.
The three main IOS modes
Cisco routers and switches run IOS, a command-line operating system. Each mode has its own prompt, so the prompt always tells you where you are.
- User EXEC (
Router>): limited monitoring commands. - Privileged EXEC (
Router#): all show commands; enter it withenable. - Global configuration (
Router(config)#): change the device; enter it withconfigure terminal.
Router> enable
Router# configure terminal
Router(config)# exit
Router#Basic device setup
The first lab in almost every course: give the device a name, secure it and add a warning banner.
Router(config)# hostname R1
R1(config)# enable secret class
R1(config)# line console 0
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)# service password-encryption
R1(config)# banner motd #Authorised access only#Use enable secret rather than enable password, because the secret is stored as a hash. The passwords above are lab examples only.
Configure an interface
R1(config)# interface GigabitEthernet0/0
R1(config-if)# ip address 192.168.1.1 255.255.255.0
R1(config-if)# description LAN link
R1(config-if)# no shutdownRouter interfaces are administratively down by default, so no shutdown is essential. On a switch you put the management address on a VLAN interface, for example interface vlan 1.
Show commands you will use in every lab
show running-config: the configuration in RAM right now.show ip interface brief: every interface, its IP address and its status.show ip route: the routing table.show version: IOS version, uptime and hardware.show interfaces: detailed counters and errors.
Save your work
R1# copy running-config startup-configThe running configuration is lost on reboot unless you copy it to NVRAM. The older write memory command does the same.
Test connectivity
R1# ping 192.168.1.10
R1# traceroute 192.168.1.10Ping uses ICMP echo messages: an exclamation mark (!) means a reply arrived and a full stop (.) means the request timed out.