Senior Acquisitions Editor: Kenyon Brown Development Editor: Kim Wimpsett



Yüklə 22,5 Mb.
Pdf görüntüsü
səhifə29/69
tarix26.10.2019
ölçüsü22,5 Mb.
#29436
1   ...   25   26   27   28   29   30   31   32   ...   69
Todd Lammle CCNA Routing and Switching


Hands-on Labs

In this section, you will perform commands on a Cisco switch (or you can

use a router) that will help you understand what you learned in this

chapter.


You’ll need at least one Cisco device—two would be better, three would be

outstanding. The hands-on labs in this section are included for use with

real Cisco routers, but all of these labs work with the LammleSim IOS

version (see

www.lammle.com/ccna

) or use the Cisco Packet Tracer router



simulator. Last, for the Cisco exam it doesn’t matter what model of switch

or router you use with these labs, as long as you’re running IOS 12.2 or

newer. Yes, I know the objectives are 15 code, but that is not important

for any of these labs.

It is assumed that the device you’re going to use has no current

configuration present. If necessary, erase any existing configuration with

Hands-on Lab 6.1; otherwise, proceed to Hands-on Lab 6.2:

Lab 6.1: Erasing an Existing Configuration

Lab 6.2: Exploring User, Privileged, and Configuration Modes

Lab 6.3: Using the Help and Editing Features

Lab 6.4: Saving a Configuration

Lab 6.5: Setting Passwords

Lab 6.6: Setting the Hostname, Descriptions, IP Address, and Clock

Rate


Hands-on Lab 6.1: Erasing an Existing Configuration

The following lab may require the knowledge of a username and

password to enter privileged mode. If the router has a configuration with

an unknown username and password for privileged mode, this procedure

will not be possible. It is possible to erase a configuration without a

privileged mode password, but the exact steps depend on the model and

will not be covered until Chapter 7.

1.  Start the switch up and when prompted, press Enter.

2.  At the

Switch>


prompt, type

enable

.

3.  If prompted, enter the username and press Enter. Then enter the



correct password and press Enter.

4.  At the

privileged mode

prompt, type



erase startup-config

.

5.  At the



privileged mode

prompt, type



reload

, and when prompted to

save the configuration, type

n

for no.


Hands-on Lab 6.2: Exploring User, Privileged, and

Configuration Modes

In the following lab, you’ll explore user, privileged, and configuration

modes:


1.  Plug the switch in, or turn the router on. If you just erased the

configuration as in Hands-on Lab 6.1, when prompted to continue

with the configuration dialog, enter

n

for no and press Enter. When

prompted, press Enter to connect to your router. This will put you into

user mode.

2.  At the

Switch>


prompt, type a question mark (

?

).

3.  Notice the



–more–

at the bottom of the screen.

4.  Press the Enter key to view the commands line by line. Press the

spacebar to view the commands a full screen at a time. You can type



q

at any time to quit.

5.  Type

enable

or


en

and press Enter. This will put you into privileged

mode where you can change and view the router configuration.

6.  At the

Switch#

prompt, type a question mark (



?

). Notice how many

options are available to you in privileged mode.

7.  Type



q

to quit.


8.  Type

config

and press Enter.

9.  When prompted for a method, press Enter to configure your router

using your terminal (which is the default).

10.  At the

Switch(config)#

prompt, type a question mark (

?

), then


q

to

quit, or press the spacebar to view the commands.



11.  Type

interface f0/1

or


int f0/1

(or even



int gig0/1

) and press

Enter. This will allow you to configure interface FastEthernet 0/1 or

Gigabit 0/1.

12.  At the

Switch(config-if)#

prompt, type a question mark (

?

).

13.  If using a router, type



int s0/0

,

interface s0/0

or even

interface

s0/0/0

and press Enter. This will allow you to configure interface

serial 0/0. Notice that you can go from interface to interface easily.

14.  Type



encapsulation ?

.

15.  Type



exit

. Notice how this brings you back one level.

16.  Press Ctrl+Z. Notice how this brings you out of configuration mode


and places you back into privileged mode.

17.  Type



disable

. This will put you into user mode.

18.  Type

exit

, which will log you out of the router or switch.



Hands-on Lab 6.3: Using the Help and Editing Features

This lab will provide hands-on experience with Cisco’s help and editing

features.

1.  Log into your device and go to privileged mode by typing



en

or


enable

.

2.  Type a question mark (



?

).

3.  Type



cl?

and then press Enter. Notice that you can see all the

commands that start with cl.

4.  Type



clock ?

and press Enter.

Notice the difference between steps 3 and 4. Step 3 has

you type letters with no space and a question mark, which will give

you all the commands that start with cl. Step 4 has you type a

command, space, and question mark. By doing this, you will see

the next available parameter.

5.  Set the clock by typing



clock ?

and, following the help screens, setting

the time and date. The following steps walk you through setting the

date and time.

6.  Type

clock ?

.

7.  Type



clock set ?

.

8.  Type



clock set 10:30:30 ?

.

9.  Type



clock set 10:30:30 14 May ?

.

10.  Type



clock set 10:30:30 14 May 2011

.

11.  Press Enter.



12.  Type

show clock

to see the time and date.

13.  From privileged mode, type

show access-list 10

. Don’t press Enter.

14.  Press Ctrl+A. This takes you to the beginning of the line.


15.  Press Ctrl+E. This should take you back to the end of the line.

16.  Ctrl+A takes your cursor back to the beginning of the line, and then

Ctrl+F moves your cursor forward one character.

17.  Press Ctrl+B, which will move you back one character.

18.  Press Enter, then press Ctrl+P. This will repeat the last command.

19.  Press the up arrow key on your keyboard. This will also repeat the last

command.

20.  Type



sh history

. This shows you the last 10 commands entered.

21.  Type

terminal history size ?

. This changes the history entry size.

The

?

is the number of allowed lines.



22.  Type

show terminal

to gather terminal statistics and history size.

23.  Type

terminal no editing

. This turns off advanced editing. Repeat

steps 14 through 18 to see that the shortcut editing keys have no effect

until you type



terminal editing

.

24.  Type



terminal editing

and press Enter to re-enable advanced editing.

25.  Type

sh run

, then press your Tab key. This will finish typing the

command for you.

26.  Type



sh start

, then press your Tab key. This will finish typing the

command for you.

Hands-on Lab 6.4: Saving a Configuration

In this lab, you will get hands-on experience saving a configuration:

1.  Log into your device and go into privileged mode by typing

en

or

enable

, then press Enter.

2.  To see the configuration stored in NVRAM, type



sh start

and press

Tab and Enter, or type

show startup-config

and press Enter.

However, if no configuration has been saved, you will get an error

message.


3.  To save a configuration to NVRAM, which is known as startup-config,

you can do one of the following:

Type

copy run start

and press Enter.



Type

copy running

, press Tab, type



start

, press Tab, and press

Enter.

Type


copy running-config startup-config

and press Enter.

4.  Type

sh start

, press Tab, then press Enter.

5.  Type

sh run

, press Tab, then press Enter.

6.  Type

erase startup-config

, press Tab, then press Enter.

7.  Type

sh start

, press Tab, then press Enter. The router will either tell

you that NVRAM is not present or display some other type of

message, depending on the IOS and hardware.

8.  Type

reload

, then press Enter. Acknowledge the reload by pressing

Enter. Wait for the device to reload.

9.  Say no to entering setup mode, or just press Ctrl+C.



Hands-on Lab 6.5: Setting Passwords

This hands-on lab will have you set your passwords.

1.  Log into the router and go into privileged mode by typing

en

or


enable

.

2.  Type



config t

and press Enter.

3.  Type

enable ?

.

4.  Set your enable secret password by typing



enable secretpassword

(the


third word should be your own personalized password) and pressing

Enter. Do not add the parameter

password

after the parameter

secret

(this would make your password the word password). An example



would be

enable secret todd

.

5.  Now let’s see what happens when you log all the way out of the router



and then log in. Log out by pressing Ctrl+Z, and then type

exit

and


press Enter. Go to privileged mode. Before you are allowed to enter

privileged mode, you will be asked for a password. If you successfully

enter the secret password, you can proceed.

6.  Remove the secret password. Go to privileged mode, type



config t

,

and press Enter. Type



no enable secret

and press Enter. Log out and

then log back in again; now you should not be asked for a password.

7.  One more password used to enter privileged mode is called the enable



password. It is an older, less secure password and is not used if an

enable secret password is set. Here is an example of how to set it:

config t

enable password todd1

8.  Notice that the enable secret and enable passwords are different. They

should never be set the same. Actually, you should never use the

enable password, only enable secret.

9.  Type



config t

to be at the right level to set your console and auxiliary

passwords, then type

line ?

.

10.  Notice that the parameters for the line commands are



auxiliary

,

vty



,

and


console

. You will set all three if you’re on a router; if you’re on a

switch, only the console and VTY lines are available.

11.  To set the Telnet or VTY password, type



line vty 0 4

and then press

Enter. The

0 4


is the range of the five available virtual lines used to

connect with Telnet. If you have an enterprise IOS, the number of

lines may vary. Use the question mark to determine the last line

number available on your router.

12.  The next command is used to set the authentication on or off. Type

login

and press Enter to prompt for a user-mode password when

telnetting into the device. You will not be able to telnet into a Cisco

device if the password is not set.

You can use the

no login


command to disable the user-

mode password prompt when using Telnet. Do not do this in

production!

13.  One more command you need to set for your VTY password is

password

. Type


passwordpassword

to set the password. (



password

is

your password.)



14.  Here is an example of how to set the VTY password:

config t


line vty 0 4

password todd

login


15.  Set your auxiliary password by first typing

line auxiliary 0

or


line

aux 0

(if you are using a router).

16.  Type

login

.

17.  Type



passwordpassword

.

18.  Set your console password by first typing



line console 0

or


line con

0

.

19.  Type



login

.

20.  Type



passwordpassword

. Here is an example of the last two command

sequences:

config t


line con 0

password todd1

login

line aux 0



password todd

login


21.  You can add the

Exec-timeout 0 0

command to the

console 0

line.

This will stop the console from timing out and logging you out. The



command sequence will now look like this:

config t


line con 0

password todd2

login

exec-timeout 0 0



22.  Set the console prompt to not overwrite the command you’re typing

with console messages by using the command

logging synchronous

.

config t



line con 0

logging synchronous



Hands-on Lab 6.6: Setting the Hostname, Descriptions, IP

Address, and Clock Rate

This lab will have you set your administrative functions on each device.

1.  Log into the switch or router and go into privileged mode by typing

en

or


enable

. If required, enter a username and password.



2.  Set your hostname by using the

hostname


command. Notice that it is

one word. Here is an example of setting your hostname on your

router, but the switch uses the exact same command:

Router#config t

Router(config)#hostname RouterA

RouterA(config)#

Notice that the hostname of the router changed in the prompt as soon

as you pressed Enter.

3.  Set a banner that the network administrators will see by using the

banner


command, as shown in the following steps.

4.  Type



config t

, then


banner ?

.

5.  Notice that you can set at least four different banners. For this lab we



are only interested in the login and message of the day (MOTD)

banners.


6.  Set your MOTD banner, which will be displayed when a console,

auxiliary, or Telnet connection is made to the router, by typing this:

config t

banner motd #

This is an motd banner

#

7.  The preceding example used a



#

sign as a delimiting character. This

tells the router when the message is done. You cannot use the

delimiting character in the message itself.

8.  You can remove the MOTD banner by typing the following command:

config t


no banner motd

9.  Set the login banner by typing this:

config t

banner login #

This is a login banner

#

10.  The login banner will display immediately after the MOTD but before



the user-mode password prompt. Remember that you set your user-

mode passwords by setting the console, auxiliary, and VTY line



passwords.

11.  You can remove the login banner by typing this:

config t

no banner login

12.  You can add an IP address to an interface with the

ip address

command if you are using a router. You need to get into interface

configuration mode first; here is an example of how you do that:

config t

int f0/1


ip address 1.1.1.1 255.255.0.0

no shutdown

Notice that the IP address (

1.1.1.1


) and subnet mask (

255.255.0.0

)

are configured on one line. The



no shutdown

(or


no shut

for short)

command is used to enable the interface. All interfaces are shut down

by default on a router. If you are on a layer 2 switch, you can set an IP

address only on the VLAN 1 interface.

13.  You can add identification to an interface by using the

description

command. This is useful for adding information about the connection.

Here is an example:

config t


int f0/1

ip address 2.2.2.1 255.255.0.0

no shut

description LAN link to Finance



14.  You can add the bandwidth of a serial link as well as the clock rate

when simulating a DCE WAN link on a router. Here is an example:

config t

int s0/0


bandwidth 1000

clock rate 1000000



Review Questions

The following questions are designed to test your



understanding of this chapter’s material. For more information on

how to get additional questions, please see

www.lammle.com/ccna

.

You can find the answers to these questions in Appendix B, “Answers to



Review Questions.”

1.  You type



show interfaces fa0/1

and get this output:

275496 packets input, 35226811 bytes, 0 no buffer

Received 69748 broadcasts (58822 multicasts)

0 runts, 0 giants, 0 throttles

111395 input errors, 511987 CRC, 0 frame, 0 overrun, 0

ignored

0 watchdog, 58822 multicast, 0 pause input



0 input packets with dribble condition detected

2392529 packets output, 337933522 bytes, 0 underruns

0 output errors, 0 collisions, 1 interface resets

0 babbles, 0 late collision, 0 deferred

0 lost carrier, 0 no carrier, 0 PAUSE output

0 output buffer failures, 0 output buffers swapped out

What could the problem possibly be with this interface?

A.  Speed mismatch on directly connected interfaces

B.  Collisions causing CRC errors

C.  Frames received are too large

D.  Interference on the Ethernet cable

2.  The output of the

show running-config

command comes from

_________.

A.  NVRAM

B.  Flash

C.  RAM


D.  Firmware

3.  Which two of the following commands are required when configuring

SSH on your router? (Choose two.)

A.


enable secret password

B.


exec-timeout 0 0

C.


ip domain-name name

D.

username name password password

E.

ip ssh version 2



4.  Which command will show you whether a DTE or a DCE cable is

plugged into serial 0/0 on your router’s WAN port?

A.

sh int s0/0



B.

sh int serial0/0

C.

show controllers s0/0



D.

show serial0/0 controllers

5.  In the work area, drag the router term to its definition on the right.

Mode

Definition

user exec mode

Commands that affect the entire system

privileged exec mode

Commands that affect

interfaces/processes only

Global configuration

mode


Interactive configuration dialog

Specific configuration

modes

Provides access to all other router



commands

Setup mode

Limited to basic monitoring commands

6.  Using the given output, what type of interface is shown?

[output cut]

Hardware is MV96340 Ethernet, address is 001a.2f55.c9e8 (bia

001a.2f55.c9e8)

Internet address is 192.168.1.33/27

MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,

reliability 255/255, txload 1/255, rxload 1/255

A.  10 Mb

B.  100 Mb

C.  1000 Mb

D.  1000 MB

7.  Which of the following commands will configure all the default VTY

ports on a switch?



A.

Switch#


line vty 0 4

B.


Switch(config)#

line vty 0 4

C.


Switch(config-if)#

line console 0

D.


Switch(config)#

line vty all

8.  Which of the following commands sets the privileged mode password

to Cisco and encrypts the password?

A.


enable secret password Cisco

B.


enable secret cisco

C.


enable secret Cisco

D.


enable password Cisco

9.  If you wanted administrators to see a message when logging into the

switch, which command would you use?

A.


message banner motd

B.


banner message motd

C.


banner motd

D.


message motd

10.  Which of the following prompts indicates that the switch is currently

in privileged mode?

A.


Switch(config)#

B.


Switch>

C.


Switch#

D.


Switch(config-if)

11.  What command do you type to save the configuration stored in RAM

to NVRAM?

A.


Switch(config)#

Yüklə 22,5 Mb.

Dostları ilə paylaş:
1   ...   25   26   27   28   29   30   31   32   ...   69




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin