Configuration Methods and Modes

advertisement
Chapter 7
Configuring
the Router
People To
Information
Connecting Connecting
People
To
Information
Loading
Configuration
Files
Router Configuration Overview
Connecting People To Information
•Load configuration
parameters into RAM
•Personalize router
identification
•Assign access
passwords
•Configure interfaces
•Save configuration
parameters to NVRAM
Loading Configuration Files
(Release 10.3+)
Connecting People To Information
Console or Terminal
configure terminal
copy startup-config running-config
NVRAM
RAM
copy tftp
startup-config
copy tftp running-config
TFTP Server
Loading from a TFTP Server
TFTP Server
Connecting People To Information
RAM
Router#copy tftp running-config
Host or network configuration file [host]?
IP address of remote host [255.255.255.255]? 131.108.2.155
Name of configuration file [Router-confg]? P1R1.2
Configure using P1R1.2 from 131.108.2.155? [confirm] y
Booting P1R1.2 from 131.108.2.155:!! [OK - 874/16000 bytes]
P1R1#
Router Modes
Overview of Router Modes
User EXEC mode
Router>
Privileged EXEC mode
Router#
Connecting People To Information
Global configuration mode
Ctrl-Z (end)
Router(config)#
Exit
Other
configuration
modes
Configuration
Mode
Prompt
Interface
Router(config-if)#
Subinterface
Router(config-subif)#
Controller
Router(config-controller)#
Line
Router(config-line)#
Router
Router(config-router)#
IPX-router
Router(config-ipx-router)#
Route-map Router(config-route-map)#
Configuring Router Identification
Router Name
Connecting People To Information
Router(config)#hostname P1R1
P1R1#
Message of the Day Banner
P1R1(config)#banner motd #
Accounting Department
You have entered a secured
system. Authorized access
only!
#
Interface Description
P1R1(config)#interface ethernet 0
P1R1(config-if)#description Engineering LAN, Bldg. 18
•Sets local identity or message for the accessed router or interface
Password Configuration
Console Password
Connecting People To Information
Router(config)#line console 0
Router(config-line)#login
Router(config-line)#password cisco
Virtual Terminal Password
Router(config)#line vty 0 4
Router(config-line)#login
Router(config-line)#password sanjose
Enable Password
Router(config)#enable password cisco
Secret Password
Router(config)#enable secret sanfran
Configuring an Interface
Connecting People To Information
Router(config)#interface type number
Router(config-if)#
• type includes serial, ethernet, token ring, fddi, hssi, loopback, dialer,
null, async, atm, bri, and tunnel
• number is used to identify individual interfaces
Configuring an Interface
Connecting People To Information
Router(config)#interface type number
Router(config-if)#
• type includes serial, ethernet, token ring, fddi, hssi, loopback, dialer,
null, async, atm, bri, and tunnel
• number is used to identify individual interfaces
Router(config)#interface type slot/port
Router(config-if)#
• For the Cisco 7000 and 7200 series routers
Configuring an Interface
Connecting People To Information
Router(config)#interface type number
Router(config-if)#
• type includes serial, ethernet, token ring, fddi, hssi, loopback, dialer,
null, async, atm, bri, and tunnel
• number is used to identify individual interfaces
Router(config)#interface type slot/port
Router(config-if)#
• For the Cisco 7000 and 7200 series routers
Router(config-if)#exit
Quit from current interface configuration mode
Connecting People To Information
show interfaces Command
Router#show interfaces
Ethernet0 is up, line protocol is up
Hardware is Lance, address is 0060.4740.c2b6 (bia 0060.4740.c2b6)
MTU 1500 bytes, BW 10000 Kbit, DLY 1000 usec, rely 255/255, load 1/255
Encapsulation ARPA, loopback not set, keepalive set (10 sec)
ARP type: ARPA, ARP Timeout 04:00:00
.
.
.
Serial1 is up, line protocol is down
Hardware is MK5025
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 9/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
.
.
.
Interpreting Interface Status
Router#show interface serial 1
Connecting People To Information
Serial1 is up, line protocol is up
Hardware is cxBus Serial
Description: 56Kb Line San Jose - MP
:: :: :: :: :: :: :: :: :: ::
Carrier Detect
Operational..................
Connection Problem...
Interface Problem........
Disabled ......................
Keepalives
Serial1 is up, line protocol is up
Serial1 is up, line protocol is down
Serial1 is down, line protocol is down
Serial1 is administratively down, line protocol is down
Configuring a Serial Line
Connecting People To Information
•Enter global configuration
mode
• Specify interface
• Set DCE clock rate (optional)
• Set bandwidth (optional)
Router#configure term
Router(config)#
Router(config)#interface serial 1
Router(config-if)#
Router(config-if)#clock rate 56000
Router(config-if)#
Router(config-if)#bandwidth 56
Router(config-if)#exit
Router(config)#exit
Router#
Connecting People To Information
Determining DCE/DTE Status
Router#show controllers serial 1
HD unit 1, idb = 0xBFD3C, driver structure at 0xC39A0
buffer size 1524 HD unit 1, V.35 DCE cable, clockrate 56000
cpb = 0x83, eda = 0x800, cda = 0x814
RX ring with 16 entries at 0x830800
00 bd_ptr=0x0800 pak=0x0C54F0 ds=0x836938 status=80 pak_size=22
01 bd_ptr=0x0814 pak=0x0C5158 ds=0x835BC8 status=80 pak_size=22
02 bd_ptr=0x0828 pak=0x0C4F8C ds=0x835510 status=80 pak_size=269
03 bd_ptr=0x083C pak=0x0C4DC0 ds=0x834E58 status=80 pak_size=22
04 bd_ptr=0x0850 pak=0x0C6184 ds=0x839840 status=80 pak_size=22
05 bd_ptr=0x0864 pak=0x0C4BF4 ds=0x8347A0 status=80 pak_size=22
.
.
.
Connecting People To Information
Verifying Your Changes
Router#show interfaces serial 1
Serial1 is up, line protocol is up
Hardware is MK5025
MTU 1500 bytes, BW 56 Kbit, DLY 20000 usec, rely 255/255, load 9/255
Encapsulation HDLC, loopback not set, keepalive set (10 sec)
Last input 0:00:00, output 0:00:01, output hang never
Last clearing of "show interface" counters never
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
Five minute input rate 1000 bits/sec, 0 packets/sec
Five minute output rate 2000 bits/sec, 0 packets/sec
331885 packets input, 62400237 bytes, 0 no buffer
Received 230457 broadcasts, 0 runts, 0 giants
3 input errors, 3 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
403591 packets output, 66717279 bytes, 0 underruns
0 output errors, 0 collisions, 8 interface resets, 0 restarts
45 carrier transitions
Connecting People To Information
Other Interface Configuration
Examples
•Specify the ring speed for
Token Ring
Router(config)#interface tokenring 2/0
Router(config-if)#early-token release
Router(config-if)#ring-speed 16
Connecting People To Information
Other Interface Configuration
Examples
•Specify the ring speed for
Token Ring
• Select the media-type
connector for the Ethernet
interface
Router(config)#interface tokenring 2/0
Router(config-if)#early-token release
Router(config-if)#ring-speed 16
Router(config)#interface ethernet 2
Router(config-if)#media-type 10baseT
Shutting Down an Interface
Router#configure term
Router(config)#interface serial 1
Router(config-if)#shutdown
Connecting People To Information
%LINEPROTO-5-UPDOWN: Line Protocol on Interface Serial1, changed state to down
%LINK-5-CHANGED: Interface Serial, changed state to administratively down
•
Use this command to administratively turn off an interface without
altering its other configuration entries
Shutting Down an Interface
Router#configure term
Router(config)#interface serial 1
Router(config-if)#shutdown
Connecting People To Information
%LINEPROTO-5-UPDOWN: Line Protocol on Interface Serial1, changed state to down
%LINK-5-CHANGED: Interface Serial, changed state to administratively down
•
Use this command to administratively turn off an interface without
altering its other configuration entries
Router#configure term
Router(config)#interface serial 1
Router(config-if)#no shutdown
%LINK-3-UPTOWN: Interface Serial, changed state to up
%LINEPROTO-5-UPDOWN: Line Protocol on Interface Serial1, changed state to up
•
Use this command to administratively turn on an interface that
has been shut down
Verifying the Changes
(Release 10.3+)
Make changes in
configuration modes
Connecting People To Information
Examine results
Router#show running-config
Remove changes
Intended
results?
No
Yes
Save changes to backup
Router#copy running-config startup-config
Router#copy running-config tftp
Noninvasive changes:
Router(config)#no....
Router#copy start run
Router#copy TFTP run
Invasive changes:
Router#reload
Router#copy TFTP start
Router#reload
Last resort changes:
Examine backup file
Router#show startup-config
Router#erase start
Router#reload
Connecting People To Information
Saving Configuration Changes
(Release 10.3+)
Router#copy running-config startup-config
Router#
Router#copy running-config tftp
Remote host [172.16.2.155]?
NVRAM
RAM
TFTP or
rcp server
RAM
Managing the
Configuration
Environment
Locating the Cisco IOS Software
Connecting People To Information
Configuration Registers
Registers in NVRAM for modifying fundamental Cisco IOS software
Identifies where to boot Cisco IOS image (for example, use config-mode commands)
Router#configure terminal
Router(config)#boot system
Router(config)#boot system
Router(config)#boot system
[Ctrl-Z]
Router#copy running-config
flash IOS_filename
tftp IOS_filename tftp_address
rom
startup-config
Boot system commands not found In NVRAM
Get default Cisco IOS software from Flash
Flash memory empty
Get default Cisco IOS software from TFTP server
ROM monitor
Determining the Current
Configuration Register Value
Connecting People To Information
Router#show version
IOS (tm) 2500 Software (C2500-JS-L), Version 11.2 (6), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1997 by cisco Systems, Inc.
Compiled Tue 06-May-97 16:17 by kuong
Image text-base: 0x0303ED8C, data-base: 0x00001000
ROM: System Bootstrap, Version 5.2(8a), RELEASE SOFTWARE
ROM: 3000 Bootstrap Software (IGS-RXBOOT), version 10.2 (8a),
RELEASE SOFTWARE (fc1)
Router uptime is 21 hours, 13 minutes
System restarted by reload
System image file is "flash:c2500-js-l.112-6.bin", booted via flash
.
.
.
Configuration register is 0x2102
Configuration Register Values
Router#configure terminal
Router(config)#config-register 0x2102
[Ctrl-Z]
Router#reload
Connecting People To Information
• Configuration Register bits 3, 2, 1, and 0 set boot option
Configuration-Register
Value
Meaning
0x0
Use ROM monitor mode
(Manually boot using the b
command)
0x1
Automatically boot from ROM
(Provides IOS subset)
0x2 to 0xF
Examine NVRAM for boot system
commands (0x2 default if router
has Flash)
• Check Configuration Register setting with show version
Boot System Options in Software
Flash
Connecting People To Information
Router#configure terminal
Router(config)#boot system flash c2500-js-l
[Ctrl-Z]
Router#copy running-config startup-config
Network
Router#configure terminal
Router(config)#boot system tftp test.exe 172.16.13.111
[Ctrl-Z]
Router#copy running-config startup-config
ROM
Router#configure terminal
Router(config)#boot system rom
[Ctrl-Z]
Router#copy running-config startup-config
•Multiple boot system commands select
bootstrap fallback sequence
Preparing for a Network
Backup Image
Connecting People To Information
c2500-js-l.112-6
Network
Server
Router
Check access to the server
Check space available on server
Check naming convention
Verifying Available Memory
Connecting People To Information
Router#show flash
1
System flash directory:
File
Length
Name/status
7871172
c2500-js-l.112-6.bin
[7871236 bytes used, 517372 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY)
•Verify that Flash memory has room for the Cisco
IOS image
Deciphering Image Filenames
Connecting People To Information
Router#show flash
1
System flash directory:
File
Length
Name/status
7871172
c2500-js-l.112-6.bin
[7871236 bytes used, 517372 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY)
Creating a Software Image
Backup
FLASH
Connecting People To Information
copy flash tftp
Network
Server
Router#copy flash tftp
System flash directory:
File
Length
Name/status
1
7871172
c2500-js-l.112-6.bin
[7871236 bytes used, 517372 available, 8388608 total]
8192K bytes of processor board System flash (Read ONLY)
IP address of remote host [255.255.255.255]? 172.16.13.111
filename to write on tftp host? c2500-js-l.112-6
writing c2500-js-l.112-6 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
successful tftp write.
Router#
•Back up current files prior to updating Flash
Upgrading the Image from the Net
Connecting People To Information
FLASH
Network
Server
Router#copy tftp flash
IP address or name of remote host [255.255.255.255]? 172.16.13.111
Name of tftp filename to copy into flash []? c4500-js-l
copy c4500-js-l.112-6 from 172.16.13.111 into flash memory? [confirm]<Return>
xxxxxxxx bytes available for writing without erasure.
erase flash before writing? [confirm]<Return>
Clearing and initializing flash memory (please wait)####...##
Loading from 172.16.13.111: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!(text omitted) [OK - 324572/524212 bytes]
Verifying checksum...
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
VVVVVV(text omitted)
Flash verification successful. Length = 1804637, checksum = 0xA5D3
•Erase Flash occurs before loading new image
Overwriting an Existing Image
Connecting People To Information
FLASH
Network
Server
Router#copy tftp flash
IP address or name of remote host [255.255.255.255]? 172.16.13.111
Name of tftp filename to copy into flash []? c4500-js-l.112-6
File c4500-js-l.112-6 already exists; it will be invalidated!
Copy c4500-js-l.112-6 from 172.16.13.111 into flash memory? [confirm]<Return>
xxxxxxxx bytes available for writing without erasure.
erase flash before writing? [confirm]<Return>
Clearing and initializing flash memory (please wait)####...##
Loading from 172.16.13.111: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!(text omitted) [OK - 324572/524212 bytes]
Verifying checksum...
VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
VVVVVV(text omitted)
Flash verification successful. Length = 1204637, checksum = 0x95D9
•Note message that image already exists
Changing a Configuration
Using Setup Mode
Connecting People To Information
Router#setup
--- System Configuration Dialog --At any point you may enter a question mark '?' for help.
Use ctrl-c to abort configuration dialog at any prompt.
Default settings are in square brackets '[ ]'.
Continue with configuration dialog? [yes/no]:yes
First, would you like to see the current interface summary? [yes]:no
Setup Mode Global Parameters
Configuring global parameters:
Connecting People To Information
Enter host name [Router]:P1R1
The enable secret is a one-way cryptographic secret used
instead of the enable password when it exists.
Enter enable secret [<Use current secret>]:
Enter enable password [sanfran]:
% Please choose a password that is different from the enable secret
Enter enable password [sanfran]:cisco
Enter virtual terminal password [sanjose]:
Configure SNMP Network Management? [no]:
Configure IP? [yes]:
Configure IGRP routing? [yes]:
Your IGRP autonomous system number [1]:
.
.
.
Setup Mode Interface Parameters
Configuring interface parameters:
Connecting People To Information
Configuring interface TokenRing0:
Is this interface in use? [no]: <Return>
Configuring interface Serial0:
Is this interface in use? [yes]:
Configure IP on this interface? [yes]:
Configure IP unnumbered on this interface? [no]:
IP address for this interface: 172.16.97.67
Number of bits in subnet field [0]:
Class B network is 172.16.0.0, 0 subnet bits; mask is 255.255.0.0
Configure Novell on this interface? [yes]: no
Configuring interface Serial1:
Is this interface in use? [yes]: no
Setup Mode Script Review
Connecting People To Information
The following configuration command script was created:
interface TokenRing0
hostname P1R1
shutdown
enable secret 5 $1$g722$dg2UVvWG6eekNRTE5LfmM/
!
enable password sanfran
interface Serial0
line vty 0 4
ip address 172.16.97.67 255.255.0.0
password sanfran
snmp-server community
interface Serial1
!
shutdown
ip routing
!
no decnet routing
router igrp 200
no xns routing
network 172.16.0.0
novell routing
!
no apollo routing
end
appletalk routing
no clns routing
Use this configuration? [yes/no]: yes
no vines
[OK]
no bridge
Use the enabled mode 'configure' command to
no mop enabled
modify this configuration.
-- More --
Download