Chapter 2. Configuring a Network Operating System

Objectives

Upon completion of this chapter, you will be able to answer the following questions:

Image What is the purpose of Cisco IOS software?

Image How is Cisco IOS software used to access and configure network devices?

Image What is the command structure of Cisco IOS software?

Image How are hostnames configured on a Cisco IOS device using the CLI?

Image Which commands are used to save the running configuration?

Image How do devices communicate across network media?

Image How is an IP address applied to a network device?

Image How is connectivity verified between two end devices on a network?

Key Terms

This chapter uses the following key terms. You can find the definitions in the Glossary.

Internetwork Operating System (IOS) page 56

Cisco IOS page 57

out-of-band access page 59

Telnet page 60

Secure Shell (SSH) page 60

auxiliary (AUX) port page 61

user EXEC mode page 63

CLI prompt page 63

privileged EXEC 63

global configuration mode page 64

command page 67

argument page 67

Cisco IOS Command Reference page 68

context-sensitive help page 70

show command page 74

hostname page 78

enable password page 79

enable secret page 79

console password page 79

VTY password page 79

banner motd page 83

IP addresses page 88

subnet mask page 89

network media page 89

Ethernet page 89

virtual interfaces page 90

default gateway page 91

DNS server page 91

Dynamic Host Configuration Protocol (DHCP) page 91

Introduction (2.0.1.1)

Networks are made up of many devices. End-user devices, such as PCs and laptops, are connected to computer networks through network switches, creating the local network. To send packets beyond the local network, network switches connect to network routers. Other devices on a network include wireless access points and security devices, such as firewalls. Each device is very different in hardware, use, and capability. But in all cases, it is the operating system that enables the hardware to function.

Operating systems are used on virtually all end-user and network devices connected to the Internet. End-user devices include devices such as smart phones, tablets, PCs, and laptops. Network devices, or intermediary devices, are devices used to transport data across the network. Network devices include switches, routers, wireless access points, and firewalls. The operating system on a network device is known as a network operating system.

The Cisco Internetwork Operating System (IOS) is a generic term for the collection of network operating systems used on Cisco networking devices. Cisco IOS is used for most Cisco devices regardless of the type or size of the device.

This chapter will reference a basic network topology, consisting of two switches and two PCs, to demonstrate the use of Cisco IOS.


Image

Class Activity 2.0.1.2: It Is Just an Operating System!

In this activity you will learn about the relationship between text commands in the IOS and the spoken language. To do this you will design a set of commands for specific tasks.


IOS Bootcamp (2.1)

In this section you will learn the essentials of the Cisco IOS.

Cisco IOS (2.1.1)

The Cisco Internetwork Operating System (IOS) is the operating system that runs routers and switches.

Purpose of OS (2.1.1.1)

Network operating systems are in many ways similar to the operating systems of PCs. An operating system performs a number of technical functions “behind the scenes” that enable a user to

Image Use a mouse

Image View output on a monitor

Image Enter text commands

Image Select options within a dialog box window

The “behind the scenes” functions for switches and routers are very similar. The IOS on a switch or router provides the network technician with an interface. The technician can enter commands to configure, or program, the device to perform various networking functions. The IOS operational details vary on internetworking devices, depending on the purpose of the device and the features supported.

Cisco IOS is a term that encompasses a number of different operating systems that run on various networking devices. There are many distinct variations of Cisco IOS:

Image IOS for switches, routers, and other Cisco networking devices

Image IOS numbered versions for a given Cisco networking device

Image IOS feature sets providing distinct packages of features and services

Just as a PC may be running Microsoft Windows 8 and a MacBook may be running OS X, a Cisco networking device runs a particular version of the Cisco IOS. The version of IOS is dependent on the type of device being used and the required features. Although all devices come with a default IOS and feature set, it is possible to upgrade the IOS version or feature set in order to obtain additional capabilities.

In this course, you will focus primarily on Cisco IOS Release 15.x.

Location of the Cisco IOS (2.1.1.2)

The IOS file itself is several megabytes in size and is stored in a semi-permanent memory area called flash. Flash memory provides non-volatile storage. This means that the contents of the memory are not lost when the device loses power. Although the contents of flash are not lost during a loss of power, they can be changed or overwritten if needed. This allows the IOS to be upgraded to a newer version or to have new features added without replacing hardware. Additionally, flash can be used to store multiple versions of IOS software at the same time.

In many Cisco devices, the IOS is copied from flash into random-access memory (RAM) when the device is powered on. The IOS then runs from RAM when the device is operating. RAM has many functions, including storing data that is used by the device to support network operations. Running the IOS in RAM increases performance of the device; however, RAM is considered volatile memory because data is lost during a power cycle. A power cycle is when a device is purposely or accidently powered off and then powered back on, as shown in Figure 2-1.

Image

Figure 2-1 NVRAM and RAM Work Together in an IOS Device.

The quantity of flash memory and RAM memory required for a given IOS varies dramatically. For the purposes of network maintenance and planning, it is important to determine the flash and RAM requirements for each device, including the maximum flash and RAM configurations. It is possible that the requirements of the newest versions of IOS could demand more RAM and flash than can be installed on some devices.

IOS Functions (2.1.1.3)

Cisco IOS routers and switches perform functions that network professionals depend upon to make their networks operate as expected. Major functions performed or enabled by Cisco routers and switches include

Image Providing network security

Image IP addressing of virtual and physical interfaces

Image Enabling interface-specific configurations to optimize connectivity of the respective media

Image Routing

Image Enabling quality of service (QoS) technologies

Image Supporting network management technologies

Each feature or service has an associated collection of configuration commands that allow a network technician to implement it.

The services provided by the Cisco IOS are generally accessed using a command-line interface (CLI).


Image

Video 2.1.1.4:

View the video in the online course for a demonstration of accessing Cisco IOS images.


Accessing a Cisco IOS Device (2.1.2)

In this section you will learn how to access the command-line interface (CLI).

Console Access Method (2.1.2.1)

There are several ways to access the CLI environment, as shown in Figure 2-2. The most common methods are

Image Console

Image Telnet or SSH

Image AUX port

Image

Figure 2-2 Accessing the Cisco IOS on a Device

Console

The console port is a management port that provides out-of-band access to a Cisco device. Out-of-band access refers to access via a dedicated management channel that is used for device maintenance purposes only. The advantage of using a console port is that the device is accessible even if no networking services have been configured, such as when performing an initial configuration of the networking device. When performing an initial configuration, a computer running terminal emulation software is connected to the console port of the device using a special cable. Configuration commands for setting up the switch or router can be entered on the connected computer.

The console port can also be used when the networking services have failed and remote access of the Cisco IOS device is not possible. If this occurs, a connection to the console can enable a computer to determine the status of the device. By default, the console conveys the device startup, debugging, and error messages. After the network technician is connected to the device, the network technician can perform any configuration commands necessary using the console session.

For many IOS devices, console access does not require any form of security, by default. However, the console should be configured with passwords to prevent unauthorized device access. In the event that a password is lost, there is a special set of procedures for bypassing the password and accessing the device. The device should also be located in a locked room or equipment rack to prevent unauthorized physical access.

Telnet, SSH, and AUX Access Methods (2.1.2.2)

A console connection requires physical access to a device. In this section you will learn how to remotely access devices.

Telnet

Telnet is a method for remotely establishing a CLI session of a device, through a virtual interface, over a network. Unlike the console connection, Telnet sessions require active networking services on the device. The network device must have at least one active interface configured with an Internet address, such as an IPv4 address. Cisco IOS devices include a Telnet server process that enables users to enter configuration commands from a Telnet client. In addition to supporting the Telnet server process, the Cisco IOS device also contains a Telnet client. This allows a network administrator to telnet from the Cisco device CLI to any other device that supports a Telnet server process.

SSH

The Secure Shell (SSH) protocol provides a remote login similar to Telnet, except that it uses more secure network services. SSH provides stronger password authentication than Telnet and uses encryption when transporting session data. This keeps the user ID, password, and the details of the management session private. As a best practice, use SSH instead of Telnet whenever possible.

Most versions of Cisco IOS include an SSH server. In some devices, this service is enabled by default. Other devices require the SSH server to be enabled manually. IOS devices also include an SSH client that can be used to establish SSH sessions with other devices.

AUX

An older way to establish a CLI session remotely is via a telephone dialup connection using a modem connected to the auxiliary (AUX) port of a router. Similar to the console connection, the AUX method is also an out-of-band connection and does not require any networking services to be configured or available on the device. In the event that network services have failed, it may be possible for a remote administrator to access the switch or router over a telephone line.

The AUX port can also be used locally, like the console port, with a direct connection to a computer running a terminal emulation program. However, the console port is preferred over the AUX port for troubleshooting because it displays startup, debugging, and error messages by default.


Note

Cisco Catalyst switches do not support an auxiliary connection.


Terminal Emulation Programs (2.1.2.3)

There are a number of excellent terminal emulation programs available for connecting to a networking device either by a serial connection over a console port or by a Telnet/SSH connection. Some of these include

Image PuTTY

Image Tera Term

Image SecureCRT

Image HyperTerminal

Image OS X Terminal

These programs enable you to enhance your productivity by adjusting window sizes, changing font sizes, and changing color schemes.


Image

Activity 2.1.2.4: Accessing Devices

Go to the online course to perform this access method practice activity.


Navigating the IOS (2.1.3)

This section will introduce the different modes of operation in the Cisco IOS.

Cisco IOS Modes of Operation (2.1.3.1)

After a network technician is connected to a device, it is possible to configure it. The network technician must navigate through various modes of the IOS. The Cisco IOS modes are quite similar for switches and routers. The CLI uses a hierarchical structure for the modes.

In hierarchical order from most basic to most specialized, as shown in Figure 2-3, the major modes are

Image User executive (user EXEC) mode

Image Privileged executive (privileged EXEC) mode

Image Global configuration mode

Image Other specific configuration modes, such as interface configuration mode

Image

Figure 2-3 IOS Mode Hierarchical Structure with Typical Prompts and Features

Each mode has a distinctive prompt and is used to accomplish particular tasks with a specific set of commands that are available only to that mode. For example, global configuration mode allows a technician to configure settings on the device that affect the device as a whole, such as configuring a name for the device. However, a different mode is required if the network technician wants to configure security settings on a specific port on a switch, for example. In this case, the network technician must enter interface configuration mode for that specific port. All configurations that are entered in interface configuration mode apply only to that port.

The hierarchical structure can be configured to provide security. Different authentication can be required for each hierarchical mode. This controls the level of access that network personnel can be granted.

Primary Modes (2.1.3.2)

The two primary modes of operation are user EXEC mode and privileged EXEC mode. As a security feature, the Cisco IOS software separates the EXEC sessions into two levels of access. As shown in Figure 2-3, the privileged EXEC mode has a higher level of authority in what it allows the user to do with the device. Refer to this figure as you read about modes in this section and section 2.1.3.3, “Global Configuration Mode and Submodes.”

User EXEC Mode

The user EXEC mode has limited capabilities but is useful for some basic operations. The user EXEC mode is at the most basic level of the modal hierarchical structure. This mode is the first mode encountered upon entrance into the CLI of an IOS device.

The user EXEC mode allows only a limited number of basic monitoring commands. This is often referred to as view-only mode. The user EXEC level does not allow the execution of any commands that might change the configuration of the device.

By default, there is no authentication required to access the user EXEC mode from the console. However, it is a good practice to ensure that authentication is configured during the initial configuration.

The user EXEC mode is identified by the CLI prompt that ends with the > symbol. This is an example that shows the > symbol in the prompt:

Switch>

Privileged EXEC Mode

The execution of configuration and management commands requires that the network administrator use the privileged EXEC mode or a more specific mode in the hierarchy. This means that a user must enter user EXEC mode first, and from there, access privileged EXEC mode.

The privileged EXEC mode can be identified by the prompt ending with the # symbol:

Switch#

By default, privileged EXEC mode does not require authentication. It is a good practice to ensure that authentication is configured.

Global configuration mode and all other more specific configuration modes can only be reached from the privileged EXEC mode. In the “Getting Basic (2.2)” section of this chapter, we will examine device configuration and some of the configuration modes.

Global Configuration Mode and Submodes (2.1.3.3)

Global configuration mode and interface configuration modes can only be reached from the privileged EXEC mode.

Global Configuration Mode

The primary configuration mode is called global configuration mode, or simply global config mode. From global configuration mode, CLI configuration changes are made that affect the operation of the device as a whole. The global configuration mode is accessed before accessing specific configuration modes.

The following CLI command is used to take the device from privileged EXEC mode to the global configuration mode and to allow entry of configuration commands from a terminal:

Switch# configure terminal

After the command is executed, the prompt changes to show that the switch is in global configuration mode:

Switch(config)#

Specific Configuration Modes

From the global configuration mode, the user can enter different subconfiguration modes. Each of these modes allows the configuration of a particular part or function of the IOS device. The following list shows a few of them:

Image Interface mode: To configure one of the network interfaces (Fa0/0, S0/0/0)

Image Line mode: To configure one of the physical or virtual lines (console, AUX, VTY)

To exit a specific configuration mode and return to global configuration mode, enter exit at a prompt. To leave configuration mode completely and return to privileged EXEC mode, enter end or use the key sequence Ctrl-Z.

Command Prompts

When using the CLI, the mode is identified by the command-line prompt that is unique to that mode. By default, every prompt begins with the device name. Following the name, the remainder of the prompt indicates the mode. For example, the default prompt for the global configuration mode on a switch would be

Switch(config)#

As commands are used and modes are changed, the prompt changes to reflect the current context, as shown in Figure 2-4.

Image

Figure 2-4 Global Configuration Mode and Submodes

Navigating Between IOS Modes (2.1.3.4, 2.1.3.5)

Navigating between modes provides access to different command menus.

Moving Between the User EXEC and Privileged EXEC Modes

The enable and disable commands are used to change the CLI between the user EXEC mode and the privileged EXEC mode, respectively.

In order to access the privileged EXEC mode, use the enable command. The privileged EXEC mode is sometimes called the enable mode.

The syntax for entering the enable command is

Switch> enable

This command is executed without the need for an argument or keyword. After the Enter key is pressed, the prompt changes to

Switch#

The # at the end of the prompt indicates that the switch is now in privileged EXEC mode.

If password authentication is configured for the privileged EXEC mode, the IOS prompts for the password. For example:

Switch> enable
Password: (enter appropriate password)
Switch#

The disable command is used to return from the privileged EXEC to the user EXEC mode. For example:

Switch# disable
Switch>

As Figure 2-4 shows, the commands for accessing the privileged EXEC mode and for returning to the user EXEC mode on a Cisco router are identical to those used on a Cisco switch.

Moving from and to Global Configuration Mode and Submodes

To quit from the global configuration mode and return to the privileged EXEC mode, enter the exit command.

Note that entering the exit command in privileged EXEC mode causes the console session to be ended. That is, upon entering exit in privileged EXEC mode, you will be presented with the screen that you see when you first initiate a console session. At this screen you have to press the Enter key to enter user EXEC mode.

To move from any submode of the global configuration mode to the mode one step above it in the hierarchy of modes, enter the exit command.

To move from any submode of the privileged EXEC mode to the privileged EXEC mode, enter the end command or enter the key combination Ctrl-Z.

To move from any submode of the global configuration mode to another “immediate” submode of the global configuration mode, simply enter the corresponding command that is normally entered from global configuration mode. The video demonstration in Activity 2.1.3.6 shows these commands and the resulting prompts.


Image

Video 2.1.3.6:

View the video in the online course for a demonstration of navigation through the different CLI command modes of both a router and a switch using Cisco IOS.


The Command Structure (2.1.4)

Configuring a routing or switching device using the CLI requires specific command syntax.

IOS Command Structure (2.1.4.1)

This section covers the basics of configuring commands in the IOS.

Basic IOS Command Structure

A Cisco IOS device supports many commands. Each IOS command has a specific format or syntax and can only be executed at the appropriate mode. The general syntax for a command is the command followed by any appropriate keywords and arguments. Some commands include a subset of keywords and arguments that provide additional functionality. Commands are used to execute an action, and the keywords are used to identify where or how to execute the command.

As shown in Figure 2-5, the command is the initial word or words entered in the command line following the prompt. The commands are not case-sensitive. Following the command are one or more keywords and arguments. After entering each complete command, including any keywords and arguments, press the Enter key to submit the command to the command interpreter.

Image

Figure 2-5 Basic IOS Command Structure

The keywords describe specific parameters to the command interpreter. For example, the show command is used to display information about the device. This command has various keywords that must be used to define what particular output should be displayed. For example:

Switch# show running-config

The command show is followed by the keyword running-config. The keyword specifies that the running configuration is to be displayed as the output.

IOS Command Conventions

A command might require one or more arguments. Unlike a keyword, an argument is generally not a predefined word. An argument is a value or variable defined by the user. To determine the keywords and arguments required for a command, refer to the command syntax. The syntax provides the pattern or format that must be used when entering a command.

For instance, the syntax for using the description command is

Switch(config-if)# description string

As shown in the syntax, boldface text indicates commands and keywords that are typed as shown, and italic text indicates an argument for which you supply the value. For the description command, the argument is a string value. The string value can be any text string of up to 80 characters.

Therefore, when applying a description to an interface with the description command, enter a line such as this:

Switch(config-if)# description MainHQ Office Switch

The command is description and the user-defined argument is MainHQ Office Switch.

The following examples demonstrate some conventions used to document and use IOS commands.

For the ping command, the syntax is

Switch> ping IP address

Following is an example with values:

Switch> ping 10.10.10.5

The command is ping and the user-defined argument is 10.10.10.5.

Similarly, the syntax for entering the traceroute command is

Switch> traceroute IP address

Following is an example with values:

Switch> traceroute 192.168.254.254

The command is traceroute and the user-defined argument is 192.168.254.254.

Cisco IOS Command Reference (2.1.4.2)

The Cisco IOS Command Reference is a collection of online documentation that describes in detail the IOS commands used on Cisco devices. The Command Reference is the ultimate source of information for a particular IOS command, similar to how a dictionary is the ultimate source for information about a particular word.

The Command Reference is a fundamental resource that network engineers use to check various characteristics of a given IOS command. Some of the more common characteristics are

Image Syntax: The most detailed version of the syntax for a command that can be found

Image Default: The manner in which the command is implemented on a device with a default configuration

Image Mode: The configuration mode on the device where the command is entered

Image History: Descriptions of how the command is implemented relative to the IOS version

Image Usage Guidelines: Guidelines describing specifically how to implement the command

Image Examples: Useful examples that illustrate common scenarios that use the command

Image

To navigate to the Command Reference and find a particular command, follow these steps:

Step 1. Go to www.cisco.com.

Step 2. Click Support.

Step 3. Click Networking Software (IOS & NX-OS).

Step 4. Click 15.2M&T (for example).

Step 5. Click Reference Guides.

Step 6. Click Command References.

Step 7. Click the particular technology that encompasses the command you are referencing.

Step 8. Click the link on the left that alphabetically matches the command you are referencing.

Step 9. Click the link for the command.

For example, the description command is found under the Cisco IOS Interface and Hardware Component Command Reference, under the link for the alphabetic range D through E.


Note

You can download complete PDF versions of the command references for a particular technology from links on the page that you reach after completing Step 7.


Context-Sensitive Help (2.1.4.3)

The IOS has several forms of help available:

Image Context-sensitive help

Image Command syntax check

Image Hot keys and shortcuts

This section discusses context-sensitive help. The following two sections discuss the other forms of help, in turn.

The context-sensitive help provides a list of commands and the arguments associated with those commands within the context of the current mode. To access context-sensitive help, enter a question mark, ?, at any prompt. There is an immediate response without the need to use the Enter key.

One use of context-sensitive help is to get a list of available commands. You can use the list when you are unsure of the name for a command or you want to see if the IOS supports a particular command in a particular mode.

For example, to list the commands available at the user EXEC level, enter a question mark, ?, at the Switch> prompt.

Another use of context-sensitive help is to display a list of commands or keywords that start with a specific character or characters. After entering a character sequence, if a question mark is immediately entered, without a space, the IOS will display a list of commands or keywords for this context that start with the characters that were entered.

For example, enter sh? to get a list of commands that begins with the character sequence sh.

A final type of context-sensitive help is used to determine which options, keywords, or arguments are matched with a specific command. When entering a command, enter a space followed by a ? to determine what can or should be entered next.

As shown in Figure 2-6, after typing the command clock set 19:50:00, you can enter the ? to determine the additional options or keywords available for this command.

Image

Figure 2-6 Context-Sensitive Help

Command Syntax Check (2.1.4.4)

When a command is submitted by pressing the Enter key, the command-line interpreter parses the command from left to right to determine what action is being requested. The IOS generally only provides negative feedback, as shown in Figure 2-7. If the interpreter understands the command, the requested action is executed and the CLI returns to the appropriate prompt. However, if the interpreter cannot understand the command being entered, it will provide feedback describing what is wrong with the command:

Image Ambiguous command

Image Incomplete command

Image Incorrect command

Image

Figure 2-7 Syntax Error Messages

Hot Keys and Shortcuts (2.1.4.5)

The IOS CLI provides hot keys and shortcuts that make configuring, monitoring, and troubleshooting easier.

The following shortcuts are worthy of special note:

Image Tab: Completes a partially typed command or keyword

Image Ctrl-Z: Exits the configuration mode and returns to user EXEC mode

Image Ctrl-R: Redisplays a line

Image Down Arrow: Allows the user to scroll forward through former commands

Image Up Arrow: Allows the user to scroll backward through former commands

Image Ctrl-Shift-6: Interrupts an IOS process such as ping or traceroute

Image Ctrl-C: Exits the configuration mode or aborts the current command

Image Ctrl-A: Moves to the beginning of the line

Image Ctrl-E: Moves to the end of the line

Some of these shortcuts are examined in more detail next, followed by a quick overview of abbreviating commands and keywords.

Tab

It is possible to use the Tab key to complete the remainder of abbreviated commands and parameters if the abbreviation contains enough letters to be different from any other currently available commands or parameters. When enough of the command or keyword has been entered to appear unique, press the Tab key and the CLI will display the rest of the command or keyword.

This is a good technique to use when you are learning because it enables you to see the full word used for the command or keyword.

Ctrl-R

Use Ctrl-R to redisplay the previous line typed. For example, you may find that the IOS is returning a message to the CLI just as you are typing a line. You can use Ctrl-R to refresh the line and avoid having to retype it.

In this example, a message regarding a failed interface is returned in the middle of a command:

Switch# show mac-
16w4d: %LINK-5-CHANGED: Interface FastEthernet0/10, changed state to down
16w4d: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed
   state to down

To redisplay to the line that you were typing, use Ctrl-R:

Switch# show mac

Ctrl-Z

Use Ctrl-Z to leave any configuration mode and return to privileged EXEC mode. Because the IOS has a hierarchical mode structure, 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.

Up Arrow and Down Arrow

The Cisco IOS software buffers several past commands and characters so that entries can be recalled. The buffer is useful for re-entering commands without retyping.

Key sequences are available to scroll through these buffered commands. Use the Up Arrow key (Ctrl-P) to display the previously entered commands. Each time you press this key, the next successively older command will be displayed. Use the Down Arrow key (Ctrl-N) to scroll forward through the history to display the more recent commands.

Ctrl-Shift-6

The escape sequence Ctrl-Shift-6 interrupts any running process. When an IOS process is initiated from the CLI, such as a ping or traceroute, the command runs until it is complete or is interrupted. While the process is running, the CLI is unresponsive. To interrupt the output and interact with the CLI, press Ctrl-Shift-6.

Ctrl-C

Press Ctrl-C to interrupt the entry of a command and exit the configuration mode. This is useful after entering a command that needs to be cancelled.

Abbreviated Commands or Keywords

Commands and keywords can be abbreviated to the minimum number of characters that identify a unique selection. For example, the configure command can be abbreviated to conf because configure is the only command that begins with conf. An abbreviation of con will not work because more than one command begins with con.

Keywords can also be abbreviated.

As another example, show interfaces can be abbreviated like this:

Switch# show interfaces
Switch# show int

You can abbreviate both the command and the keywords; for example:

Switch# sh int

IOS Examination Commands (2.1.4.6)

In order to verify and troubleshoot network operation, you must examine the operation of the devices. The basic examination command is the show command.

There are many different variations of this command. As you develop more skill with the IOS, you will learn to use and interpret the output of the show commands. Use the show ? command to get a list of available commands in a given context, or mode.

A typical show command can provide information about the configuration, operation, and status of parts of a Cisco switch or router. Figure 2-8 highlights some of the common IOS commands.

Image

Figure 2-8 show Commands Can Provide Information About the Operation and Status of Parts of a Cisco Router or Switch.

In this course, we focus mostly on basic show commands.

A very commonly used show command is show interfaces. This command 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 type and slot/port number. For example:

Switch# show interfaces fastethernet 0/1

Some other show commands frequently used by network technicians include

Image show startup-config: Displays the saved configuration located in NVRAM

Image show running-config: Displays the contents of the currently running configuration file

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. When a --More-- prompt appears, press the Spacebar to view the next portion of output. To display only the next line, press the Enter key. If any other key is pressed, the output is cancelled and you are returned to the prompt.

The show version Command (2.1.4.7)

One of the most commonly used commands on a switch or router is

Switch# show version

This command displays information about the currently loaded IOS version, along with hardware and device information. If you are logged into a router or switch remotely, the show version command is an excellent means of quickly finding useful summary information about the particular device to which you are connected. Some of the information points shown from this command are

Image Software version: IOS software version (stored in flash)

Image Bootstrap version: Bootstrap version (stored in Boot ROM)

Image System up-time: Time since last reboot

Image System restart info: Method of restart (e.g., power cycle, crash)

Image Software image name: IOS filename stored in flash

Image Router type and processor type: Model number and processor type

Image Memory type and allocation (shared/main): Main Processor RAM and Shared Packet I/O buffering

Image Software features: Supported protocols/feature sets

Image Hardware interfaces: Interfaces available on the device

Image Configuration register: Sets bootup specifications, console speed setting, and related parameters


Image

Packet Tracer Activity 2.1.4.8: Navigating the IOS

In this activity you will practice skills necessary for navigating the Cisco IOS, including different user access modes, various configuration modes, and common commands you use on a regular basis. You will also practice accessing the context-sensitive help by configuring the clock command.



Image

Lab 2.1.4.9: Establishing a Console Session with Tera Term

In this lab you will access a Cisco switch through the console port. Then you will display and configure basic device settings.


Getting Basic (2.2)

In this section you will learn the basic commands for configuring routers and switches.

Hostnames (2.2.1)

Devices need to be identifiable to network administrators. This section covers assigning names to switches and routers.

Why the Switch (2.2.1.1)

As discussed, Cisco switches and Cisco routers have many similarities. They support similar operating systems, similar command structures, and many of the same commands. In addition, both devices have identical initial configuration steps.

However, a Cisco IOS switch is one of the simplest devices that can be configured on a network. This is because there are no configurations that are required prior to the device functioning. At its most basic, a switch can be plugged in with no configuration and will still switch data between connected devices.

A switch is also one of the fundamental devices used in the creation of a small network. By connecting two PCs to a switch, those PCs will instantly have connectivity with one another.

For these reasons, the remainder of this chapter will focus on the creation of a small, two-PC network connected via a switch configured with initial settings. Initial settings include setting a name for the switch, limiting access to the device configuration, configuring banner messages, and saving the configuration.

Device Names (2.2.1.2)

When configuring a networking device, one of the first steps is to configure a unique device name, or hostname. Hostnames appear in CLI prompts, can be used in various authentication processes between devices, and should be used on topology diagrams.

If a device name is not explicitly configured, a factory-assigned default device name is used by Cisco IOS. The default name for a Cisco IOS switch is “Switch.”

Imagine if an internetwork had several switches that were all named with the default name Switch. This could create considerable confusion during network configuration and maintenance. When accessing a remote device using SSH, it is important to have confirmation that you are connected to the proper device, as shown in Figure 2-9. If all devices were left with their default names, it would be difficult to identify that the proper device is connected.

Image

Figure 2-9 Names Make Network Devices Easy to Identify for Configuration and Maintenance Purposes.

By choosing names wisely, it is easier to remember, discuss, document, and identify network devices. To name devices in a consistent and useful way requires the establishment of a naming convention that spans the company or, at least, the location. It is a good practice to create the naming convention at the same time as the addressing scheme to allow for continuity within an organization.

Some guidelines for naming conventions are that names should

Image Start with a letter

Image Contain no spaces

Image End with a letter or digit

Image Use only letters, digits, and dashes

Image Be less than 64 characters in length

The hostnames used in the device IOS preserve capitalization and lowercase characters. Therefore, you can capitalize a name as you ordinarily would. This contrasts with most Internet naming schemes, where uppercase and lowercase characters are treated identically.

Hostnames (2.2.1.3)

A hostname allows a device to be identified by network administrators over a network or the Internet.

Applying Names Example

Let’s use the example previously shown in Figure 2-9 of three switches connected together in a network, spanning three different floors. To create a naming convention for switches, take into consideration the location and the purpose of the devices. In Figure 2-9 we have named the three switches as Sw-Floor-1, Sw-Floor-2, and Sw-Floor-3. In the network documentation, we would include these names, and the reasons for choosing them, to ensure continuity in our naming convention as devices are added.

After the naming convention has been identified, the next step is to apply the names to the devices using the CLI.

Configuring Hostnames (2.2.1.4)

From the privileged EXEC mode, access the global configuration mode by entering the configure terminal command:

Switch# configure terminal

After the command is executed, the prompt will change to

Switch(config)#

In the global configuration mode, enter the hostname (again using the example shown in Figure 2-9):

Switch(config)# hostname Sw-Floor-1

After the command is executed, the prompt will change to

Sw-Floor-1 (config)#

Notice that the hostname appears in the prompt. To exit global configuration mode, use the exit command.

Always make sure that your documentation is updated each time a device is added or modified. Identify devices in the documentation by their location, purpose, and address.


Note

To undo the effects of a command, preface the command with the no keyword.

For example, to remove the name of a device, use

Sw-Floor-1 (config)# no hostname
Switch(config)#

Notice that the no hostname command caused the switch to revert to the default hostname of Switch.



Image

Activity 2.2.1.4: Entering the Hostname

Go to the online course to practice entering a hostname on a switch.


Limiting Access to Device Configurations (2.2.2)

This section describes methods for securing a network device.

Securing Device Access (2.2.2.1)

Physically limiting access to network devices by placing them in closets and locked racks is good practice; however, passwords are the primary defense against unauthorized access to network devices. Every device, even home routers, should have locally configured passwords to limit access. Later, we will introduce how to strengthen security by requiring a username along with a password. For now, we will present basic security precautions using only passwords.

As discussed previously, the IOS uses hierarchical modes to help with device security. As part of this security enforcement, the IOS can accept several passwords to allow different access privileges to the device.

The passwords introduced here are

Image Enable password: Limits access to the privileged EXEC mode

Image Enable secret: Encrypted, limits access to the privileged EXEC mode

Image Console password: Limits device access using the console connection

Image VTY password: Limits device access over Telnet

As good practice, use different authentication passwords for each of these levels of access. Although logging in with multiple and different passwords is inconvenient, it is a necessary precaution to properly protect the network infrastructure from unauthorized access.

Additionally, use strong passwords that are not easily guessed. The use of weak or easily guessed passwords continues to be a security issue in many facets of the business world.

Consider these key points when choosing passwords:

Image Use passwords that are more than 8 characters in length

Image Use a combination of upper- and lowercase letters, numbers, special characters, and/or numeric sequences in passwords

Image Avoid using the same password for all devices

Image Avoid using common words, such as “password” or “administrator,” because these are easily guessed


Note

In most of the labs in this course, we will be using simple passwords such as cisco or class. These passwords are considered weak and easily guessable and should be avoided in a work environment. We only use these passwords for convenience in a classroom setting or to illustrate configuration examples.


Securing Privileged EXEC Access (2.2.2.2)

To secure privileged EXEC access, use the enable secret password command. An older, less secure variation of this command is the enable password password command. Although either of these commands can be used to establish authentication before access to privileged EXEC (enable) mode is permitted, it is recommended to use the enable secret command. The enable secret command provides greater security because the password is encrypted.

Following is an example command to set passwords:

Switch(config)# enable secret class

The example in Figure 2-10 illustrates how a password is not requested when the enable command is first used. Next, the enable secret class command is configured, which secures privileged EXEC access. Notice that, for security reasons, the password is not displayed when it is being entered.

Image

Figure 2-10 Limiting Device Access with an Encrypted Password

Securing User EXEC Access (2.2.2.3)

The console port of network devices must be secured, at a bare minimum, by requiring the user to supply a strong password. This reduces the chance of unauthorized personnel physically plugging a cable into the device and gaining device access.

The following commands are used in global configuration mode to set a password for the console line:

Switch(config)# line console 0
Switch(config-line)# password cisco
Switch(config-line)# login

From global configuration mode, the command line console 0 is used to enter line configuration mode for the console. The 0 is used to represent the first (and in most cases only) console interface.

The second command, password cisco, specifies a password for the console line.

The login command configures the switch to require authentication upon login. When login is enabled and a password is set, the console user will be prompted to enter a password before gaining access to the CLI.

VTY Password

The vty lines allow access to a Cisco device via Telnet. By default, many Cisco switches support up to 16 vty lines, numbered 0 to 15. The number of vty lines supported on a Cisco router varies with the type of router and the IOS version. However, five is the most common number of vty lines configured. These lines are numbered 0 to 4 by default, though additional lines can be configured. 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.

Following are some example commands used to set a password on vty lines:

Switch(config)# line vty 0 15
Switch(config-line)# password cisco
Switch(config-line)# login

By default, the IOS includes the login command on the vty lines. This prevents Telnet access to the device without authentication. If, by mistake, the no login command is set, which removes the requirement for authentication, unauthorized persons could connect across the network to the line using Telnet. This would be a major security risk.

Figure 2-11 illustrates securing the user EXEC access on the console and Telnet lines.

Image

Figure 2-11 Limiting Device Console and Telnet Access

Encrypting Password Display (2.2.2.4)

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. The service password-encryption command applies weak encryption to all unencrypted passwords. This encryption applies only to passwords in the configuration file, not to passwords as they are sent over media. The purpose of this command is to keep unauthorized individuals from viewing passwords in the configuration file.

If you execute the show running-config or show startup-config command prior to the service password-encryption command being executed, the unencrypted passwords are visible in the configuration output. The service password-encryption command can then be executed and the encryption will be applied to the passwords. After the encryption has been applied, removing the encryption service does not reverse the encryption.


Image

Activity 2.2.2.4: Entering Password Encryption

Go to the online course to practice password encryption on a switch.


Banner Messages (2.2.2.5)

Although requiring passwords is one way to keep unauthorized personnel out of a network, it is vital to provide a method for declaring that only authorized personnel should attempt to gain entry into the device. To do this, add a banner to the device output.

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.

The exact content or wording of a banner depends on the local laws and corporate policies. Here are some examples of information to include in a banner:

Image “Use of the device is specifically for authorized personnel.”

Image “Activity may be monitored.”

Image “Legal action will be pursued for any unauthorized use.”

Because banners can be seen by anyone who attempts to log in, the message must be worded very carefully. Any wording that implies that a login is “welcome” or “invited” is not appropriate. If a person disrupts the network after gaining unauthorized entry, proving liability will be difficult if there is the appearance of an invitation.

The creation of banners is a simple process; however, banners should be used appropriately. When a banner is utilized, it should never welcome someone to the device. It should detail that only authorized personnel are allowed to access the device. Further, the banner can include scheduled system shutdowns and other information that affects all network users.

The IOS provides multiple types of banners. One common banner is the message of the day (MOTD). It is often used for legal notification because it is displayed to all connected terminals.

Configure MOTD using the banner motd command from global configuration mode.

The banner motd command requires the use of delimiters to identify the content of the banner message. The banner motd command is followed by a space and a delimiting character. Then, one or more lines of text are entered to represent the banner message. A second occurrence of the delimiting character denotes the end of the message. The delimiting character can be any character as long as it does not occur in the message. For this reason, symbols such as # are often used.

The syntax to configure a MOTD from global configuration mode is

Switch(config)# banner motd # message #

After the command is executed, the banner will be displayed on all subsequent attempts to access the device until the banner is removed.

The example in Figure 2-12 illustrates a banner configured with the delimiting “#” symbol. Notice how the banner is now displayed when accessing the switch.

Image

Figure 2-12 Configuring the Banner MOTD

Saving Configurations (2.2.3)

This section describes how to manage configuration files.

Configuration Files (2.2.3.1)

The running configuration file reflects the current configuration applied to a Cisco IOS device. It contains the commands used to determine how the device operates on the network, as shown in Figure 2-13. Modifying a running configuration affects the operation of a Cisco device immediately.

Image

Figure 2-13 Saving the Running Configuration

The running configuration file is stored in the working memory of the device, or RAM. This means that the running configuration file is temporarily active while the Cisco device is running (powered on). However, if power to the device is lost or if the device is restarted, all configuration changes will be lost unless they have been saved.

After making changes to a running configuration file, consider these distinct options:

Image Return the device to its original configuration

Image Remove all configurations from the device

Image Make the changed configuration the new startup configuration

The startup configuration file reflects the configuration that will be used by the device upon reboot. The startup configuration file is stored in NVRAM. When a network device has been configured and the running configuration has been modified, it is important to save those changes to the startup configuration file. Doing so prevents changes from being lost due to power failure or a deliberate restart.

Before committing to the changes, use the appropriate show commands to verify the device’s operation. As shown in Figure 2-13, the show running-config command can be used to see a running configuration file. When the changes are verified to be correct, use the copy running-config startup-config command at the privileged EXEC mode prompt. The command to save the running configuration to the startup configuration file is

Switch# copy running-config startup-config

After being executed, the running configuration file updates the startup configuration file.

If the changes made to the running configuration do not have the desired effect, it may become necessary to restore the device to its 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 restarting the device using the reload command at the privileged EXEC mode prompt.

When initiating a reload, the IOS will detect that the running configuration has changes that were not saved to the startup configuration. A prompt will appear, asking you whether to save the changes made. To discard the changes, enter n or no.

An additional prompt will appear to confirm the reload. To confirm, press Enter. Pressing any other key will abort the process.

For example:

Switch# reload
System configuration has been modified. Save? [yes/no]: n
Proceed with reload? [confirm]
*Apr 13 01:34:15.758: %SYS-5-RELOAD: Reload requested by console. Reload Reason:
Reload Command.
System Bootstrap, Version 12.3(8r)T8, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 2004 by cisco Systems, Inc.
PLD version 0x10
GIO ASIC version 0x127
c1841 processor with 131072 Kbytes of main memory
Main memory is configured to 64 bit mode with parity disabled

If undesired changes are saved to the startup configuration, it may be necessary to clear all the configurations. This requires erasing the startup configuration and restarting the device.

The startup configuration is removed by using the erase startup-config command.

To erase the startup configuration file, use erase NVRAM:startup-config or erase startup-config at the privileged EXEC mode prompt:

Switch# erase startup-config

After the command is issued, the switch will prompt you for confirmation:

Erasing the nvram filesystem will remove all configuration files!
Continue? [confirm]

Confirm is the default response. To confirm and erase the startup configuration file, press Enter. Pressing any other key will abort the process.


Caution

Exercise caution when using the erase command. This command can be used to erase any file in the device. Improper use of the command can erase the IOS itself or another critical file.


On a switch, you must also issue the delete vlan.dat command in addition to the erase startup-config command in order to return the device to its default “out-of-the-box” configuration (comparable to a factory reset):

Switch# delete vlan.dat
Delete filename [vlan.dat]?
Delete flash:vlan.dat? [confirm]
Switch# erase startup-config
Erasing the nvram filesystem will remove all configuration files! Continue? [con-
   firm]
[OK]
Erase of nvram: complete
Switch#

After removing the startup configuration from NVRAM (and deleting the vlan.dat file in the case of a switch), reload the device to remove the current running configuration file from RAM. The device will then load the default startup configuration that was originally shipped with the device into the running configuration.


Image

Activity 2.2.3.1: Saving the Running Configuration to RAM

Go to the online course to practice the configuration activity. The activity is located on the second graphic on the page.


Capturing Text (2.2.3.2)

Capturing text means to create a copy of output to analyze or save a backup copy.

Backup Configurations with Text Capture

In addition to saving running configurations to the startup configuration, configuration files can also be saved and archived to a text document. This sequence of steps ensures that a working copy of the configuration files is available for editing or reuse later.

Image

Configuration files can be saved and archived to a text document using Tera Term. The steps are as follows:

Step 1. On the File menu, click Log.

Step 2. Choose the location. Tera Term will begin capturing text.

Step 3. After 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.

Step 4. When the capture is complete, click Close in the Tera Term: Log window.

Step 5. View the output to verify that it was not corrupted.

Restoring Text Configurations

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. The file will probably require editing before copying. It is advisable to change the encrypted passwords to plain text and remove the parameter, either the number 5 or 7, which specifies that the password is encrypted. Non-command text such as “--More--” and IOS messages must be removed.

Further, at the CLI, the device must be set at the global configuration mode to receive the commands from the text file being copied.

Image

When using Tera Term, the steps are

Step 1. Edit text to remove non-commands and save.

Step 2. On the File menu, click Send File.

Step 3. Locate the file to be copied into the device and click Open.

Step 4. Tera Term will paste the file into the device.

The text in the file will be applied as commands in the CLI and become the running configuration on the device. This is a convenient method for manually configuring a device.


Image

Packet Tracer Activity 2.2.3.3: Configuring Initial Switch Settings

In this activity you will perform basic switch configurations. You will secure access to the CLI and console ports using encrypted and plain text passwords. You will also learn how to configure messages for users logging into the switch.


Address Schemes (2.3)

Network administrators need to plan their networks so that devices have IP addresses that are in the correct networks and subnets.

Ports and Addresses (2.3.1)

In this section you will learn about assigning IP addresses to devices on the network.

IP Addressing of Devices (2.3.1.1)

The use of IP addresses, whether IPv4 or IPv6, is the primary means of enabling devices to locate one another and establish end-to-end communication on the Internet. In fact, in any internetwork, IP addresses are essential for devices to communicate from source to destination and back.

Each end device on a network must be configured with IP addresses. Some examples of end devices are

Image Computers (work stations, laptops, file servers, web servers)

Image Network printers

Image VoIP phones

Image Security cameras

Image Smart phones

Image Mobile handheld devices (such as wireless barcode scanners)

The structure of an IPv4 address is called dotted decimal notation and is represented with four decimal numbers between 0 and 255. IPv4 addresses are numbers assigned to individual devices connected to a network. They are logical in nature, in that they provide information about the location of the device.

With the IP address, a subnet mask is also necessary. A subnet mask is a special type of IPv4 address that, coupled with the IP address, determines which particular subnet of a larger network the device is a member of.

IP addresses can be assigned to both physical ports and virtual interfaces on devices. A virtual interface means that there is no physical hardware on the device associated with it.

Interfaces and Ports (2.3.1.2)

Network communications depend on end-user device interfaces, networking device interfaces, and the cables that connect them.

Each physical interface has specifications, or standards, that define it; a cable connecting to the interface must be designed to match the physical standards of the interface. Types of network media include twisted-pair copper cables, fiber-optic cables, coaxial cables, and wireless. Different types of network media have different features and benefits. Not all network media has the same characteristics and is appropriate for the same purpose. Some of the differences between various types of media include

Image Distance the media can successfully carry a signal

Image Environment in which the media is to be installed

Image Amount of data the media can transmit and the speed at which it can transmit it

Image Cost of the media and installation

Not only does each link on the Internet require a specific network media type, but each link also requires a particular network technology. Ethernet is the most common local-area network (LAN) technology used today. Ethernet ports are found on end-user devices, switch devices, and other networking devices that can physically connect to the network using a cable. For a cable to connect devices using an Ethernet port, the cable must have the correct connector, an RJ-45.

Cisco IOS switches have physical ports for devices to connect to, but also have one or more switch virtual interfaces (SVIs). These are virtual interfaces because there is no physical hardware on the device associated with it; an SVI is created in software. The virtual interface provides a means to remotely manage a switch over a network using IPv4. Each switch comes with one SVI appearing in the default configuration “out-of-the-box.” The default SVI is interface VLAN1.

Addressing Devices (2.3.2)

Network devices can be configured with IP addresses on both physical and virtual interfaces.

Configuring a Switch Virtual Interface (2.3.2.1)

To access the switch remotely, an IP address and a subnet mask must be configured on the SVI:

Image IP address: Together with the subnet mask, uniquely identifies the end device on the internetwork

Image Subnet mask: Determines which part of a larger network is used by an IP address

For now the focus is IPv4; later you will explore IPv6.

You will learn the meaning behind all of these IP addresses soon, but for now the point is to quickly configure the switch to support remote access. The following command enables IP connectivity to S1, using IP address 192.168.10.2:

Image Switch(config)#interface vlan 1: This command navigates to the interface configuration mode from the global configuration mode

Image Switch(config-if)#ip address 192.168.10.2 255.255.255.0: This command configures the IP address and subnet mask for the switch (this is just one of many possible combinations for an IP address and subnet mask)

Image Switch(config-if)#no shutdown: This command administratively enables the interface to an active state

After these commands are configured, the switch has all the IP elements ready for communication over the network.


Note

The switch will still need to have one or more physical ports configured, as well as the vty lines, to complete the configuration that enables remote management of the switch.



Image

Activity 2.3.2.1: Configuring a Switch Virtual Interface

Go to the online course to perform this practice activity.


Manual IP Address Configuration for End Devices (2.3.2.2)

In order for an end device to communicate over the network, it must be configured with the correct IP address information. Much like an SVI, the end device must be configured with an IP address and subnet mask. This information is configured on the PC settings.

All of these settings must be configured on an end device in order for it to properly connect to the network. This information is configured under the PC network settings. In addition to IP address and subnet mask information, it is also possible to configure default gateway and DNS server information.

The default gateway address is the IP address of the router interface used for network traffic to exit the local network. The default gateway is an IP address that is often assigned by the network administrator and is used when traffic must be routed to another network.

The DNS server address is the IP address of the Domain Name System (DNS) server, which is used to translate IP addresses to web addresses, such as www.cisco.com. All devices on the Internet are assigned and reached via an IP address. However, it is easier for people to remember names over numbers. Therefore, websites are given names for simplicity. The DNS server is used to maintain the mapping between the IP addresses and names of various devices.

Automatic IP Address Configuration for End Devices (2.3.2.3)

IP address information can be entered into the PC manually, or using Dynamic Host Configuration Protocol (DHCP). DHCP allows end devices to have IP information automatically configured.

DHCP is a technology that is used in almost every business network. The best way to understand why DHCP is so popular is by considering all the extra work that would have to take place without it.

DHCP enables automatic IPv4 address configuration for every end device in a network with DHCP enabled. Imagine the amount of time that would be consumed if every time you connected to the network you had to manually enter the IP address, the subnet mask, the default gateway, and the DNS server. Multiply that by every user and every one of their devices on the network and you see the problem.

DHCP is an example of technology at its best. One of the primary purposes of any technology is to make it easier for users to perform the tasks they want to do or need to do. With DHCP, the end user walks into the area served by a given network, plugs in an Ethernet cable or enables a wireless connection, and they are immediately allocated the necessary IPv4 information required to fully communicate over the network.

To configure DHCP on a Windows PC, you only need to select Obtain an IP Address Automatically and Obtain DNS Server Address Automatically under the Internet Protocol (TCP/IP Properties window). Your PC will be assigned information from an IP address pool and associated IP information set up on the DHCP server.

It is possible to display the IP configuration settings on a Windows PC by using the ipconfig command at the command prompt. The output will show the IP address, subnet mask, and gateway that the PC received from the DHCP server.


Image

Activity 2.3.2.3: Verifying Windows IP Configuration

Go to the online course to perform this practice activity.


IP Address Conflicts (2.3.2.4)

If a static (manual) IP address is defined for a network device (for example, a printer), and then a DHCP server is installed, duplicate IP address conflicts may occur between the network device and a PC obtaining automatic IP addressing information from the DHCP server. The conflict also may occur if you manually define a static IP address to a network device during a network failure involving the DHCP server; after the network failure resolves and the DHCP server becomes accessible over the network, the conflict arises.

To resolve such an IP addressing conflict, convert the network device with the static IP address to a DHCP client; or on the DHCP server, exclude the static IP address of the end device from the DHCP scope.

The second solution requires that you have administrative privileges on the DHCP server and that you are familiar with configuring DHCP on a server.

You may also encounter IP addressing conflicts when manually configuring IP on an end device in a network that only uses static IP addresses. In this case you must determine which IP addresses are available on the particular IP subnet and configure accordingly. This case illustrates why it is so important for a network administrator to maintain detailed documentation, including IP address assignments, for end devices.


Note

Usually, static IP addresses are used with servers and printers in a small- to medium-sized business network, whereas employee devices use DHCP-allocated IP address information.



Image

Packet Tracer Activity 2.3.2.5: Implementing Basic Connectivity

In this activity you will first perform basic switch configurations. Then you will implement basic connectivity by configuring IP addressing on switches and PCs. When the IP addressing configuration is complete, you will use various show commands to verify configurations and use the ping command to verify basic connectivity between devices.


Verifying Connectivity (2.3.3)

After the addressing scheme is applied to devices, it is important to test all network connections.

Test the Loopback Address on an End Device (2.3.3.1)

The ping command is used to verify the internal IP configuration on a local host. This test is accomplished by using the ping command on a reserved address called the loopback (127.0.0.1). The loopback address is defined by the TCP/IP protocol as a reserved address that routes packets back to the host.

You enter ping commands into a command line on the local host using the following syntax:

C:> ping 127.0.0.1

The reply from this command would look something like this:

Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

The result indicates that four test packets of 32 bytes each were sent and returned from host 127.0.0.1 in a time of less than 1 ms. This successful ping request verifies that the network interface card, drivers, and the TCP/IP implementation are all functioning correctly.


Image

Activity 2.3.3.1: Testing the Loopback Address

Go to the online course to perform this practice activity. The activity is located on the second graphic on the page.


Testing the Interface Assignment (2.3.3.2)

In the same way that you use commands and utilities to verify a host configuration, you use commands to verify the interfaces of intermediary devices. The IOS provides commands to verify the operation of router and switch interfaces.

Verifying the Switch Interfaces

Examining S1 and S2, in Activity 2.3.3.2, you use the show ip interface brief command to verify the condition of the switch interfaces. The IP address assigned to the VLAN 1 interface on S1 is 192.168.10.2. The IP address assigned to the VLAN 1 interface on S2 is 192.168.10.3. The physical interfaces F0/1 and F0/2 on S1 are operational, as are the physical interfaces F0/1 and F0/2 on S2.


Image

Activity 2.3.3.2: Verifying VLAN Interface Assignment

Go to the online course to practice verification of a VLAN interface.


Testing End-to-End Connectivity (2.3.3.3)

After device interfaces are up on a network, the next step is to test connectivity to other network devices.

Testing PC-to-Switch Connectivity

The ping command can be used on a PC, just as on a Cisco IOS device. Activity 2.3.3.3 shows that a ping from PC1 to the IP address of the S1 VLAN 1 interface, 192.168.10.2, should be successful.

Testing End-to-End Connectivity

In Activity 2.3.3.3 you will also test connectivity between two PCs.

The IP address of PC1 is 192.168.10.10, with subnet mask 255.255.255.0, and default gateway 192.168.10.1.

The IP address of PC2 is 192.168.10.11, with subnet mask 255.255.255.0, and default gateway 192.168.10.1.

A ping from PC1 to PC2 should also be successful. A successful ping from PC1 to PC2 verifies end-to-end connectivity in the network!


Image

Activity 2.3.3.3: Testing PC-to-Switch Connectivity

Go to the online course to perform the connectivity tests.



Image

Lab 2.3.3.4: Building a Simple Network

In this lab you will set up an Ethernet network topology, configure the hosts on the network, and then configure and verify basic switch settings.



Image

Lab 2.3.3.5: Configuring a Switch Management Address

In this lab you will configure a basic network device, then verify and test network connectivity.


Summary (2.4)


Image

Class Activity 2.4.4.1: Tutor Me

You and a partner will role play, and you will explain the concepts in this chapter to your partner, who you should assume has never worked with Cisco devices before.



Image

Packet Tracer Activity 2.4.1.2: Skills Integration Challenge

In this scenario you are a recently hired LAN technician and your network manager has asked you to demonstrate your ability to configure a small LAN. Your tasks include configuring initial settings on two switches using the Cisco IOS and configuring IP address parameters on host devices to provide end-to-end connectivity.


Cisco IOS is a term that encompasses a number of different operating systems that run on various networking devices. The technician can enter commands to configure, or program, the device to perform various networking functions. Cisco IOS routers and switches perform functions that network professionals depend upon to make their networks operate as expected.

The services provided by the Cisco IOS are generally accessed using a command-line interface (CLI), which is accessed by either the console port, the AUX port, or through Telnet or SSH. When connected to the CLI, network technicians can make configuration changes to Cisco IOS devices. The Cisco IOS is designed as a modal operating system, which means a network technician must navigate through various hierarchical modes of the IOS. Each mode supports different IOS commands.

The Cisco IOS Command Reference is a collection of online documents that describe in detail the IOS commands used on Cisco devices, such as Cisco IOS routers and switches.

Cisco IOS routers and switches support a similar modal operating system, support similar command structures, and support many of the same commands. In addition, both devices have identical initial configuration steps when implementing them in a network.

This chapter introduced the Cisco IOS. It detailed the various modes of the Cisco IOS and examined the basic command structure that is used to configure it. It also walked through the initial settings of a Cisco IOS switch device, include setting a name, limiting access to the device configuration, configuring banner messages, and saving the configuration.

The next chapter explores how packets are moved across the network infrastructure and introduces you to the rules of packet communication.

Practice

The following activities provide practice with the topics introduced in this chapter. The Labs and Class Activities are available in the companion Network Basics Lab Manual (978-1-58713-313-8). The Packet Tracer Activities PKA files are found in the online course.

Image

Class Activities

Class Activity 2.0.1.2: It Is Just an Operating System!

Class Activity 2.4.4.1: Tutor Me

Image

Labs

Lab 2.1.4.9: Establishing a Console Session with Tera Term

Lab 2.3.3.4: Building a Simple Network

Lab 2.3.3.5: Configuring a Switch Management Address

Image

Packet Tracer Activities

Packet Tracer Activity 2.1.4.8: Navigating the IOS

Packet Tracer Activity 2.2.3.3: Configuring Initial Switch Settings

Packet Tracer Activity 2.3.2.5: Implementing Basic Connectivity

Packet Tracer Activity 2.4.1.2: Packet Tracer - Skills Integration Challenge

Check Your Understanding

Complete all the review questions listed here to test your understanding of the topics and concepts in this chapter. The appendix, “Answers to the ‘Check Your Understanding’ Questions,” lists the answers.

1. Which of the following do not meet standard hostname conventions for the Cisco CLI? (Choose three.)

A. Michelles Router

B. Router-A-Tom

C. Hiros1stRouter

D. greta’srouter

E. MariasReallyFantasticRouter

F. 1st Routerlogin

2. When a device using the default Cisco IOS configuration boots, which of the following sequences occurs?

A. The IOS is copied from RAM to flash.

B. The IOS is copied from NVRAM to flash.

C. The IOS is copied from flash to RAM.

D. The IOS is copied from RAM to NVRAM.

3. Which method is used to access a router or switch that has no network configuration?

A. Use an Ethernet cable to connect the PC to the Ethernet port

B. Use a console cable to connect to the console port

C. Use a serial cable to establish an SSH connection

D. Use a serial cable to connect to the auxiliary (AUX) port

4. When a device using the Cisco IOS boots (in this example, a running configuration file is present), which of the following sequences will usually occur?

A. The running configuration is copied from NVRAM to flash.

B. The startup configuration is copied from flash to RAM.

C. The running configuration is copied from RAM to NVRAM.

D. The startup configuration is copied from NVRAM to RAM.

5. Which is true about the user executive mode in the CLI?

A. It has the most restricted list of available commands.

B. It can only be accessed from the privileged executive mode.

C. Debugging and other details on network use are available.

D. By default it requires authentication for access.

6. Which prompt is used in global configuration mode?

A. Router1(config-line)#

B. Router1#

C. Router1(config)#

D. Router1(config-if)#

7. Entering the enable command

A. Will put the router or switch into global configuration mode.

B. Always requires a password.

C. Will take the router or switch out of interface configuration mode and into enable configuration mode.

D. Will put the router or switch into user EXEC mode.

8. Entering the exit command at the Router1(config-router)# prompt will result in which prompt?

A. Router1>

B. Router1#

C. Router1(config)#

D. Router1(config-if)#

9. Which best describes the argument element of a command?

A. The appropriate mode for a command.

B. A predefined command in the CLI.

C. A command variable determined by the user.

D. It precedes a keyword in the command structure.

10. When a command is followed by a space and a question mark, such as show ?, what should be the output from the switch or router?

A. A list of the previous ten commands.

B. A list of valid subcommands appropriate to the current user level.

C. Information about who is logged into the current session.

D. The command is invalid; there should be no space between the command and the question mark (show?).

11. When an IOS process is running, which hot keys will allow for it to be interrupted?

A. Up Arrow

B. Ctrl-X

C. Ctrl-Shift-6

D. Ctrl-C

12. Which is true about scrolling through output with keyboard shortcuts? (Choose two.)

A. The Down Arrow key moves the screen down ten lines.

B. The Enter key scrolls down one line.

C. The Right Arrow key scrolls one page.

D. The Spacebar scrolls down one page.

13. Which command line will provide information about the IOS currently in use?

A. Router1(config)# show version

B. Router1# show version

C. Router1(config)# show ios

D. Router1# show running config

14. When two computers are plugged into a switch on which no configuration changes have been made, which conditions will be true? (Choose two.)

A. The switch will be ready to use in a LAN.

B. The switch must first be given a name and an IP address using either the AUX port or the console port.

C. The hostname of the switch will be “Switch.”

D. The default password must be entered before the computers can communicate.

15. An administrator configured a switch with the hostname “Server_Room Switch_1” and appropriate passwords. When he took the switch to the server room to put into service, the switch booted, but the new configuration could not be found. The default configuration was present. What is a likely reason for this?

A. The IOS in flash was lost when power was removed.

B. The administrator did not enter the copy running-config startup-config command.

C. The administrator incorrectly typed the new password and was locked out of the switch.

D. The startup configuration was not saved to the flash memory.

16. What is the purpose of DHCP?

A. To resolve Internet names into IP addresses

B. To test connectivity from a PC to the Internet

C. To assign IP addresses to devices when they connect to a network

D. To secure devices against unauthorized access

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.122.195