Professional Documents
Culture Documents
3 – Configuring a Router
Router#configure terminal
Router(config)#
Rick Graziani graziani@cabrillo.edu 3
Configuring a router name
Mistake…
Should be…
Router#config t
Router(config)#hostname Tokyo
Tokyo(config)#
WARNING
• service password-encryption uses a Cisco Level 7
encryption which is very easy to decrypt.
• For the GetPass! software www.boson.com
• However, the enable secret <password> uses a stronger
encryption method and cannot be easily hacked.
• More later!
end
exit
• A serial interface will not show “up” and “up” unless both
ends are properly configured (mostly) and a the no
shutdown command is used.
• If one router’s configuration looks okay, check the other
router’s configuration.
Real world
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.
Rick Graziani graziani@cabrillo.edu 19
Configuring a serial interface
RouterA RouterB
DTE cable DCE cable
RouterA#show controllers serial 0
HD unit 0, idb = 0xECA4C, driver structure at 0xF1EC8
buffer size 1524 HD unit 0, V.35 DTE cable
cpb = 0x62, eda = 0x403C, cda = 0x4050
RX ring with 16 entries at 0x624000
00 bd_ptr=0x4000 pak=0x0F5704 ds=0x62FFB8 status=80 pak_size=22
This is one of few commands where there must be a space between the interface type and the port.
How can you tell which end is the DTE and which end is the DCE?
Use the show controllers command!
It will also tell you the type of cable, in our labs we will be using a V.35
cable.
Rick Graziani graziani@cabrillo.edu 20
Configuring a serial interface
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
Rick Graziani graziani@cabrillo.edu 23
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.
Rick Graziani graziani@cabrillo.edu 24
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
!
WARNING
• Using an incorrect configuration file name could overwrite the router’s IOS in flash, as the router believes
you are trying to copy a blank file into flash.
WARNING
• This is also incorrect, and will overwrite the startup-config with a blank file.
show running-config
show startup-config
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
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
Wording is not
the same, but
you get the idea.
Warning!
Stay away!
Password:
Gateway#show run
Building configuration...
<text omitted>
!
hostname Gateway
!
<text omitted>
!
banner motd ^C
Warning! Delimiter always shows as “^C”
Stay away! ^C
• 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.
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.
Rick Graziani graziani@cabrillo.edu 42
Configuration backup and documentation
• The TFTP host can be any system that has TFTP software loaded and
operating and able to receive files from the TCP/IP network.