CCNA | P5: IPv4 Routing | C1: Operating Cisco Routers: A Beginner's Guide

CCNA | P5: IPv4 Routing | C1: Operating Cisco Routers: A Beginner's Guide

Welcome to our blog post on Cisco routers! If you want to master the skills of networking, you need to know the difference between routers and switches, and how to use them effectively.

Lesson Contents

In this blog post, we will show you how to operate Cisco routers using the command-line interface (CLI), which is a text-based interface that allows you to configure and monitor your router.
You will learn some of the most important and handy commands that will help you set up your router's interfaces, routing protocols, security features, and more.
We will also teach you how to interpret and modify the commands, and give you some examples of how to apply them in real scenarios.

Diffrence Between Routers and Switches

Routers and switches are both devices that connect multiple networks or devices together. However, they have different functions and features.
Here are some of the main differences between routers and switches:

  • Routers forward traffic between IP networks based on the layer 3 destination IP address, switches don’t (L3 switches are an exception). Switches forward traffic based on the layer 2 MAC address.

  • On routers, IP addresses are configured per physical interface (and possibly virtual subinterfaces), not per VLAN. VLANs are logical groups of devices that share the same broadcast domain, and are usually configured on switches.

  • Routers can have an auxiliary Aux port (configured in line aux 0) that can be connected to an external modem or phone line for emergency access (faster interfaces are typically used in the real world now).

  • Routers have no MAC address table to show via # show mac address-table. Routers do not support the show interfaces status command. To list router interfaces status, you can use one of the following commands:

Example 1:
Input
# show ip interface brief – a brief summary
Output
5.1.1.webp

Example 2:
Input
# show protocols [ifname] – a somewhat longer summary, optional argument limits output to one interface
Output
5.1.2.webp

Example 3:
Input
# show interfaces [ifname] - longer summary, optional argument limits output to one interface
5.1.3.webp

Example 4:
Input
# show ip interface [ifname] – full status, optional argument limits output to one interface
5.1.4.webp

If you want to work with Cisco routers, you have to use the CLI, which is a way of typing commands and seeing the results on the screen. The CLI lets you set up and check the router.

CLI Modes

The CLI has two main parts: user mode and privileged mode.
User mode shows you a > sign, and lets you see some basic information and do some simple tests.
Privileged mode shows you a # sign, and lets you change and fix the router.
To go from user mode to privileged mode, type enable and press Enter.
To go back from privileged mode to user mode, type disable and press Enter.
For example, if you want to see the router's configuration in privileged mode, you can type show running-config and press Enter.
This will show you all the settings of the router. You can also change these settings by typing different commands in privileged mode.

When you are in privileged mode, you have access to various configuration modes that allow you to modify different aspects of the router's behavior.
For instance, if you want to change some general settings that apply to the whole router, such as its name or its passwords, you can enter global configuration mode.
To do that, just type config terminal and press Enter.
You will see a prompt that indicates you are in global configuration mode.
From there, you can enter other sub-modes or type commands to adjust the router's parameters. When you are done with global configuration mode, you can go back to privileged mode by typing end or pressing Ctrl+Z. This will save your changes and return you to the original prompt.

Interface Configuration Example

One of the tasks that you may need to do on a router is to configure an interface, such as an Ethernet or a Serial port.
An interface is a connection point that allows the router to communicate with other devices.
To configure an interface, you need to enter a special mode called interface configuration mode.
This mode lets you change the settings of the interface, such as its IP address, speed, duplex, and so on.

To enter interface configuration mode, you first need to be in global configuration mode.
This is the mode that allows you to change the general settings of the router.
You can enter global configuration mode by typing enable and then configure terminal from the user EXEC or privileged EXEC mode.
Once you are in global configuration mode, you can type interface followed by the name of the interface that you want to configure.

For example, if you want to configure the Ethernet0/0 interface, you can type interface Ethernet0/0. This will take you to interface configuration mode for that interface.

To exit interface configuration mode and return to global configuration mode, you can simply type exit.
This will allow you to configure other interfaces or other settings on the router.
To exit global configuration mode and return to privileged EXEC mode, you can type end or press Ctrl-Z. To exit privileged EXEC mode and return to user EXEC mode, you can type disable.

Configuration Management

Here is a more detailed and illustrative explanation of how to save and erase your configuration changes on the router.

When you make changes to the router's configuration, they are stored in a temporary memory called running-config.
This memory is volatile, which means it will be erased if the router loses power or reboots.
To prevent losing your changes, you need to copy them to a permanent memory called startup-config.
This memory is non-volatile, which means it will retain the data even if the router is turned off or restarted.
The startup-config file contains the configuration that the router will load when it boots up.

To copy your changes from running-config to startup-config, you need to enter a command from privileged mode.
Privileged mode is a special mode that gives you access to advanced commands and settings on the router. To enter privileged mode, type enable from user mode and enter the password if prompted.
You will see a # symbol at the end of the prompt, indicating that you are in privileged mode.

The command to copy your changes is copy running-config startup-config. This command will copy the contents of running-config to startup-config, overwriting any existing data in startup-config.
You will see a message confirming that the copy was successful.

To erase your changes from the router and restore it to factory defaults, you need to delete the startup-config file from NVRAM and reboot the router.
NVRAM is a type of non-volatile memory that stores the startup-config file and other data on the router.

To delete the startup-config file, you need to enter another command from privileged mode.
The command is erase startup-config.
This command will erase the contents of startup-config, leaving it empty. You will see a message asking you to confirm the deletion.
Press Enter to confirm.

To reboot the router, you need to enter one more command from privileged mode. The command is reload. This command will restart the router and load a default configuration from ROM (read-only memory).
You will see a message asking you to confirm the reload.
Press Enter to confirm.

By following these steps, you can save and erase your configuration changes on the router as needed.

Conclusion

This blog post is only a brief overview of the Cisco router commands. There are many more commands and options that you can explore and customize according to your needs and preferences. To learn more about the Cisco router commands and their functions, we recommend that you check out the official Cisco documentation or some of the online resources that are available on the internet. You can find links to some of these resources at the end of this post.

We hope that you enjoyed reading this blog post and that it helped you gain some insight into the Cisco router commands. If you have any questions or feedback about this topic, please feel free to leave a comment below. We would love to hear from you and assist you in any way we can.

Kunal Patel | Contact me
description

Kunal Patel

Working as Assistant Manager IT my curiosity led me to learn technologies beyond networking, including cloud computing, Python, APIs, Rust, Dart/Flutter, Linux, and Virtualization.
Mumbai, India