Try   HackMD
Basic Router Configuration

Initial Configuration Steps

The following configuration tasks should always be performed:

  1. Name the device to distinguish it from other routers, and configure passwords.
  2. 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
    
  3. Enable password-encryption to encrypt plaintext passwords in the system config.
  4. R1(config)# service password-encryption
    R1(config)#
    
  5. Configure a banner to provide legal notification of unauthorized access.
  6. R1(config)# banner motd $ Authorized Access Only! $
    R1(config)#
    
  7. Save the changes on a router, as shown in the example.
  8. R1# copy running-config startup-config
    

Interface Configuration

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)#

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:

R1(config)# interface loopback 0
R1(config-if)# ip address 10.0.0.1 255.255.255.0
R1(config-if)# exit
R1(config)#