Basic Router Configuration
Basic Router Configuration

Basic Router Configuration

Basic Router Configuration
5

Summary

This topic configure basic settings on a router to route between two directly-connected networks, using CLI. Start learning CCNA 200-301 for free!!

Note: Welcome: This topic is part of Module 1 of the Cisco CCNA 2 course, for a better follow up of the course you can go to the CCNA 2 section to guide you through an order.

Configure Basic Router Settings

Up to now, this module has only covered switches. If you want devices to be able to send and receive data outside of your network, you will have to configure routers. This topic teaches you basic router configuration and provides two Syntax Checkers and a Packet Tracer activity so you can practice these skills.

Cisco routers and Cisco switches have many similarities. They support a similar modal operating system, similar command structures, and many of the same commands. In addition, both devices have similar initial configuration steps. For example, the following configuration tasks should always be performed. Name the device to distinguish it from other routers and configure passwords, as shown in the example.

Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
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)# line vty 0 4
R1(config-line)# password cisco
R1(config-line)# login
R1(config-line)# exit
R1(config)# service password-encryption
R1(config)#

Configure a banner to provide legal notification of unauthorized access, as shown in the example.

R1(config)# banner motd $ Authorized Access Only! $
R1(config)#

Save the changes on a router, as shown in the example.

R1# copy running-config startup-config
Destination filename [startup-config]? 
Building configuration...
[OK]

Syntax Checker – Configure Basic Router Settings

In this Syntax Activity, you will configure basic settings for R2.

Enter global configuration mode and name the router R2.

Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2

Configure class as the secret password.

R1(config)#enable secret class

Configure cisco as the console line password and require users to login. Then exit line configuration mode.

R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit

Configure cisco as the vty password for lines 0 through 4 and require users to login.

R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login

Exit line configuration mode and encrypt all plaintext passwords.

R1(config-line)#exit
R1(config)#service password-encryption

Enter the banner Authorized Access Only! and use # as the delimiting character.

R1(config)#banner motd #Authorized Access Only!#

Exit global configuration mode and save the configuration.

R1(config)#exit
R1#copy running-config startup-config
Destination filename \[startup-config\]? 
Building configuration... 
\[OK\]

You successfully configured R2 with initial settings.

Dual Stack Topology

One distinguishing feature between switches and routers is the type of interfaces supported by each. For example, Layer 2 switches support LANs; therefore, they have multiple FastEthernet or Gigabit Ethernet ports. The dual stack topology in the figure is used to demonstrate the configuration of router IPv4 and IPv6 interfaces.

Dual Stack Topology
Dual Stack Topology

Configure Router Interfaces

Routers support LANs and WANs and can interconnect different types of networks; therefore, they support many types of interfaces. For example, G2 ISRs have one or two integrated Gigabit Ethernet interfaces and High-Speed WAN Interface Card (HWIC) slots to accommodate other types of network interfaces, including serial, DSL, and cable interfaces.

To be available, an interface must be:

  • Configured with at least one IP address – Use the ip address ip-address subnet-mask and the ipv6 address ipv6-address/prefix interface configuration commands.
  • Activated – By default, LAN and WAN interfaces are not activated (shutdown). To enable an interface, it must be activated using the no shutdown command. (This is similar to powering on the interface.) The interface must also be connected to another device (a hub, a switch, or another router) for the physical layer to be active.
  • Description – Optionally, the interface could also be configured with a short description of up to 240 characters. It is good practice to configure a description on each interface. On production networks, the benefits of interface descriptions are quickly realized as they are helpful in troubleshooting and in identifying a third-party connection and contact information.

The following example shows the configuration for the interfaces on R1.

R1(config)# interface gigabitethernet 0/0/0
R1(config-if)# ip address 192.168.10.1 255.255.255.0 
R1(config-if)# ipv6 address 2001:db8:acad:1::1/64 
R1(config-if)# description Link to LAN 1
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface gigabitethernet 0/0/1
R1(config-if)# ip address 192.168.11.1 255.255.255.0 
R1(config-if)# ipv6 address 2001:db8:acad:2::1/64 
R1(config-if)# description Link to LAN 2
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)# interface serial 0/0/0
R1(config-if)# ip address 209.165.200.225 255.255.255.252 
R1(config-if)# ipv6 address 2001:db8:acad:3::225/64 
R1(config-if)# description Link to R2
R1(config-if)# no shutdown
R1(config-if)# exit
R1(config)#

Syntax Checker – Configure Router Interfaces

In this Syntax Checker activity, you will configure R2 with its IPv4 and IPv6 interfaces.

Configure GigabitEthernet 0/0/0.

  • Use g0/0/0 to enter interface configuration mode.
  • Configure the IPv4 address 10.1.1.1 and subnet mask 255.255.255.0.
  • Configure the IPv6 address 2001:db8:acad:4::1/64.
  • Describe the link as Link to LAN 3.
  • Activate the interface.
Router(config)#interface g0/0/0
Router(config-if)#ip address 10.1.1.1 255.255.255.0
Router(config-if)#ipv6 address 2001:db8:acad:4::1/64
Router(config-if)#Description Link to LAN 3
Router(config-if)#no shutdown
%LINK-3-UPDOWN: Interface GigabitEthernet0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/0, changed state to up

Configure GigabitEthernet 0/0/1.

  • Use g0/0/1 to enter interface configuration mode.
  • Configure the IPv4 address 10.1.2.1 and subnet mask 255.255.255.0.
  • Configure the IPv6 address 2001:db8:acad:5::1/64.
  • Describe the link as Link to LAN 4.
  • Activate the interface.
Router(config-if)#interface g0/0/1
Router(config-if)#ip address 10.1.2.1 255.255.255.0
Router(config-if)#ipv6 address 2001:db8:acad:5::1/64
Router(config-if)#description Link to LAN 4
Router(config-if)#no shutdown
%LINK-3-UPDOWN: Interface GigabitEthernet0/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0/1, changed state to up

Configure Serial 0/0/0.

  • Use s0/0/0 to enter interface configuration mode.
  • Configure the IPv4 address 209.165.200.226 and subnet mask 255.255.255.252.
  • Configure the IPv6 address 2001:db8:acad:3::226/64.
  • Describe the link as Link to R1.
  • Activate the interface.
Router(config-if)#interface s0/0/0
Router(config-if)#ip address 209.165.200.226 255.255.255.0
Router(config-if)#ipv6 address 2001:db8:acad:3::226/64
Router(config-if)#description Link to R1
Router(config-if)#no shutdown
%LINK-3-UPDOWN: Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

IPv4 Loopback Interfaces

Another common configuration of Cisco IOS routers is enabling a loopback interface.

The loopback interface is a logical interface that is internal to the router. It is not assigned to a physical port and can never be connected to any other device. It is considered a software interface that is automatically placed in an “up” state, as long as the router is functioning.

The loopback interface is useful in testing and managing a Cisco IOS device because it ensures that at least one interface will always be available. For example, it can be used for testing purposes, such as testing internal routing processes, by emulating networks behind the router.

Loopback interfaces are also commonly used in lab environments to create additional interfaces. For example, you can create multiple loopback interfaces on a router to simulate more networks for configuration practice and testing purposes. In this curriculum, we often use a loopback interface to simulate a link to the internet.

Enabling and assigning a loopback address is simple:

Router(config)# interface loopback number
Router(config-if)# ip address ip-address subnet-mask

Multiple loopback interfaces can be enabled on a router. The IPv4 address for each loopback interface must be unique and unused by any other interface, as shown in the example configuration of loopback interface 0 on R1.

R1(config)# interface loopback 0
R1(config-if)# ip address 10.0.0.1 255.255.255.0
R1(config-if)# exit
R1(config)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

Packet Tracer- Configure Router Interfaces

In this Packet Tracer activity, you will configure routers with IPv4 and IPv6 addressing.

Glossary: If you have doubts about any special term, you can consult this computer network dictionary.

Ready to go! Keep visiting our networking course blog, give Like to our fanpage; and you will find more tools and concepts that will make you a networking professional.