You are on page 1of 10

Configuring a Router

NESCOT CATC 1
CLI Command Modes
User EXEC

Privileged EXEC

Global Configuration

Specific Modes

NESCOT CATC 2
Configuring a Router
Routers should be given a unique names as one of the first
configuration tasks:
Router(config)# hostname Tokyo
Tokyo(config)# _

Passwords should be configured for vty lines, the console and to


control access to privileged EXEC mode:
Router(config)# enable secret class
Router(config)# line con 0
Router(config-line)# password cisco
Router(config-line)# login

To avoid passwords being shown in clear text in the output from


the show running-config or show startup-config commands:
Router(config)# service password-encryption
NESCOT CATC 3
Show commands
Command Displays
show interfaces Displays all the statistics for all the interfaces on the router
show int s0/1 Statistics for a specific interface (serial 0/1)
show controllers s0/1 Displays information-specific to the interface hardware
show clock Shows the time set in the router
show hosts Displays a cached list of host names and addresses
show users Displays all users who are connected to the router
show history Displays a history of commands that have been entered
show flash Information about flash memory and IOS files stored there
show version Information about the router and the IOS running in RAM
show arp Displays the ARP table of the router
show protocol Global and interface specific status of Layer 3 protocols
show startup-config The saved configuration located in NVRAM
show running-config Displays configuration currently running in RAM
NESCOT CATC 4
Configuring Serial Interfaces
1. Enter interface mode:
Router(config)# interface serial 0/1
2. Specify the interface address and subnet mask:
Router(config-if)# ip address 192.168.1.1 255.255.255.0
3. Set clock rate if a DCE cable is connected (skip this step if a
DTE cable is connected):
Router(config-if)# clock rate 56000
Serial interfaces require a clock signal to control the timing of the
communications. DCE devices provide the clock. By default, Cisco routers
are DTE devices but they can be configured as DCE devices.
4. Turn on the interface
Router(config-if)# no shutdown
Router(config-if)# exit
Router(config)# _
NESCOT CATC 5
Changing and Saving the Configuration
Make changes in configuration
mode

Examine results:
Router# show running-config

No
Intended Remove changes
results?
Yes Router(config)# no…

Router# copy running start


Save changes to backup:
Router# copy run start Router# copy tftp running-config
Router# copy running-config tftp
Router# erase startup-config
Examine backup file: Router# reload
Router# show startup-config NESCOT CATC 6
Interface Descriptions
Interface descriptions can be used to identify information such as:
 distant router

 a circuit number

 specific network segment

Router(config)# interface ethernet 0


Router(config-if)# description Room C379 LAN

Banner MOTD
Message-of-the-Day banner can be displayed on all connected
terminals:
Router(config)# banner motd %
Enter TEXT message. END with a character ‘%’.
ACME Computer Network – Restricted Access %
Router(config)#_
A login banner should be a warning not to attempt login unless
authorized. NESCOT CATC 7
Host Name Configuration
Host name resolution associates a host name with an IP address. These
address mappings are stored in a host table.
Host names, unlike DNS names, are significant only on the router on which
they are configured. A host table allows you to type either the host name or
the IP address to Telnet or Ping to a remote host.
London(config)# ip host London 200.200.200.200
London(config)# ip host NewYork 10.0.0.1
London(config)# ip host Paris 192.168.1.1
London(config)# ip host Munich 172.16.0.1
London(config)# end
London# show hosts
Default domain is not set
Name/address lookup uses domain services
Name servers are

Host Flags Age Type Address(es)


London (perm, OK) ** IP 200.200.200.200
NewYork (perm, OK) ** IP 10.0.0.1
Paris (perm, OK) ** IP 192.168.1.1
Munich (perm, OK) ** IP
NESCOT CATC 172.16.0.1 8
Configuration Backup and Documentation
The configuration of network devices determines how the the
network will behave. Management of device configuration
includes the following tasks:
 Listing and comparing configuration files on running devices
 Storage of configuration files on network servers
 Performing software installations and upgrades
Configuration files should be stored as backup files in the event
of a problem. Documentation should be included with this
offline information.

Configuration files can be stored on a


network server, on a TFTP server, or
on a disk stored in a safe place.

NESCOT CATC 9
Copying, Editing, and Pasting Configurations
To store the current configuration on a network TFTP server
enter the following command:
My# copy running-config tftp
Remote host []? 131.108.2.155
Name of configuration file to write[my-config]? My2
Write file My2 to 131.108.2.155 ? [confirm] y

Writing My2 !!!!!!!!!!!!!!!!!!!! [OK]


A configuration file stored on one of the network servers can
be used to configure a router:
Router# copy tftp running-config
Host or network configuration file [host]?
IP address of remote host[255.255.255.255]? 10.0.0.13
Name of configuration file [Router-config] ? My2
Configure using My2 from 10.0.0.13? [confirm] y

Booting My2 from 10.0.0.13: !!!!!! [OK-180/16000 bytes]


NESCOT CATC 10

You might also like