CH 3
CH 3
3 – Configuring a Router
CCNA 2
Version 3.1
Overview
Router#configure terminal
Router(config)#
3
Configuring a router name
Mistake…
Should be…
Router#config t
Router(config)#hostname Tokyo
Tokyo(config)#
4
Configuring router passwords
end
exit
6
Examining the show commands
• show interfaces – Displays all the statistics for all the interfaces on the
router. To view the statistics for a specific interface, enter the show
interfaces command followed by the specific interface and port number.
• show controllers serial – 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 – Displays information about flash memory and what IOS files are
stored there
• show version – Displays information about the router and the IOS that is
running in RAM
• show ARP – Displays the ARP table of the router
• show protocol – Displays the global and interface specific status of any
configured Layer 3 protocols
• show startup-configuration – Displays the saved configuration located in
NVRAM
• show running-configuration – Displays the configuration currently
running in RAM
7
Configuring a serial interface
• A serial interface will not show “up” and “up” unless both
ends are properly configured (mostly) and no shutdown
command is used.
• If one router’s configuration looks okay, check the other
router’s configuration.
9
Configuring a serial interface
Lab
Real world
10
Configuring a serial interface
RouterA RouterB
DTE cable DCE cable
RouterB(config)#inter serial 1
RouterB(config-if)#clock rate ?
Speed (bits per second)
1200
2400
4800
9600
19200
38400
56000
64000
<text omitted>
2000000
4000000
How can you tell which end is the DTE and which end is the DCE?
Look at the label on the cable.
Look at the connecter between the two cables - The DTE cable will
always be male and the DCE cable will always be female.
12
Configuring a serial interface
13
Executing adds, moves, and changes
14
Executing adds, moves, and changes
Router#show startup-config
%% Non-volatile configuration memory is not present
No startup-config
file in NVRAM
Router#show running-config
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime Default running-config
service timestamps log uptime file, created in RAM
no service password-encryption
!
hostname Router
!
ip subnet-zero
!
!
interface Ethernet0
no ip address
no ip directed-broadcast
shutdown
!
interface Serial0
no ip address
no ip directed-broadcast
shutdown
15
Executing adds, moves, and changes
Router#show running-config
Building configuration...
Current configuration:
!
version 12.0
service timestamps debug uptime The running-config
service timestamps log uptime
no service password-encryption
!
hostname Router
!
ip subnet-zero
!
interface Ethernet0
no ip address
no ip directed-broadcast
shutdown
• The configuration file contains global, process, and interface information that directly affects the
operation of the router and its interface ports.
• All changes to the router are made to the running-config file and take affect immediately on the
router (with just a couple of exceptions).
– IP address
– Routing Protocols
– Router’s Name
– etc.
16
copy running-config startup-config
During bootup
running-config
RAM
startup-config
Router# copy running-config startup-config
Router#show startup-config
! The startup-config file now
version 12.0 identical to running-config
service timestamps debug uptime and the router will also have
service timestamps log uptime these changes if the router
no service password-encryption
reboots.
!
hostname Router
!
!
ip subnet-zero
!
interface Ethernet0
no ip address
no ip directed-broadcast
shutdown
!
18
copy running-config startup-config
WARNING
• This is also incorrect, and will overwrite the startup-config with a blank file.
19
Displaying the config files
show running-config
show startup-config
20
Executing adds, moves, and changes
21
Configuring Interfaces
Router(config-if)#exit
Router(config)#interface serial 0
Router(config-if)#ip add 172.16.10.1 255.255.255.0
Router(config-if)#clock rate 64000 (only if DCE)
Router(config-if)#no shutdown
22
Interface descriptions
RouterB#show inter e 0
Serial0 is up, line protocol is up
Hardware is HD64570
Description: Engineering LAN, Bldg. 18
Internet address is 10.1.1.1/24
23
Interface descriptions
Gateway(config)#inter e 0
Gateway(config-if)#description LAN interface for Marketing
Gateway(config-if)#end
Gateway#
Gateway#show run
Building configuration...
<text omitted>
!
interface Ethernet0
description LAN interface for Marketing
no ip address
no ip directed-broadcast
shutdown
<text omitted>
25
Login banners and Configuring message-
of-the-day (MOTD)
Wording is not
the same, but
you get the idea.
26
Login banners and Configuring message-
of-the-day (MOTD)
Router(config)#hostname Gateway Prompt changes
Gateway(config)#
Gateway(config)#banner motd # MOTD (Message Of The Day)
Enter TEXT message. End with the character '#'.
Warning!
Stay away! #
Gateway(config)#end
Gateway#exit
Press RETURN to get started.
Warning!
Stay away!
Password:
Gateway#show run
Building configuration...
<text omitted>
!
hostname Gateway
!
<text omitted>
!
banner motd ^C
Delimiter always shows as “^C”
Warning!
Stay away! ^C
27
Host name resolution
• This does not make the router a DNS (Domain Name Server).
• This command does not turn your router into a DNS server.
• This command does not effect packets entering your router to be
routed.
• This only affects the IOS commands entered at the router prompt.
• Multiple ip addresses can be entered in case one interface is down.
• It is usually a good idea to use the same list of names on all your
router configs.
29
Configuring host tables
30
Router(config)# ip domain-lookup
Router#wreh
Translating "wreh"...domain server (255.255.255.255) (Takes a few seconds)
Translating "wreh"...domain server (255.255.255.255) (Takes a few seconds)
Router(config)# no ip domain-lookup
Router#wreh
Translating "wreh"
% Unknown command or computer name, or unable to find computer address
• If you are not using the services of a DNS server, it is best to disable this process.
• DNS (Domain Name Service) is enabled by default with a server address of
255.255.255.255, which is a local broadcast.
• If enabled, with no DNS server on the network, may cause a slight, but irritable
delay when making typing mistakes.
31
Configuration backup and documentation
33
Copying, editing, and pasting configurations
• The TFTP host can be any system that has TFTP software loaded and
operating and able to receive files from the TCP/IP network.
34