CCNA Chapter 2482
CCNA Chapter 2482
CCNA Chapter 2482
This module will cover four basic concepts required for setting up and testing a
network. The first is what you need to know before you configure devices. This
involves knowing the functions of the Internetwork Operating System found on most
Cisco devices, learning to communicate with the IOS using the Command Line
Interface (CLI) and physically connecting to the devices. The second is knowing the
basics of device configuration including securing the device, naming devices, and
enabling interfaces so the device can become more than a big box. The third is
knowing the basic tools for verifying network connectivity such as ping and
traceroute; and finally, the need for and how to monitor and document a network.
Define the following key terms: IOS, CLI, SSH and modal operating system.
Describe the Internetwork Operating Systems (IOS).
Explain configuration file types.
Explain how to access the IOS and how to work with Cisco IOS modes.
Module 11 – Configuring and Testing Your Network
• The Cisco IOS is accessed using the Command Line Interface (CLI). The features
accessible via the CLI vary based on the version of the IOS and the type of device.
Figure 11.2
Cisco IOS
There are several ways to access the CLI environment. The most usual methods are:
a. Console
• The CLI can be accessed through a console session, also known as the CTY line.
• Console uses low speed serial connection directly connect computer to console
port on the router or switch.
• For many IOS devices, console access does not require any form of security, by
default.
• Take the following steps to connect a terminal to the console port on the router:
o Connect the terminal using the RJ-45 to RJ-45 rollover cable and an RJ-
45 to DB-9 or RJ-45 to DB-25 adapter.
b. Telnet or SSH
o The network device must have at least one active interface configured with a
Layer 3 address, such as an IPv4 address.
o Telnet client can access the VTY sessions on the Cisco device.
o For security reasons, the IOS requires that the Telnet session use a
password, as a minimum authentication method.
• Secure Shell (SSH) protocol is a more secure method for remote device access.
o This protocol provides remote login similar to Telnet, except that it utilizes
more secure network services. SSH provides stronger password
authentication than Telnet and uses encryption when transporting session
data.
o This keeps the user ID, password, and the details of the management
session private. As a best practice, always use SSH in place of Telnet
whenever possible.
o IOS devices also include an SSH client that can be used to establish SSH
sessions with other devices.
o Similarly, you can use a remote computer with an SSH client to start a secure
CLI session.
c. AUX port
• The AUX port can also be used locally, like the console port, with a direct
connection to a computer running a terminal emulation program. The console
port is required for the configuration of the router, but not all routers have an
auxiliary port.
• The console port is also preferred over the auxiliary port for troubleshooting
because it displays router startup, debugging, and error messages by default.
Router Components
e. Console
• The console port provides physical access for the initial configuration
of the router or configuration changes
f. Interfaces
Figure 11.5
Router Components
Configuration Files
a. Operating system (IOS) - The operating system facilitates the basic operation
of the device's hardware components.
b. Configuration file - Configuration files contain the Cisco IOS commands used
to customize the functionality of a Cisco device. A Cisco network device
contains two configuration files:
The startup-config files are loaded into RAM each time the router is started or
reloaded. Once the configuration file is loaded into RAM, it is considered the running
configuration
o The term modal describes a system where there are different modes of
operation, each having its own operation.
• Each mode is to accomplish particular tasks and has specific commands that are
available in that mode.
• When using the CLI, the mode is identified by the command-line prompt that is
unique to that mode. The prompt is composed of the words and symbols on the line
to the left of the entry area. The word prompt is used because the system is
prompting you to make an entry
• Listed on the table are the Cisco IOS modes for routers and switches.
o Following the name, the remainder of the prompt indicates the mode.
o For example, the default prompt for the global configuration mode on a
router would be:
Router(config)#
Figure 11.6
The CISCO
IOS modes
Each IOS command has specific format or syntax and is executed at the appropriate
prompt.
• For example:
Switch#show running-config
o The command is: description. The argument is: MainHQ Office Switch. The user
defines the argument. For this command, the argument can be any text string of
up to 80 characters.
• After entering each complete command, including any keywords and arguments,
press the <Enter> key to submit the command to the command interpreter.
• There is an immediate response without the need to use the <Enter> key.
• This can be used when you are unsure of the name for a command.
• For example, to list the commands available at the user EXEC level
Router>?
Router> show ?
c. Hot Keys and Shortcuts - The IOS CLI provides hot keys and shortcuts.
o Ctrl-R - Redisplay the line. When the IOS is returning a message just as
you are typing. You can use Ctrl-R to refresh the line and avoid to retype.
o Ctrl-Z - Exit configuration mode. You may find yourself several levels
down. Rather than exit each mode individually, use Ctrl-Z to return
directly to the privileged EXEC prompt at the top level.
o Use down arrow key (Ctrl N) to scroll forward through the history
to display the more recent commands.
Router#configure terminal
Router#conf t
• In CLI line editing, Backspace key most often used. Note that the Delete key is
NOT recognized to delete invalid characters.
• At the ----More---- Prompt: When a command returns more output than can be
displayed on a single screen, the --More-- prompt appears at the bottom of the
screen.
o If any other key is pressed, the output is cancelled and you are returned
to the prompt.
In order to verify and troubleshoot network operation, we must examine the operation
of the devices. The basic examination command is the show command.
• show interfaces – Displays statistics for all interfaces on the device. To view the
statistics for a specific interface, enter the show interfaces command followed
by the specific interface slot/port number.
o Router Type and Processor type - Model number and processor type
• The following CLI command is used to take the device from privileged
EXEC mode to the global configuration mode:
Router#configure terminal
• Once the command is executed, the prompt changes to show that the
router is in global configuration mode.
Router(config)#
5. In the CLI what are, in order from top to bottom, the major modes? List some of the
available commands for each.
6. The IOS has several forms of help available. What are they?
Define the following key terms: console password, enable password, enable secret,
vty password, service password-encryption, Cisco Level 7 encryption, banner, TFTP
server and interface description.
Explain how to name and secure devices.
Explain how to manage configuration files.
Describe how to configure router interfaces.
Naming Devices
In this example, the router’s hostname is set to “AtlantaHQ”. Notice that the
hostname appears in the prompt. To exit global mode, use the Exit command.
To negate the effects of a command, preface the command with the no keyword.
For example, to remove the name of a device, use:
AtlantaHQ(config)# no hostname
Router(config)#
Notice that the device uses the default hostname "Router" again.
• The use of easily guessed passwords is a security issue. Consider these key
points when choosing passwords:
Console Password
The console port of a device has special privileges. The console port of network
devices must be secured. This reduces the chance of unauthorized personnel
physically plugging a cable into the device and gaining device access.
o The zero is used to represent the first (and in most cases only) console
interface for a router.
Once these three commands are executed, a password prompt will appear each
time a user attempts to gain access to the console port.
o In this example the enable password is set to “cisco” and the enable secret
password is “class”.
o What is the difference between the enable password and enable secret? In
enable password, privileged EXEC password is seen on clear text. On the
other hand, the command enable secret encrypts the privileged EXEC
password. If both privileged EXEC password is configured, the router/ switch
will use the enable secret password.
Strongly encrypted
password
VTY Password
The VTY lines allow access to a router via Telnet. By default, many Cisco
devices support five VTY lines that are numbered 0 to 4.
A password needs to be set for all available VTY lines. The same password can
be set for all connections. However, it is often desirable that a unique password
be set for one line to provide a fall-back for administrative entry to the device if
the other connections are in use.
Another useful command prevents passwords from showing up as plain text when
viewing the configuration files. This is the service password-encryption command.
This command causes the encryption of passwords to occur when a password is
configured.
Once the encryption has been applied, removing the encryption service does not
reverse the encryption
Login Banner
Banners can be an important part of the legal process in the event that someone is
prosecuted for breaking into a device. Some legal systems do not allow prosecution,
or even the monitoring of users, unless a notification is visible.
In configuring a banner message, any wording that implies that a login is "welcome"
or "invited" is not appropriate.
The IOS provides multiple types of banners. One common banner is the message of
the day (MOTD). The following command is used to configure a banner MOTD.
o The banner motd command requires the use of delimiters to identify the
content of the banner message.
o One or more lines of text are entered to represent the banner message.
Configuring Interfaces
a. Ethernet Interfaces
Router’s Ethernet interfaces are used as the gateways for the end devices on the
LANs directly connected to the router. Each Ethernet interface must have an IP
address and subnet mask to route IP packets.
IP address Netmask
b. Serial Interfaces
Serial interfaces are used to connect WANs to router. Each connected serial
interface must have an IP address and subnet mask to route IP packets.
Serial interfaces require a clock signal to control the timing of the communications.
o By default, Cisco routers are DTE devices, but they can be configured as DCE
devices.
Description of an Interface
o The interface description will appear in the output of these commands: show
startup-config, show running-config, and show interfaces.
o Switch interfaces are also enabled by default. We can assign descriptions but
do not have to enable the interface.
o In most cases, this is the interface VLAN 1. We enable this interface with no
shutdown command.
Like any other host, the switch needs a gateway address to communicate outside of
the local network. We assign this gateway with the ip default-gateway command.
or
If changes made to the running configuration do not have the desired effect,
it is necessary to restore the previous configuration.
Assuming that we have not overwritten the startup configuration with the
changes, we can replace the running configuration with the startup
configuration.
This is best done by using the reload command at the privileged EXEC level.
When initiating a reload, a prompt will appear to ask whether to save the
changes made. To discard the changes, enter n or no.
The following command is used to erase the startup configuration. Enter the
command at the privileged EXEC level:
Figure 11.19
Router’s
Configuration Files
A TFTP server will allow image and configuration uploads and downloads over the
network.
Use either the copy running-config tftp or copy startup-config tftp command and
follow these steps:
2. Enter the IP address of the host where the configuration file will be stored.
Figure 11.21
Backup configuration on
a TFTP server
4. Once capture has been started, execute the show running-config or show startup-
config command at the privileged EXEC prompt. Text displayed in the terminal
window will be placed into the chosen file.
3. Once capture has been started, execute the show running-config or show startup-
config command at the privileged EXEC prompt. Text displayed in the terminal
window will be placed into the chosen file.
4. When the capture is complete, select Close in the TeraTerm: Log window.
A configuration file can be copied from storage to a device. When copied into the
terminal, the IOS executes each line of the configuration text as a command.
o This means that the file will require editing to ensure that encrypted
passwords are in plain text and that non-command text such as "--More--"
and IOS messages are removed.
o Further, at the CLI, the device must be set at the global configuration mode
to receive the commands from the text file being copied.
1. Locate the file to be copied into the device and open the text document.
2. Locate the file to be copied into the device and click Open.
The text in the file will be applied as commands in the CLI and become the running
configuration on the device.
4. What are the steps & commands needed to configure a router’s Ethernet ports?
Verifying Connectivity
A network is only useful if every device on the network is configured properly and
working as required. Test and verification commands allow a network engineer to document
the health of the network.
o Starting with the individual device and then extending to the LAN and, finally,
to remote networks.
Figure 11.24
Testing the
Network Using
Ping command
IOS Ping Indicators. A ping from the IOS will yield to one of several indications for
each ICMP echo that was sent. The most common indicators are:
One of the most used commands is show ip interface brief. This provides a
summary of the key information for all the interfaces.
Notice that the Serial 0/0/1 interface has not been enabled.
– As with an end device, we can verify the Layer 3 connectivity with the ping
and traceroute commands.
– You can see sample outputs from a ping to a host in the local LAN and a
trace to a remote host across the WAN the next figure.
You can see the use of the show ip interface brief to verify the switch
interfaces.
Figure 11.28 Using show ip interface brief command to verify switch interfaces
Like other hosts, the switch can test its Layer 3 connectivity with the ping
and traceroute commands.
The next step in the testing sequence is to verify that the NIC address is bound to
the IPv4 address and that the NIC is ready to transmit signals across the media.
C:\>ping 10.0.0.5
o If this test fails, it is likely that there are issues with the NIC hardware and
software driver that may require reinstallation of either or both.
Successfully pinging remote hosts verifies that both the local host and the remote
host are configured correctly.
Successfully pinging another host on the same subnet verifies that both the local
host and the other host are configured correctly.
The next step in the testing sequence is to use the ping command to verify that a
local host can connect with a gateway address.
o This is extremely important because the gateway is the host's entry and exit
to the wider network.
o Verify the gateway address with the network administrator to ensure that the
proper address is being tested.
o If all devices are configured properly, check the physical cabling to ensure
that it is secure and properly connected.
Once verification of the local LAN and gateway is complete, testing can proceed to
remote devices.
The verification tests should begin within the local network and progress outward to
the remote devices.
o To test the communication to the remote network, you can ping a known
host on this remote network.
o If you cannot ping the host on the remote network from a router, you should
first check the routing table. If there is no route to reach this network, you
will need to identify why the route does not exist.
The next step in the testing is to perform a trace. A trace returns a list of hops as a
packet is routed through a network.
In this example, trace requests to the next hop timed out, meaning the failure is
therefore in the internetwork beyond the LAN.
3. What is the difference between the show ip interfaces & the show ip interface brief
commands?
Define the following key terms: network baseline, and MAC table.
Explain how to monitor and document the network.
Describe network baselines.
Network Baseline
One of the most effective tools for monitoring and troubleshooting network
performance is to establish a network baseline. This process provides a snapshot of
the network at regular intervals to insure it is running as designed.
o It is more than a single report detailing the health of the network at a certain
point in time.
One method for starting a baseline is to copy and paste the results from an executed
ping, trace, or other relevant command into a text file.
One common method for capturing baseline information is to copy the output from
the command line window and paste it into a text file.
Run the same test over a period of days and save the data each time. An
examination of the files will begin to reveal patterns in network performance and
provide the baseline for future troubleshooting.
IOS Capture
Capturing ping command output can also be completed from the IOS prompt.
2. Choose Browse to locate or type the name of the saving the file.
4. Execute the ping command in the user EXEC mode or at the privileged
EXEC prompt. The router will place the text displayed on the terminal in the
location chosen.
6. On the Transfer menu, click Capture Text, and then click Stop Capture.
Data generated using either the computer prompt or the router prompt can
contribute to the baseline.
As previously discussed, trace can be used to trace the steps, or hops, between
hosts. This output can be captured and used in the same way that ping output is
used.
o Sometimes the security settings at the destination network will prevent the
trace from reaching the final destination. However, we can still capture a
baseline of the hops along the path.
To trace the route from your computer to cisco.com, enter this command in a
command line:
C:\>tracert www.cisco.com
The steps for saving the trace output are identical to the steps for saving ping
output: Select the text from the command window and paste it into a text file.
Router Capture
Capturing the traceroute output can also be done from the router prompt. When
using HyperTerminal, the steps used are:
2. Choose a use Browse to locate or type the name of the saving the file.
6. On the Transfer menu, click Capture Text, and then click Stop Capture.
Store the text files generated by these tests in a safe location, along with the rest of
the network documentation.
o You would need access to all of the devices and sufficient time to view the
information, one host at a time.
o The arp command provides for the mapping of physical addresses to known
IPv4 addresses.
C:\>arp –a
The ARP cache can be cleared by using the arp -d command, in the event the
network administrator wants to repopulate the cache with updated information.
o Note: The ARP cache is only populated with information from devices that
have been recently accessed. To ensure that the ARP cache is populated,
ping a device so that it will have an entry in the ARP table.
Switch Connections
One additional tool that can be helpful is a mapping of how hosts are connected to a
switch.
Sw1-2950#show mac-address-table
o This table in the figure lists the MAC address of the hosts that are connected
to this switch.
o Like other output in the command window, this information can be copied
and pasted into a file.
An analysis of this table also reveals that interface Fa0/23 is either a shared segment
or is connected to another switch.
Module 11 Quiz
Directions. On the space provided before each number, choose the letter of the correct
answer.
________1. How would you configure the name “Didcot” on a new router?
A. Router>enable
Router#hostname Didcot
B. Router>configure
Router(config)#hostname Didcot
C. Router>enable
Router#config t
Router(config)#hostname Didcot
D. Router>enable
Router#configure hostname Didcot
________5. Which command will show the configuration currently held in NVRAM?
A. show RAM C. show running-config
B. show startup-config D. show version
________7. What command will remove the saved configuration in the NVRAM?
A. delete nvram C. erase running-config
B. erase startup-config D. delete startup-config
A. The command was given at the wrong prompt and has not taken effect.
B. The interface is administratively shut down.
C. The command int fa 0/0 is ambiguous and needs to be given in full.
D. The subnet mask is not valid.
________9. Which command would be the best choice to identify the problem in the
previous question?
A. show int fa 0/0 C. show version
B. show interfaces serial D. show startup-config
________10. Which mode will let you give the show run command?
A. user EXEC mode C. router configuration mode
B. privileged EXEC mode D. global configuration mode
________11. When would you need to configure a clock rate on the interface of a lab
router?
A. When the interface is a DTE serial interface.
B. When the interface is a DCE serial interface.
C. When the interface is a FastEthernet interface.
D. When the interface is connected to another router
________12. Which command will show the intermediate routers along a path?
A. Ping C. show ip route
B. arp D. traceroute
________13. Which switch command will show a list of matching MAC addresses and switch
port numbers?
A. show mac-address-table C. show interfaces
B. show mac addresses D. show mac interfaces