The Wayback Machine - https://web.archive.org/web/20241008140955/https://www.geeksforgeeks.org/cisco-router-basic-commands/
Open In App

Cisco Router basic commands

Last Updated : 09 Nov, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

A router is a layer 3 device used to forward packets from one network to another. It forwards the packet through one of its ports on the basis of destination IP address and the entry in the routing table. By using a routing table, it finds an optimized path between the source and destination network. 

Here, we will talk about Cisco router’s basic commands like assigning an IP address to an interface, bringing up an interface, applying to enable and secret passwords. 

Administrative Configuration: 

Giving hostname to the router – 
It is used to set a name to a device stating an identity to a device. This is important as these hostnames are used in WAN for authentication purposes.

 We can set the hostname as: 

router(config)#hostname GeeksforGeeksrouter
GeeksforGeeksrouter(config)#

Applying banners – These are specifically used to give a small security notice to the user who wants to access the router. We can customize it According to our needs as like asking for credentials needed for the login. 

Types of banners are: 

1. banner motd – 

GeeksforGeeksrouter(config)#banner motd #
Enter Text message. End with character '#'
$ No unauthorized access allowed. Enter your credentials!! #

Here motd means a message of the day and # means delimiter i.e message should end with the symbol provided. This message will be shown while entering into the router’s user execution mode 

2. Exec banner – It will be displayed on the screen when the user will log in through the VTY lines.

3. Login banner – This banner will be displayed after the banner motd but before the login. 

These banners are used to make login interactive. 

Setting password – 
There are five passwords used to secure a Cisco device: 

1. enable password – The enable password is used for securing privilege mode. This password will be shown in clear text by the command “show running-configuration”. These are replaced by secret passwords nowadays. 

router(config)#enable password GeeksforGeeks 

2. Enable secret password – This is also used for securing privilege mode but the d the difference is that it will be displayed as a cipher in “show running-configuration”. This password will override the enable password if both passwords are set. 

router(config)#enable secret GeeksforGeeks 

3. line console password – When a user will take access through the console port then this password will be asked. 

router(config)#line console 0
router(config-line)#password GeeksforGeeks 
router(config-line)#login

4. line VTY password – When a user wants to access a router through VTY lines (telnet or ssh) then this password will be asked. 
The following configuration is shown for the telnet password. 

router(config)#line VTY 0 4
router(config-line)#password GeeksforGeeks 
router(config-line)#exit

5. auxiliary password – This password will secure the aux port. 

router(config)#line aux 0
router(config-line)#password GeeksforGeeks 
router(config-line)#login

Assigning IP address to a router’s interface – 
As we know the router is a layer 3 device therefore every port of a router should have an IP address to work. By default, a router’s port has no IP address and its line protocol is also down. 

router(config)#interface fa0/0
router(config-if)#ip address 192.168.1.1 255.255.255.0
router(config-if)#no shut

Here first we have to specify the router’s interface on which we want to give an IP address. Then we will enter interface mode where we will give an IP address as shown followed by its subnet mask (255.255.255.0). Then, we have made the router port administratively up by no shut command. 

Copying and erasing configuration – 
We can manually copy the running configuration (configuration in RAM) to startup configuration (configuration in NVRAM). Therefore, when the next time router will boot up, it will load the configuration that we have copied (as by default the configuration of NVRAM is loaded). 

router#copy running-config startup-config

To erase the configuration of NVRAM, use the command 

router#erase startup-config

 


Previous Article
Next Article

Similar Reads

Cisco Switch Configuration basic commands
Prerequisite - Switch Functions A switch is a layer 2 device used to forward packet from one device to another within the network. It forwards the packet through one of its ports on the basis of destination MAC address and the entry in the MAC table. Following basic commands are used to configure a new switch : 1. Changing the hostname of a switch
2 min read
Hot Standby Router Protocol (HSRP) and Virtual Router Redundancy Protocol (VRRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol used to provide redundancy in a network. Only one router is the active router while others will be in standby state i.e the standby router will be responsible for forwarding the traffic when the active router fails. Virtual Router Redundancy Protocol (VRRP) is an open standard proto
3 min read
Backing up Cisco IOS Router image
As a network administrator, you should always have a backup for worse conditions. One of the common worse conditions that can occur is the IOS image of a device being deleted. This condition gets worse if there is no backup of the IOS image present. So to ignore conditions like these, a backup should be a must and here we will take a Cisco IOS imag
4 min read
Cisco Router modes
A router is a layer 3 device used to forward packets from one network to another. It forwards the packet through one of its ports on the basis of destination IP address and the entry in the routing table. By using a routing table, it finds an optimized path between the source and destination network. Let's discuss the Cisco router's different modes
4 min read
How to Configure DHCP Server on a Cisco Router?
In this article, we will discuss the overview of DHCP and will focus to implement How to Configure DHCP Server on a Cisco Router step by step. Let's discuss it one by one. Overview :DHCP (Dynamic Host Configuration Protocol) configuration is performed on routers to assign an IP address, subnet mask, gateway address ad DNS server address to the host
3 min read
What are the different memories used in a CISCO router?
Before we discuss the memories that are used in a Cisco router, let's understand what basically a Router is. When we want to connect two or more IP networks or subnetworks together, then a piece of hardware is needed and that hardware is called a Router. It generally serves two purposes: Enabling the usage of a single Internet connection by several
4 min read
What are Different Types of Passwords used in Securing Cisco Router?
Passwords are an essential part of the cisco router access control methods. These are used to restrict access to a CISCO router; As there is no automatic or default password defense that comes with the routers, different types of passwords are used, such as the Console password used for setting up the console port password, Aux Passwords for settin
4 min read
Difference between User Mode and Privileged Mode in Cisco Router
A router is a layer 3 device used to forward packets from one network to another. It forwards the packet through one of its ports on the basis of destination IP address and the entry in the routing table. By using a routing table, it finds an optimized path between the source and destination network. In this article we will see difference between U
3 min read
Cisco Router Errors Codes
A Router is a networking device that forwards data packets between computer networks. If the system does not respond to requests sent from the console or from the network (Telnet, Simple Network Management Protocol (SNMP), etc.), the router will appear to stop working. These issues can be divided into two broad categories: If the console is not res
6 min read
How To Delete Configuration of a Cisco Router and Switches?
In a Cisco network, it is important to periodically delete the configuration of routers and switches to ensure that the network is running smoothly and efficiently. In this article, we will explain how to delete the configuration of a Cisco router and switch using the command-line interface (CLI). Before you begin, make sure you have the following:
3 min read
How to Add Port in Router in CISCO Packet Tracer?
Cisco Packet Tracer is a tool built by Cisco and it provides network simulation to practice simple and complex networks. The main purpose of the Cisco Packet Tracer is to help students learn the principles of networking and demonstrate the networking concepts. Router is a networking device that works in the network layer and can connect two differe
2 min read
Configuring OSPF Router-ID in Cisco
OSPF is a Link State Routing Protocol. In this method of Routing the Router shares its neighbor knowledge with everyone in the router. In OSPF one router is elected as Designated Router and one router is elected as Backup Designated Router(BDR). They are elected so that we can control how much repetitive information is forwarded over the network. E
2 min read
Implementation of Static Routing in Cisco - 2 Router Connections
Pre-Requisite Types of Routing Static routing is a routing protocol that helps to keep your network organized and to optimize routing performance. It enables the router to assign a specific path to each network segment and to keep track of network changes. This helps to improve network stability and continuity. This adds security because a single a
3 min read
Cisco Interview Experience of Cisco Ideathon for Advanced Networking 2023
Cisco Ideathon for Advanced Networking 2023: Unlocking the Pattern of Exam basically Round 1 Introduction: Cisco Ideathon serves as a gateway for final-year students to enter the esteemed Cisco company. The Ideathon is conducted to identify talented individuals with a passion for advanced networking. The initial round, known as Round 1, comprises m
3 min read
Cisco Interview Experience G4 (Code with Cisco) 2023
Status: New grad, B. Tech. CSE, Tier 3 Prior Experience: 0 years Online Assessment [28 June 2023] (1 hr):This was a team event, and each team contained 3 participants. Coding Questions:The first problem was similar to https://codeforces.com/problemset/problem/1132/F.The second problem was similar to https://cses.fi/problemset/task/1097.The third pr
3 min read
Basic Firewall Configuration in Cisco Packet Tracer
Prerequisite: Firewall A firewall is a hardware or software network security device that monitors all incoming and outgoing traffic based on a defined set of security rules, it accepts, rejects, or drops that specific traffic. Accept: Allow traffic.Reject: Block traffic but respond with "reachable error".Drop: Block unanswered traffic firewall esta
2 min read
Configuring Basic Password Authentication in Cisco
The Access Control Passwords are generally used to restrict access to a certain network server along with its services for a specified group of users (hosts). The Authentication, Authorization, and Accounting (AAA) network services provide the framework or platform through which one can set up Access Control over their router or network server alon
3 min read
SMTP Commands
Simple Mail Transfer Protocol (SMTP) is an ASCII protocol. It is based on client-server model. It uses TCP port number 25 for this service. Therefore e-mail; is delivered from source to destination by having the source machine established a TCP to port 25 of the destination machine. To send mail, a system must contain client MTA and to receive a ma
2 min read
Commands required to configure PPP
Nowadays, several commands are available on the router to simply configure, manage, and handle Point-to-Point Protocol (PPP) on the router. Configuration simply means process of setting network’s control, flow, and operation to usually support communication over network of an organization or between routers. PPP can be required on synchronous links
4 min read
Networking Commands For Troubleshooting Windows
In networking there are various commands that can be used to check the connectivity of the networking devices and it is also required at time of troubleshooting of devices. We will be discussing few of the networking commands such as color help, ipconfig ,ipconfig/all ,nslookup ,tracert commands.  CommandsFirst press windows+R button.In the search
4 min read
How ping commands work?
Answer: Ping is a network utility Command which helps to measure the round-trip time for messages sent to that host, and tests whether another computer or device on a network can be reached. In its operations, it makes use of Internet Control Message Protocol (ICMP) to send “echo request” packets aiming at hosts likewise listening for “echo reply”
2 min read
CMD Commands to Gather Information of a System
Command Prompt in Windows offers a range of commands to gather detailed information about your system's hardware, software, and overall health. These CMD commands provide quick access to system details, making it easier to diagnose issues, check specifications, and retrieve essential information. In this guide, we will explore a variety of CMD comm
7 min read
Hot Standby Router Protocol (HSRP)
Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol, which provides redundancy for a local subnet. In HSRP, two or more routers gives an illusion of a virtual router. HSRP allows you to configure two or more routers as standby routers and only a single router as an active router at a time. All the routers in a single HSRP group share
4 min read
Configuration of Router on a stick
Prerequisite - Access and trunk ports Switches divide broadcast domain through VLAN (Virtual LAN). VLAN is a partitioned broadcast domain from a single broadcast domain. Switch doesn't forward packets across different VLANs by itself. If we want to make these virtual LANs communicate with each other, a concept of Inter VLAN Routing is used. Inter V
3 min read
Introduction of Virtual Router Redundancy Protocol (VRRP) and its configuration
VRRP is an open standard protocol, which is used to provide redundancy in a network. It is a network layer protocol (protocol number-112). The number of routers (group members) in a group acts as a virtual logical router which will be the default gateway of all the local hosts. If one router goes down, one of the other group members can take place
4 min read
Open shortest path first (OSPF) router roles and configuration
Prerequisite - Open shortest path first (OSPF) Open shortest path first (OSPF) is a link-state routing protocol which is used to find the best path between the source and the destination router using its own SPF algorithm. Open shortest path first (OSPF) router roles - An area is a group of contiguous networks and routers. Routers belonging to same
3 min read
Difference between Bridge and Router
Prerequisite - Network Devices Bridge is a network device, which works in data link layer. Through bridge, data or information is not stored and sent in the form of packets. Whereas Router is also a network device which works in network layer. Through router, data or information is stored and sent in the form of packets. The main difference between
2 min read
How to connect one router to another to expand the network?
Prerequisite - Router Step-1 : Set up Primary Router Figure - Set Up Primary Router To set up your primary router, connect the Ethernet cable provided by your internet service provider which carries internet to the WAN port of a router. On many routers, the "WAN" port is also labelled as "Internet". Once your primary router is installed and interne
3 min read
Port Forwarding on Router and Why do we need It
Router port forwarding is used to allow the remote computers to connect to a specific service or computer on a Local Area Network. Now the question is why do we need it. And we will discuss all of these things one by one. Use Cases : Suppose you are at the office and want to connect to your computer which is present in your house, the computer pres
4 min read
Steps to Configure Initial Router Settings
Pre-requisite: Cisco Router basic commands. Routing is the method of selecting a network packet path over the Internet or between or through multiple networks. Routing is conducted on many kinds of networks, including circuit-switched networks, such as public switched telephone networks (PSTN), and computer networks, such as the Internet. In this a
2 min read
Article Tags :
Practice Tags :