Chapter 5
Managing Your
Network Environment
© 1999, Cisco Systems, Inc.
5-1
Objectives
Upon completion of this chapter, you will
be able to perform the following tasks:
• Gather information about neighbor devices
• Gather information about remote devices
• Create a simple network diagram to
document the network
• Determine the location from which a
configuration and IOS image will be loaded
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-2
Cisco Discovery
Protocol
Upper-Layer
Entry Addresses
TCP/IP
Cisco Proprietary
Data-Link Protocol
CDP discovers and shows information about
directly connected Cisco devices
Media Supporting
SNAP
LANs
Novell
IPX
Frame
Relay
AppleTalk
ATM
Others
Others
• A proprietary utility that gives you a summary of
directly connected switches, routers, and other
Cisco devices
• CDP discovers neighbor devices regardless of
which protocol suite they are running
• Physical media must support the Subnetwork
Access Protocol (SNAP) encapsulation
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-3
Discovering Neighbors
with CDP
Runs on routers with Cisco IOS
10.3 or later and Cisco switches
and hubs
Summary information
includes:
CDP
• Device identifiers
• Address list
CDP
CDP
• Port identifier
show cdp
• Capabilities list
• Platform
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-4
Using CDP
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterB
SwitchB
10.1.1.2
10.1.1.1
10.2.2.1
10.2.2.2
RouterA#sh cdp ?
entry
Information for specific neighbor entry
interface CDP interface status and configuration
neighbors CDP neighbor entries
traffic
CDP statistics
<cr>
RouterA(config)#no cdp run
RouterA(config)#interface serial0
RouterA(config-if)#no cdp enable
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-5
Using the show cdp neighbor
Command
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterB
SwitchB
10.1.1.2
10.1.1.1
10.2.2.1
10.2.2.2
RouterA#sh cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID
Local Intrfce
RouterB
Ser 0
SwitchA0050BD855780 Eth 0
Holdtme
148
167
Capability
R
T S
Platform
2522
1900
Port ID
Ser 1
2
SwitchA also provides its Mac address
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-6
Using the show cdp entry
Command
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterB
SwitchB
10.1.1.2
10.1.1.1
10.2.2.1
10.2.2.2
RouterA#sh cdp entry *
------------------------Device ID: RouterB
Entry address(es):
IP address: 10.1.1.2
Platform: cisco 2522, Capabilities: Router
Interface: Serial0, Port ID (outgoing port): Serial1
Holdtime : 168 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fci)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Mon 08-Feb-99 18:18 by phanguye
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-7
Additional CDP Commands
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterB
SwitchB
10.1.1.2
10.1.1.1
10.2.2.1
10.2.2.2
RouterA#sh cdp traffic
CDP counters :
Packets output: 56, Input: 38
Hdr syntax: 0, Chksum error: 0, Encaps failed: 3
No memory: 0, Invalid packet: 0, Fragmented: 0
RouterA#sh cdp interface
BRI0 is administratively down, line protocol is down
Encapsulation HDLC
Sending CDP packets every 60 seconds
Holdtime is 180 seconds
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-8
Using Telnet to Connect to
Remote Devices
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterB
SwitchB
10.1.1.2
10.1.1.1
10.2.2.1
10.2.2.2
RouterA#telnet 10.2.2.2
Trying 10.2.2.2 ... Open
------------------------------------------------Catalyst 1900 Management Console
Copyright (c) Cisco Systems, Inc. 1993-1998
All rights reserved.
Enterprise Edition Software
Ethernet Address:
00-90-86-73-33-40
PCA Number:
73-2239-06
PCA Serial Number:
FAA02359H8K
Remote device
Model Number:
WS-C1924-EN
System Serial Number: FAA0237X0FQ
.
.
SwitchB>
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-9
Viewing Telnet Connections
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterA#sh session
Conn Host
1 10.1.1.2
* 2 10.3.3.2
RouterA#sh user
Line
User
* 0 con 0
11 vty 0
© 1999, Cisco Systems, Inc.
RouterB
SwitchB
10.1.1.2
10.1.1.1
Address
10.1.1.2
10.3.3.2
Host(s)
10.1.1.2
10.3.3.2
idle
10.2.2.1
Byte
0
0
10.2.2.2
Idle Conn Name
1 10.1.1.2
0 10.3.3.2
Idle Location
3
2
1 10.1.1.2
www.cisco.com
ICND—5-10
Suspending a Telnet Session
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterB#<Ctrl-Shift-6>x
RouterA#sh session
Conn Host
1 10.1.1.2
RouterA#resume 1
RouterB#
© 1999, Cisco Systems, Inc.
RouterB
SwitchB
10.1.1.2
10.1.1.1
Address
10.1.1.2
www.cisco.com
10.2.2.1
Byte
0
10.2.2.2
Idle Conn Name
1 10.1.1.2
ICND—5-11
Closing a Telnet Session
SwitchA
RouterA
S1
S0
10.3.3.2
10.3.3.1
RouterB
SwitchB
10.1.1.2
10.1.1.1
10.2.2.1
10.2.2.2
Closing the current
RouterA#disconnect
Closing connection to 10.3.3.2 [confirm] session opened by you
RouterA#clear line 11
[confirm]
[OK]
© 1999, Cisco Systems, Inc.
Closing a session opened
by a remote device
www.cisco.com
ICND—5-12
Using the ping and trace
Commands
Router##ping 10.1.1.10
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
Router#trace 10.1.1.10
Type escape sequence to abort.
Tracing the route to 10.1.1.10
1 10.1.1.10 4 msec 4 msec 4 msec
Router#
Test connectivity and path to a remote device
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-13
Router Power on/Bootup
Sequence
• Power on self test (POST)
• Load and run bootstrap code
• Find the IOS software
• Load the IOS software
• Find the configuration
• Load the configuration
• Run
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-14
Router Internal Components
NVRAM
Config register
RAM
ROM
Interfaces
Flash
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-15
ROM Functions
ROM
Bootstrap
POST
show version
Mini IOS
ROM
monitor
Console
Contains microcode for basic functions
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-16
Finding the IOS
show
startup-config
NVRAM
Config register
Flash
Console
show
version
Order of search:
IOS
© 1999, Cisco Systems, Inc.
1. Check configuration register
2. Parse config in NVRAM
3. Default to first file in Flash
4. Attempt net boot
5. RXBOOT
6. ROMMON
www.cisco.com
ICND—5-17
Router Start-up Flow Chart
Boot
field =1
0x1
START
Boot
system Yes
commands
?
Check
start-up
config
No
Yes
Boot
field =0
0x0
No
No
No
Yes
Yes
Use IOS from
Flash
Attempt to get
IOS from
network
5 failures
?
Run
ROM
Monitor
No
Use IOS in ROM
(RXBoot mode)
Load IOS
Yes
Config reg
bit 13=1
?
Config reg
bit 6=1
?
No
Success
?
No
Yes
© 1999, Cisco Systems, Inc.
Valid
IOS in
Flash
?
No
Yes
Do what
they say
www.cisco.com
Yes
Valid
config
?
No
Use file from
Network
NORMAL
START UP
COMPLETE
Yes
SETUP
DIALOG
ICND—5-18
Determining the Current
Configuration Register Value
wg_ro_a#show version
Cisco Internetwork Operating System Software
IOS (tm) 2500 Software (C2500-JS-L), Version 12.0(3), RELEASE SOFTWARE (fc1)
Copyright (c) 1986-1999 by cisco Systems, Inc.
Compiled Mon 08-Feb-99 18:18 by phanguye
Image text-base: 0x03050C84, data-base: 0x00001000
ROM: System Bootstrap, Version 11.0(10c), SOFTWARE
BOOTFLASH: 3000 Bootstrap Software (IGS-BOOT-R), Version 11.0(10c), RELEASE SOFTWARE (fc1)
wg_ro_a uptime is 20 minutes
System restarted by reload
System image file is "flash:c2500-js-l_120-3.bin"
--More-Configuration register is 0x2102
Configuration register value in show version
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-19
Configuration Register Values
Router#configure terminal
Router(config)#config-register 0x2102
[Ctrl-Z]
Router#reload
• Configuration register bits 3, 2, 1, and 0 set boot option
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-20
Configuration Register Values
Router#configure terminal
Router(config)#config-register 0x2102
[Ctrl-Z]
Router#reload
• Configuration register bits 3, 2, 1, and 0 set boot option
Configuration Register
Boot Field Value
0x0
© 1999, Cisco Systems, Inc.
Meaning
Use ROM monitor mode
(Manually boot using the b
command)
www.cisco.com
ICND—5-21
Configuration Register Values
Router#configure terminal
Router(config)#config-register 0x2102
[Ctrl-Z]
Router#reload
• Configuration register bits 3, 2, 1, and 0 set boot option
Configuration Register
Boot Field Value
© 1999, Cisco Systems, Inc.
Meaning
0x0
Use ROM monitor mode
(Manually boot using the b
command)
0x1
Automatically boot from ROM
(Provides IOS subset)
www.cisco.com
ICND—5-22
Configuration Register Values
Router#configure terminal
Router(config)#config-register 0x2102
[Ctrl-Z]
Router#reload
• Configuration register bits 3, 2, 1, and 0 set boot option
Configuration Register
Boot Field 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 value with show version
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-23
Loading the IOS from Flash
RAM
IOS
Flash
Console
IOS
show flash
Flash file is decompressed into RAM
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-24
show flash Command
wg_ro_a#sh flash
System flash directory:
File Length
Name/status
1
10084696 c2500-js-l_120-3.bin
[10084760 bytes used, 6692456 available, 16777216 total]
16384K bytes of processor board System flash (Read ONLY)
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-25
Loading the Configuration
RAM
NVRAM
Config
Config
IOS
show
running-config
show
startup-config
Console
Setup utility
• Load and execute config from NVRAM
• If no config in NVRAM, enter setup mode
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-26
show running and show
startup Commands
In RAM
In NVRAM
wg_ro_c#show running-config
Building configuration...
wg_ro_c#show startup-config
Using 1359 out of 32762 bytes
!
version 12.0
!
-- More --
Current configuration:
!
version 12.0
!
-- More --
Display current and saved configuration
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-27
Sources of Configurations
RAM
NVRAM
copy running startup
Config
Config
copy startup running (merge)
• NVRAM
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-28
Sources of Configurations
RAM
NVRAM
copy running startup
Config
Config
copy startup running (merge)
config term
(merge)
• NVRAM
• Terminal
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-29
Sources of Configurations
RAM
NVRAM
copy running startup
Config
Config
copy startup running (merge)
config term
(merge)
copy tftp run
(merge)
• NVRAM
Console
copy tftp start
copy run tftp
• Terminal
copy start tftp
TFTP
server
• TFTP server
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-30
Sources of Configurations
RAM
NVRAM
copy running startup
Config
Config
copy startup running (merge)
config term
(merge)
copy tftp run
(merge)
• NVRAM
Console
copy tftp start
copy run tftp
• Terminal
• TFTP server
erase
start
copy start tftp
TFTP
server
Blank
000000
000000
• Erase Start
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-31
copy run tftp and copy tftp run
Commands
wg_ro_a#copy running-config tftp
Address or name of remote host []? 10.1.1.1
Destination filename [running-config]? wgroa.cfg
.!!
1684 bytes copied in 13.300 secs (129 bytes/sec)
wg_ro_a#copy tftp running-config
Address or name of remote host []? 10.1.1.1
Source filename []? wgroa.cfg
Destination filename [running-config]?
Accessing tftp://10.1.1.1/wgroa.cfg...
Loading wgroa.cfg from 10.1.1.1 (via Ethernet0): !
[OK - 1684/3072 bytes]
1684 bytes copied in 17.692 secs (99 bytes/sec)
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-32
Cisco IOS File Systems and
Devices
RAM
NVRAM
system:
nvram:
TFTP
server
Flash
tftp:
flash:
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-33
Managing IOS Images
c2500-js-l_120-3.bin
Network
server
Router
FLASH
© 1999, Cisco Systems, Inc.
Network
server
www.cisco.com
ICND—5-34
Preparing for a Network
Backup Image
Network
server
Router
• Check access to the server
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-35
Preparing for a Network
Backup Image
Network
server
Router
• Check access to the server
• Check space available on the server
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-36
Preparing for a Network
Backup Image
c2500-js-l_120-3.bin
Network
server
Router
• Check access to the server
• Check space available on the server
• Check file naming convention
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-37
Preparing for a Network
Backup Image
c2500-js-l_120-3.bin
Network
server
Router
• Check access to the server
• Check space available on the server
• Check file naming convention
• Create file on server if required
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-38
Verifying Memory and
Deciphering Image Filenames
wg_ro_a#show flash
System flash directory:
File Length
Name/status
1
10084696 c2500-js-l_120-3.bin
[10084760 bytes used, 6692456 available, 16777216 total]
16384K bytes of processor board System flash (Read ONLY)
Verify Flash memory has room for the IOS image
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-39
Creating a Software Image
Backup
FLASH
copy flash tftp
Network
server
wg_ro_a#copy flash tftp
Source filename []? c2500-js-l_120-3.bin
Address or name of remote host []? 10.1.1.1
Destination filename [c2500-js-l_120-3.bin]?
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<output omitted>
10084696 bytes copied in 709.228 secs (14223 bytes/sec)
wg_ro_a#
Back up current files prior to updating Flash
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-40
Upgrading the Image from the
Net
FLASH
Network
server
wg_ro_a#copy tftp flash
Address or name of remote host [10.1.1.1]?
Source filename []? c2500-js-l_120-3.bin
Destination filename [c2500-js-l_120-3.bin]?
Accessing tftp://10.1.1.1/c2500-js-l_120-3.bin...
Erase flash: before copying? [confirm]
Erasing the flash filesystem will remove all files! Continue? [confirm]
Erasing device... eeeee (output omitted) ...erased
Erase of flash: complete
Loading c2500-js-l_120-3.bin from 10.1.1.1 (via Ethernet0): !!!!!!!!!!!!!!!!!!!!
(output omitted)
[OK - 10084696/20168704 bytes]
Verifying checksum... OK (0x9AA0)
10084696 bytes copied in 309.108 secs (32636 bytes/sec)
wg_ro_a#
• Erase Flash occurs before loading new image
• Note message that image already exists
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-41
Visual Objective
wg_pc_a
pod
A
B
C
D
E
F
G
H
I
J
K
L
sw
10.1.1.10
10.1.1.20
10.1.1.30
10.1.1.40
10.1.1.50
10.1.1.60
10.1.1.70
10.1.1.80
10.1.1.90
10.1.1.100
10.1.1.110
10.1.1.120
ro’s e0
10.1.1.11
10.1.1.21
10.1.1.31
10.1.1.41
10.1.1.51
10.1.1.61
10.1.1.71
10.1.1.81
10.1.1.91
10.1.1.101
10.1.1.111
10.1.1.121
console
fa0/26
(port A)
A/B
e0/2
console
e0
wg_ro_a
10.1.1.11
255.255.255.0
wg_pc_l
wg_sw_a
10.1.1.10
255.255.255.0
console
fa0/26
(port A)
A/B
e0/2
console
e0
wg_ro_l
...
fa0/1
wg_sw_l
10.1.1.120
255.255.255.0
10.1.1.121
255.255.255.0
fa0/12
fa0/24
core_ server
10.1.1.1
255.255.255.0
© 1999, Cisco Systems, Inc.
core_sw_a
10.1.1.2
255.255.255.0
www.cisco.com
ICND—5-42
Summary
After completing this chapter, you should be
able to perform the following tasks:
• Use Cisco Discovery Protocol from a device to
get information about neighboring devices
• Use Telnet to retrieve information about remote
devices
• Determine the load location of the IOS image
• List the commands to load an IOS image file
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-43
Review Questions
1. What CDP command is used to get
information about one specific neighbor?
2. What key combination suspends a Telnet
session?
3. From which three locations can an active
configuration file originate?
4.What show command lists the value of the
Configuration Register?
© 1999, Cisco Systems, Inc.
www.cisco.com
ICND—5-44