copy current to starting
B.
Switch#
copy starting to running
C.
Switch(config)#
copy running-config startup-config
D.
Switch#
copy run start
12. You try to telnet into SF from router Corp and receive this message:
Corp#
telnet SF
Trying SF (10.0.0.1)...Open
Password required, but none set
[Connection to SF closed by foreign host]
Corp#
Which of the following sequences will address this problem correctly?
A.
Corp(config)#line console 0
Corp(config-line)#password password
Corp(config-line)#login
B.
SF config)#line console 0
SF(config-line)#enable secret password
SF(config-line)#login
C.
Corp(config)#line vty 0 4
Corp(config-line)#password password
Corp(config-line)#login
D.
SF(config)#line vty 0 4
SF(config-line)#password password
SF(config-line)#login
13. Which command will delete the contents of NVRAM on a switch?
A.
delete NVRAM
B.
delete startup-config
C.
erase flash
D.
erase startup-config
E.
erase start
14. What is the problem with an interface if you type
show interface g0/1
and receive the following message?
Gigabit 0/1 is administratively down, line protocol is down
A. The keepalives are different times.
B. The administrator has the interface shut down.
C. The administrator is pinging from the interface.
D. No cable is attached.
15. Which of the following commands displays the configurable
parameters and statistics of all interfaces on a switch?
A.
show running-config
B.
show startup-config
C.
show interfaces
D.
show versions
16. If you delete the contents of NVRAM and reboot the switch, what
mode will you be in?
A. Privileged mode
B. Global mode
C. Setup mode
D. NVRAM loaded mode
17. You type the following command into the switch and receive the
following output:
Switch#
show fastethernet 0/1
^
% Invalid input detected at '^' marker.
Why was this error message displayed?
A. You need to be in privileged mode.
B. You cannot have a space between
fastethernet
and
0/1
.
C. The switch does not have a FastEthernet 0/1 interface.
D. Part of the command is missing.
18. You type
Switch#sh r
and receive a
% ambiguous command
error. Why
did you receive this message?
A. The command requires additional options or parameters.
B. There is more than one
show
command that starts with the letter r.
C. There is no
show
command that starts with r.
D. The command is being executed from the wrong mode.
19. Which of the following commands will display the current IP
addressing and the layer 1 and 2 status of an interface? (Choose two.)
A.
show version
B.
show interfaces
C.
show controllers
D.
show ip interface
E.
show running-config
20. At which layer of the OSI model would you assume the problem is if
you type
show interface serial 1
and receive the following message?
Serial1 is down, line protocol is down
A. Physical layer
B. Data Link layer
C. Network layer
D. None; it is a router problem.
Chapter 7
Managing a Cisco Internetwork
The following ICND1 exam topics are covered in
this chapter:
2.0 LAN Switching Technologies
2.6 Configure and verify Layer 2 protocols
2.6.a Cisco Discovery Protocol
2.6.bLLDP
4.0 Infrastructure Services
4.1 Describe DNS lookup operation
4.2 Troubleshoot client connectivity issues involving DNS
4.3 Configure and verify DHCP on a router (excluding static
reservations)
4.3.a Server
4.3.b Relay
4.3.c Client
4.3.d TFTP, DNS, and gateway options
4.4 Troubleshoot client- and router-based DHCP connectivity
issues
4.5 Configure and verify NTP operating in client/server mode
5.0 Infrastructure Management
5.1 Configure and verify device-monitoring using syslog
5.2 Configure and verify device management
5.2.a Backup and restore device configuration
5.2.b Using Cisco Discovery Protocol and LLDP for device
discovery
5.2.d Logging
5.2.e Timezone
5.2.f Loopback
Here in Chapter 7, I’m going to show you how
to manage Cisco routers and switches on an internetwork. You’ll be
learning about the main components of a router, as well as the router
boot sequence. You’ll also find out how to manage Cisco devices by using
the
copy
command with a TFTP host and how to configure DHCP and
NTP, plus you’ll get a survey of the Cisco Discovery Protocol (CDP). I’ll
also show you how to resolve hostnames.
I’ll wrap up the chapter by guiding you through some important Cisco
IOS troubleshooting techniques to ensure that you’re well equipped with
these key skills.
To find up-to-the minute updates for this chapter, please see
www.lammle.com/ccna
or the book’s web page at
www.sybex.com/go/ccna
.
The Internal Components of a Cisco Router and
Switch
Unless you happen to be really savvy about the inner and outer workings
of all your car’s systems and its machinery and how all of that technology
works together, you’ll take it to someone who does know how to keep it
maintained, figure out what’s wrong when it stops running, and get it up
and running again. It’s the same deal with Cisco networking devices—you
need to know all about their major components, pieces, and parts as well
as what they all do and why and how they all work together to make a
network work. The more solid your knowledge, the more expert you are
about these things and the better equipped you’ll be to configure and
troubleshoot a Cisco internetwork. Toward that goal, study
Table 7.1
for
an introductory description of a Cisco router’s major components.
TABLE 7.1
Cisco router components
Component Description
Bootstrap
Stored in the microcode of the ROM, the bootstrap is
used to bring a router up during initialization. It boots
the router up and then loads the IOS.
POST (power-
on self-test)
Also stored in the microcode of the ROM, the POST is
used to check the basic functionality of the router
hardware and determines which interfaces are present.
ROM monitor Again, stored in the microcode of the ROM, the ROM
monitor is used for manufacturing, testing, and
troubleshooting, as well as running a mini-IOS when the
IOS in flash fails to load.
Mini-IOS
Called the RXBOOT or bootloader by Cisco, the mini-IOS
is a small IOS in ROM that can be used to bring up an
interface and load a Cisco IOS into flash memory. The
mini-IOS can also perform a few other maintenance
operations.
RAM
(random
access
memory)
Used to hold packet buffers, ARP cache, routing tables,
and also the software and data structures that allow the
router to function. Running-config is stored in RAM, and
most routers expand the IOS from flash into RAM upon
boot.
ROM (read-
only
memory)
Used to start and maintain the router. Holds the POST
and the bootstrap program as well as the mini-IOS.
Flash
memory
Stores the Cisco IOS by default. Flash memory is not
erased when the router is reloaded. It is EEPROM
(electronically erasable programmable read-only
memory) created by Intel.
NVRAM
(nonvolatile
RAM)
Used to hold the router and switch configuration.
NVRAM is not erased when the router or switch is
reloaded. Does not store an IOS. The configuration
register is stored in NVRAM.
Configuration
register
Used to control how the router boots up. This value can
be found as the last line of the
show version
command
output and by default is set to 0x2102, which tells the
router to load the IOS from flash memory as well as to
load the configuration from NVRAM.
The Router and Switch Boot Sequence
When a Cisco device boots up, it performs a series of steps, called the
boot sequence, to test the hardware and load the necessary software. The
boot sequence comprises the following steps, as shown in
Figure 7.1
:
1. The IOS device performs a POST, which tests the hardware to verify
that all components of the device are present and operational. The
post takes stock of the different interfaces on the switch or router, and
it’s stored in and runs from read-only memory (ROM).
2. The bootstrap in ROM then locates and loads the Cisco IOS software
by executing programs responsible for finding where each IOS
program is located. Once they are found, it then loads the proper files.
By default, the IOS software is loaded from flash memory in all Cisco
devices.
FIGURE 7.1
Router bootup process
3. The IOS software then looks for a valid configuration file stored in
NVRAM. This file is called startup-config and will be present only if
an administrator has copied the running-config file into NVRAM.
4. If a startup-config file is found in NVRAM, the router or switch will
copy it, place it in RAM, and name the file the running-config. The
device will use this file to run, and the router/switch should now be
operational. If a startup-config file is not in NVRAM, the router will
broadcast out any interface that detects carrier detect (CD) for a TFTP
host looking for a configuration, and when that fails (typically it will
fail—most people won’t even realize the router has attempted this
process), it will start the setup mode configuration process.
The default order of an IOS loading from a Cisco device begins
with flash, then TFTP server, and finally, ROM.
Backing Up and Restoring the Cisco
Configuration
Any changes that you make to the configuration are stored in the
running-config file. And if you don’t enter a
copy run start
command
after you make a change to running-config, that change will totally
disappear if the device reboots or gets powered down. As always, backups
are good, so you’ll want to make another backup of the configuration
information just in case the router or switch completely dies on you. Even
if your machine is healthy and happy, it’s good to have a backup for
reference and documentation reasons!
Next, I’ll cover how to copy the configuration of a router to a TFTP server
as well as how to restore that configuration.
Backing Up the Cisco Configuration
To copy the configuration from an IOS device to a TFTP server, you can
use either the
copy running-config tftp
or the
copy startup-config tftp
command. Either one will back up the router configuration that’s
currently running in DRAM or one that’s stored in NVRAM.
Verifying the Current Configuration
To verify the configuration in DRAM, use the
show running-config
command (
sh run
for short) like this:
Router#
show running-config
Building configuration...
Current configuration : 855 bytes
!
version 15.0
The current configuration information indicates that the router is
running version 15.0 of the IOS.
Verifying the Stored Configuration
Next, you should check the configuration stored in NVRAM. To see this,
use the
show startup-config
command (
sh start
for short) like this:
Router#
sh start
Using 855 out of 524288 bytes
!
! Last configuration change at 04:49:14 UTC Fri Mar 5 1993
!
version 15.0
The first line shows you how much room your backup configuration is
taking up. Here, we can see that NVRAM is about 524 KB and that only
855 bytes of it are being used. But memory is easier to reveal via the
show
version
command when you’re using an ISR router.
If you’re not sure that the files are the same and the running-config file is
what you want to go with, then use the
copy running-config startup-
config
command. This will help you ensure that both files are in fact the
same. I’ll guide you through this in the next section.
Copying the Current Configuration to NVRAM
By copying running-config to NVRAM as a backup, as shown in the
following output, you ensure that your running-config will always be
reloaded if the router gets rebooted. Starting in the 12.0 IOS, you’ll be
prompted for the filename you want to use:
Router#
copy running-config startup-config
Destination filename [startup-config]?
[enter]
Building configuration...
[OK]
The reason the filename prompt appears is that there are now so many
options you can use when using the
copy
command—check it out:
Router#
copy running-config ?
flash: Copy to flash: file system
ftp: Copy to ftp: file system
http: Copy to http: file system
https: Copy to https: file system
null: Copy to null: file system
nvram: Copy to nvram: file system
rcp: Copy to rcp: file system
running-config Update (merge with) current system configuration
scp: Copy to scp: file system
startup-config Copy to startup configuration
syslog: Copy to syslog: file system
system: Copy to system: file system
tftp: Copy to tftp: file system
tmpsys: Copy to tmpsys: file system
Copying the Configuration to a TFTP Server
Once the file is copied to NVRAM, you can make a second backup to a
TFTP server by using the
copy running-config tftp
command, or
copy
run tftp
for short. I’m going to set the hostname to
Todd
before I run this
command:
Todd#
copy running-config tftp
Address or name of remote host []?
10.10.10.254
Destination filename [todd-confg]?
!!
776 bytes copied in 0.800 secs (970 bytes/sec)
If you have a hostname already configured, the command will
automatically use the hostname plus the extension
-confg
as the name of
the file.
Restoring the Cisco Configuration
What do you do if you’ve changed your running-config file and want to
restore the configuration to the version in the startup-config file? The
easiest way to get this done is to use the
copy startup-config running-
config
command, or
copy start run
for short, but this will work only if
you copied running-config into NVRAM before you made any changes! Of
course, a reload of the device will work too!
If you did copy the configuration to a TFTP server as a second backup,
you can restore the configuration using the
copy tftp running-config
command (
copy tftp run
for short), or the
copy tftp startup-config
command (
copy tftp start
for short), as shown in the following output.
Just so you know, the old command we used to use for this is
config net
:
Todd#
copy tftp running-config
Address or name of remote host []?
10.10.10.254
Source filename []?
todd-confg
Destination filename[running-config]?
[enter]
Accessing tftp://10.10.10.254/todd-confg...
Loading todd-confg from 10.10.10.254 (via FastEthernet0/0):
!!
[OK - 776 bytes]
776 bytes copied in 9.212 secs (84 bytes/sec)
Todd#
*Mar 7 17:53:34.071: %SYS-5-CONFIG_I: Configured from
tftp://10.10.10.254/todd-confg by console
Okay that the configuration file is an ASCII text file . . . meaning that
before you copy the configuration stored on a TFTP server back to a
router, you can make changes to the file with any text editor.
Remember that when you copy or merge a configuration from
a TFTP server to a freshly erased and rebooted router’s RAM, the
interfaces are shut down by default and you must manually enable
each interface with the
no shutdown
command.
Erasing the Configuration
To delete the startup-config file on a Cisco router or switch, use the
command
erase startup-config
, like this:
Todd#
erase startup-config
Erasing the nvram filesystem will remove all configuration files!
Continue? [confirm]
[enter]
[OK]
Erase of nvram: complete
*Mar 7 17:56:20.407: %SYS-7-NV_BLOCK_INIT: Initialized the
geometry of nvram
Todd#
reload
System configuration has been modified. Save? [yes/no]:
n
Proceed with reload? [confirm]
[enter]
*Mar 7 17:56:31.059: %SYS-5-RELOAD: Reload requested by console.
Reload Reason: Reload Command.
This command deletes the contents of NVRAM on the switch and router.
If you type
reload
while in privileged mode and say no to saving changes,
the switch or router will reload and come up into setup mode.
Configuring DHCP
We went over DHCP in Chapter 3, “Introduction to TCP/IP,” where I
described how it works and what happens when there’s a conflict. At this
point, you’re ready to learn how to configure DHCP on Cisco’s IOS as well
as how to configure a DHCP forwarder for when your hosts don’t live on
the same LAN as the DHCP server. Do you remember the four-step
process hosts used to get an address from a server? If not, now would be a
really great time to head back to Chapter 3 and thoroughly review that
before moving on with this!
To configure a DHCP server for your hosts, you need the following
information at minimum:
Network and mask for each LAN Network ID, also called a scope.
All addresses in a subnet can be leased to hosts by default.
Reserved/excluded addresses Reserved addresses for printers,
servers, routers, etc. These addresses will not be handed out to hosts. I
usually reserve the first address of each subnet for the router, but you
don’t have to do this.
Default router This is the router’s address for each LAN.
DNS address A list of DNS server addresses provided to hosts so
they can resolve names.
Here are your configuration steps:
1. Exclude the addresses you want to reserve. The reason you do this
step first is because as soon as you set a network ID, the DHCP service
will start responding to client requests.
2. Create your pool for each LAN using a unique name.
3. Choose the network ID and subnet mask for the DHCP pool that the
server will use to provide addresses to hosts.
4. Add the address used for the default gateway of the subnet.
5. Provide the DNS server address(es).
6. If you don’t want to use the default lease time of 24 hours, you need to
set the lease time in days, hours, and minutes.
I’ll configure the switch in
Figure 7.2
to be the DHCP server for the Sales
wireless LAN.
FIGURE 7.2
DHCP configuration example on a switch
Understand that this configuration could just have easily been placed on
the router in
Figure 7.2
. Here’s how we’ll configure DHCP using the
192.168.10.0/24 network ID:
Switch(config)#
ip dhcp excluded-address 192.168.10.1 192.168.10.10
Switch(config)#
ip dhcp pool Sales_Wireless
Switch(dhcp-config)#
network 192.168.10.0 255.255.255.0
Switch(dhcp-config)#
default-router 192.168.10.1
Switch(dhcp-config)#
dns-server 4.4.4.4
Switch(dhcp-config)#
lease 3 12 15
Switch(dhcp-config)#
option 66 ascii tftp.lammle.com
First, you can see that I reserved 10 addresses in the range for the router,
servers, and printers, etc. I then created the pool named Sales_Wireless,
added the default gateway and DNS server, and set the lease to 3 days, 12
hours, and 15 minutes (which isn’t really significant because I just set it
that way for demonstration purposes). Lastly, I provided an example on
you how you would set option 66, which is sending a TFTP server address
to a DHCP client. Typically used for VoIP phones, or auto installs, and
needs to be listed as a FQDN. Pretty straightforward, right? The switch
will now respond to DHCP client requests. But what happens if we need
to provide an IP address from a DHCP server to a host that’s not in our
broadcast domain, or if we want to receive a DHCP address for a client
from a remote server?
Dostları ilə paylaş: |