---
title: Basic Router Configuration
tags: Cisco IOS, networking, manual, reference, router, technical
---
<header>
<h6>Basic Router Configuration</h6>
> [toc]
</header>
---
# Initial Configuration Steps
**The following configuration tasks should always be performed:**
<ol class='step-list'>
<li>Name the device to distinguish it from other routers, and configure passwords.</li>
```pug
Router# configure terminal
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
```
<li>Enable password-encryption to encrypt plaintext passwords in the system config.</li>
```
R1(config)# service password-encryption
R1(config)#
```
<li>Configure a banner to provide legal notification of unauthorized access.</li>
```pug
R1(config)# banner motd $ Authorized Access Only! $
R1(config)#
```
<li>Save the changes on a router, as shown in the example.</li>
```pug
R1# copy running-config startup-config
```
</ol>
# Interface Configuration
```pug
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)#
```
:::info
A link-local address is automatically added to an interface whenever a global unicast address is assigned. An IPv6 network interface is required to have a link-local address, but *not* necessarily a global unicast address.
:::
# IPv4 Loopback Interfaces
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: the loopback interface is automatically placed in an “up” state, as long as the router is functioning.
Enabling and assigning a loopback address is simple:
```pug
R1(config)# interface loopback 0
R1(config-if)# ip address 10.0.0.1 255.255.255.0
R1(config-if)# exit
R1(config)#
```
---
---
{%hackmd 7PGmjAHeTXak2VUM3iw5Wg %}