Routers are a key piece of hardware in enterprise networks because they are responsible for connecting organisations to the internet. After unboxing your new Cisco router you will need to perform some basic Cisco router configuration before you can implement it into a production network. For example, the router needs to be told what interfaces (and which IP address on each of those interfaces) to use. Routers support a large number of IOS commands and it is hard to memorise all of them and some you will never use anyway. This article is a complete Guide on Cisco Router Configuration with Details. and commands you will need to configure your router from scratch.
What are the Three Modes in Cisco Router configuration?
Once you have a connection with your Cisco Router whether it be a physical connection or a Telnet or SSH connection, you can now start to configure it. There are 3 modes or command levels in the Cisco router. In each command mode, you have specific privileges and control.
Cisco User Exec Mode Cisco: In first command mode is hwere you can run a limited type of show commands, basic reachability tests. This command mode is represented by symbol “>”. To execute any commands you will need to enter privileged exec mode first.
Cisco Privileged Exec Mode: Privileged EXEC is the second command level mode with the symbol “#”. Use “enable” command in user mode for accessing the privileged mode. In this mode you can have access to all monitoring commands and some configuration commands of a router.
Cisco Global configuration mode: The Global configuration mode is for administrators and where all the fun begins. This is where you can configure your Cisco router and the running configuration. You can access global configuration mode from Privileged EXEC mode using the command “configure terminal”.
Basic Router Configuration
Configuring Router Interfaces
Interfaces are the door to other networks and are one of the things that makes the router a router, the device capable of connecting multiple segments, so their configuration is going to be critical. Most Cisco routers have at least one Ethernet interface of some type and can support a variety of other types of interfaces, including serial, cable TV and DSL interfaces. Many of these interfaces support multiple speeds. For example, a 10-Mbps Ethernet interface can be configured with the interface Ethernet number command, a 10/100 interface can be configured using the interface fastethernet number command, and a 10/100/1000 interface can be configured with the interface gigabitethernet number command. On routers, the interface numbers might be a single number, two numbers separated by a slash or three numbers separated by slashes. For example:
interface ethernet 0
interface fastEthernet 0/1
interface gigabitethernet 1/0
interface serial 1/1/1
Two commands are commonly used to display the interfaces and their statuses. The show ip interface brief command displays some basic information, including the interface static IP address and interface status. The show interfaces command lists the interfaces with a large amount of information per interface.
Configuring a Router as a DHCP Server
A Cisco router can be either a DHCP client or a DHCP server. If your router connects to your internet service provider (ISP), your ISP will issue the router an IP address to one of the interfaces; this interface needs to be set as a DHCP client. This can be done with the ip address dhcp command on the interface in question.
However, it is more likely that the router interface will be functioning as a DHCP server. To configure the router as a DHCP server, do the following:
- Enable the DHCP server. To enable the service, execute the service dhcp command
- Configure a DHCP address pool – create a dhcp pool by running the ip dhcp pool poolname command.
- Configure the pool options – create the addresses and the subnet mask for the pool; you must consider the IP address of the interface on which DHCP will operate. To configure the pool, use network address mask command.
At this point, DHCP will be functional and will start to lease IP addresses to clients. But these IP addresses will need default gateway and DNS server addresses (pool options). To configure them, use the following commands in dhcp configuration mode:
- default-router address — To configure the default gateway
- dns-server address — To configure the DNS server
Configuring Static Routes
Most networks use dynamic routing protocols to cause each router to learn the rest of the routes in a local network. But sometimes static routes are also needed. IOS allows you to assign static routes using the ip route global configuration command.
Static Routing command syntax: Ip route [destination network address] [mask] [next hop address or interface name]
Every ip route command defines a destination with a subnet ID and mask. The command also lists the forwarding instructions. To list the current static routes, use the show ip route static command.
RIP Cisco router Configuration:
The RIP (Routing Information Protocol) is one of the easiest protocols to configure on the Cisco Router. RIP is distance vector routing protocol and support maximum 15 hub counts. RIP is used for small scale networks. RIP also supports equal cast load balancing for dividing the load across the different interfaces. On Cisco Router you can enable the Routing Information Protocol by following commands:
With the network command you can define which connected network you want to advertise in RIP. For example if we have two network on R1 10.1.1.0 & 126.96.36.199, and want to advertise into RIP. In this case you can do so by using the above commands.
EIGRP configuration on Cisco Router:
Enhanced Interior Gateway Routing Protocol is designed by Cisco and it is a routing protocol which you can use only on Cisco Router. Configuration of EIGRP on Cisco Router is resembles With RIP. Commands are almost similar to RIP. Following few commands are required for basic configuration of Enhanced Interior Gateway Routing Protocol.
Router(config)# router eigrp <Number>
Router(config-router)# network <Subnet or Network-ID>
OSPF configuration on Cisco Router:
OSPF (Open Shortest Path First ) is the one of the famous and most used routing protocol. It is open standard protocol and you can used it on very vendor’s router. OSPF is link state routing protocol, by using its algorithm Open Shortest Path First can find it best path more accurately.
R3(config)#router ospf 1
R3(config-router)#network 1 7 188.8.131.52 0.0.0.255 area 0
R3(config-router)#network 10 .10.22.0 0 .0.0.255 area 0
Configuration of inter-vlan routing on Cisco
Vlans are used to create different virtual LAN under the same switch, which creates different broadcast domains. Host under the one VLAN cant communicates with other VLANs. You require a router if you want to interconnect VLANs with each other. This concept is known as “inter-vlan routing” or“router on a stick”. If you want to learn about the configurations of “inter-vlan routing” on cisco Router, click here.
Securing your Router
How to configure console Password on Cisco Router?
We discussed the three different router modes earlier in the article. It’s a good idea to secure your router to block unauthorised access between the different modes of access to the router through the different connection methods. . The most basic password that you can configure on cisco router is to set the console password. This password blocks unauthorized access through console cable on Cisco router. You can set the console password by using the following commands.
Router2# configure terminal
Router2(config)#line console 0
Above command will set the console password of router to “cisco”.
How to set enable password?
With the enable password you can secure privilege exec mode. You can set enable password in two ways. Both commands will set the enable password but the difference is first command will save the password in clear text which will be visible in show running-config, whereas the enable secret will save the password in encrypted form.
router(config)# enable password cisco
router(config)# enable secret cisco
How to set the Telnet password on Cisco Router?
Telnet password is used to secure your remote access to cisco router. By default there are five VTY line ot connections available but it may vary depending upon the version of Cisco router. You can set the telnet password by using these commands:
Router(config)#line vty 0 (This command will Set password to cisco on five vty lines)
How to save Cisco Router Configurations?
Once you have made the necessary changes to your router you will ned to commit these changes to take effect. You can save the configuration on Cisco router by using the following command in privilege mode:
Router#copy run start
or Simply use
Backup Cisco Router Configuration:
You can save the configuration of cisco router to local device using the TFTP server. Following cisco commands will do the task for you.
Router2#copy running-config tftp
Address or name of remote host ? 192.168.2.11
Destination filename [Router2-confg]? backup_of-my_router
1030 bytes copied in 3.58 secs (415 bytes/sec)