Anda di halaman 1dari 32

teLab 1

Initial Router and Switch Configuration

Overview
In this lab, you will undertake the following tasks:

 Reset H3C devices.

 Verify the OS & Hardware Information.

 Perform basic switch configurations.

 Perform basic router configurations.

 Perform basic troubleshooting.


Introduction to the CLI lab

Diagram

Diagram for Basic System Management and CLI lab

Description
In this particular lab students will be connecting to the devices using the console
port, please check with the instructor for the console server details in case the
access is given through the console / Terminal server.

Procedure
Section A, Reset configuration files.
Section B, Verify the OS & Hardware Information.
Section C, Basic Switch Configuration.
Section D, Basic Router Configuration.
Section E, Basic Troubleshooting.
Section A: Resetting the Device to the Factory Default

Load Factory Default Configuration


In this section, you will reset both your router and switch back to their factory
defaults. This involves deleting their saved configuration file in flash, rebooting
them, and verifying that the devices come up with a base configuration.

Commands you can use include:


system-view
reset saved-configuration
reboot
display current-configuration
display interface
display stp
stp enable
save

Tip:
Use the ? (question mark) to find available options for any particular commands. For example:
<H3C> display device ?

1. Log into your router’s console and reset it back to its factory defaults.

After reloading, what is the default name of the router? ______________


What is the default status of the router’s interfaces? ________________

2. On the router, save the current configuration to flash.

3. Log into your switch’s console and reset it back to its factory defaults.

After reloading, what is the default name of the switch? ______________


What is the default status of the switch’s interfaces? ________________
Is STP enabled, by default, on the switch? ________________________
4. Enable STP on the switch globally (not on an interface) and verify that it is
enabled.

Tip:
STP has been enabled to prevent any inadvertent layer-2 loops; if a loop occurred, the CPU
cycles on a device could reach 100%, making console access difficult, if not impossible.

5. On the switch, save its current configuration to flash.


Section B: Verify the OS and Hardware Information

Checking the current software and hardware details


In this section, you will verify the switch’s and router’s configuration and operation.

Commands you can use include:


delete [/unreserved]
dir [/all]
display current-configuration
display device
display startup-configuration
display version
reset recycle-bin
save
system-view
undelete

1. Answer the following questions concerning the router’s software and hardware

What Comware version and release is the router running?_________________

How much RAM does the router have? ______________

How many Gigabit Ethernet interfaces does the router have? ______________

What card(s) does the router have installed, including the types of interfaces on
the card(s) interfaces does the router have? __________________________

When comparing the output of the “dir/all” and “display version” commands on
the router, why is the amount of flash different for these two commands?
______________________________________________________________
2. Answer the following questions concerning the switch’s software and hardware

What Comware version and release is the switch running?_________________

How much RAM does the switch have? ______________

How much many Gigabit Ethernet interfaces does the switch have?
______________

How many SFP interfaces, if any, does the switch have? _________________

3. Answer the following questions about the switch’s flash:

What is the size of flash and how much flash is available? _________________

When you execute the “save” command, what is the name of the file, in flash,
where this is stored? ________________

What file extension is used to denote the operating system that will be loaded?
_________________

Note:
The flash file system commands are accessed from the user view, not from the system view.

4. On your router, delete the startup.cfg file in flash and verify that it was deleted.

Did the size of flash decrease after deleting the file on the router? _________

5. View the deleted file in the recycle bin.

What special characters appear before and after the filename of the deleted
file? ___________________

6. On your router, restore the deleted file from the recycle bin and verify that it
appears in a directory listing.
7. On the router, permanently delete the startup.cfg file on your router (use the
“/unreserved” option). View all the files in flash (deleted and undeleted).

Do you see the deleted file in the recycle bin?

8. Save the router’s running configuration to flash.

9. On the router, delete the “startup.cfg” file in flash. Then empty the recycle bin.

Do you see the startup.cfg file with the “dir /all” command?

10. Save the router’s running configuration to flash.


Section C: Basic Switch configuration

Basic Switch Configuration Tasks

The default switch name is H3C. For this labs purpose we are going to name the
switch Switchx, where “x” represent the pod number assigned to you. You will also
enable one interface to your connected router and one interface to the
CoreSwitch-1. You’ll then place a basic IP configuration on the switch, where all
the devices in the network will be in VLAN 1, whose subnet is 10.254.254.0/24.
You’ll also allow telnet access to the switch.

Use the following chart to determine the IP addresses to use for this exercise; if
your pod is 10, use 0 for “x”.

Device Interface IP address

CoreRouter-1 G0/0 10.254.254.101


CoreRouter-2 G0/0 10.254.254.102

CoreSwitch-1 Vlan 1 10.254.254.201

CoreSwitch-2 Vlan 1 10.254.254.202

Routerx G0/0 10.254.254.1x

Switchx Vlan 1 10.254.254.2x


Diagrams: Logical diagram of the 10.254.254.0/24 subnet

Commands you can use in this lab include:


display brief interface
display interface
display this
display current-configuration
local-user
service-type telnet
password simple
user-interface vty 0 4
authentication-mode scheme
protocol inbound [telnet | ssh | all]
super password level 3 simple
interface
ip address
[undo] shutdown
description
save
sysname
system-view
telnet server enable

1. Change the name of your switch to Switchx, where “x” is your pod number.

What is displayed in your prompt? ________________________.

2. Created a local user account called “admin”. This user should be allowed telnet
access and the password for the account should “3com”, in lower case, and
should be in clear text.

WARNING:
All passwords MUST BE “3com”—this facilities using the lab gear for multiple classes. Thank you
for your assistance in this matter.

3. Set up 5 vtys (0-4) to use the local authentication scheme. Allow only the telnet
protocol for the vtys.

4. Enable the telnet server.

5. Create a level 3 super password of “3com”, lower case—this is equivalent to


Cisco’s “enable password” and “enable secret” commands.

6. Enable the G1/0/4 interface connected to the RouterX and give it a description
that includes this will be an Access Port in VLAN 20x (the access port will be
configured in the next lab).

7. Verify that the G1/0/4 interface is active.

What does an interface status of “UP line protocol is DOWN” mean?


______________________________________________________

8. Enable the G10/5 interface connected to the RouterX and give it a description
that includes that this will be a trunk port (the trunk port will be configured in the
next lab).
9. Verify that the G1/0/5 interface is active.

10. Enable the G1/0/11 interface connected to the CoreSwitch-1 and give it a
description. Verify that the interface is active.
11. Disable the G1/0/12, interface connected to the CoreSwitch-1 and give it a
description. Verify that the interface is Administratively Down.

12. Disable the G1/0/21 and G1/0/22 interfaces connected to the CoreSwitch-2 and
give it a description. Verify that the interface is Administratively Down.

13. If any other interface is enabled on SwitchX, disable it and verify that it is
Administratively Down. (only interfaces G1/0/2, G1/0/4, G1/0/5, and G1/0/11
should be enabled).

14. Create the VLAN 1 interface, enable it, and give it the appropriate IP address
based on the table above. Verify that the interface is active and that it has the
correct IP address configured.

15. Save the switch’s configuration to flash.


Section D: Basic Router configuration

Basic Router Configuration Tasks


The default router name is H3C. For this labs purpose we are going to name the
switch Routerx, where “x” represent the pod number assigned to you. You will also
enable one interface to your connected switch place a basic IP configuration on it,
where all the devices will be in VLAN 1, whose subnet is 10.254.254.0/24. You’ll
also allow telnet access to the router.

Use the following chart to determine the IP addresses to use for this exercise; if
your pod is 10, use 0 for “x”.

Device Interface IP address

CoreRouter-1 G0/0 10.254.254.101

CoreRouter-2 G0/0 10.254.254.102

CoreSwitch-1 Vlan 1 10.254.254.201


CoreSwitch-2 Vlan 1 10.254.254.202

Routerx G0/0 10.254.254.1x

Switchx Vlan 1 10.254.254.2x

Commands you can use include:


display interface
display brief interface
display ip interface brief
display this
display current-configuration
local-user
service-type telnet
password simple
user-interface vty 0 4
authentication-mode scheme
protocol inbound [telnet | ssh | all]
super password level 3 simple
user-interface aux 0
set auth password simple
user privilege level 3
idle-timeout 120
interface
[undo] ip address
[undo] shutdown
description
save
sysname
system-view
telnet server enable

1. Change the name of your router to Routerx, where “x” is your pod number.

What is displayed in your prompt? ________________________.

2. Set up the aux port so that the instructor can access it while you are on your
console. You’ll need to first enable the “interface aux 0”. Next, set up the
user-interface aux 0 with a simple password of “3com” (lower case), a privilege
level of 3, and an idle timeout of 120 minutes.

3. Created a local user account called “admin”. This user should be allowed telnet
access and the password for the account should “3com”, in lower case, and
should be encrypted.

4. Set up 5 vtys (0-4) to use the local authentication scheme. Allow only the telnet
protocol for the vtys.

5. Enable the telnet server.

6. Create a level 3 super password of “3com”, lower case—this is equivalent to


Cisco’s “enable password” and “enable secret” commands.

7. Remove the existing IP address on the G0/0 interface. Enable the G0/0
interface connected to the SwitchX and give it a description. Assign it an
appropriate IP address (based on the above chart) in the 10.254.254.0/24
subnet. Verify that the interface is active.

8. Save the router’s configuration to flash.


Section E: Basic troubleshooting

Basic testing and troubleshooting


In this section you’ll test layer-2 and layer-3 connectivity in the network. You’ll use
LLDP which is similar to the Cisco Discovery Protocol (CDP); unlike CDP, LLDP is
an open standard. Currently, only H3C switches support LLDP; support will soon be
added to the H3C routers.

You’ll also use some additional commands that will help you in basic
troubleshooting tasks.

Here are some commands you’ll use:


debug ip icmp
display arp
display cpu-usage
display diagnostic-information
display history-command
display interface
display ip interface brief
display lldp status
display lldp neighbor
display mac-address
display memory
ping
super
telnet
terminal debugging
undo debug all
1. Access the console of SwitchX and verify that you see the core switch as an
LLDP neighbor.

What is the system name of the core switch? __________________________

On what core switch port is your local switch connected to? ______________

How often are LLDP updates advertised?_____________________________

2. On the console of SwitchX, make sure you can ping RouterX, CoreSwitch-1,
CoreRouter-1, and at least one neighboring pod device. If you are having a
problem, make sure that the interfaces are enabled and that the VLAN 1
interface has the correct IP address.

3. On the console of the switch, examine the ARP table.

What is the MAC address of CoreSwitch-1 (10.254.254.201)? ______________

What is the MAC address of CoreRouter-1 (10.254.254.101)? ______________

4. On the console of the switch, examine the MAC address table.

What VLAN are the CoreSwitch-1 and Core-Router-1 in? ________________

5. On the console of your SwitchX, change to User View and telnet to


RouterX—log in using “admin/3com” as a username and password. If you are
having a problem, make sure that RouterX has a telnet server enabled, the
VTYs are configured, and that the admin account has been properly configured.
To access Privilege mode functions, you need to use the super command with
its corresponding password (“3com”). Use CNTRL-K to about the telnet.

6. From the console of your RouterX, make sure you can ping SwitchX,
CoreSwitch-1, CoreRouter-1, and at least one neighboring pod device.

7. On RouterX, change to User View and telnet to SwitchX—log in using


“admin/3com” as a username and password.

8. Display the commands you have currently executed up to this point.

9. Create a diagnostic report.


Tip:
You may want to capture your Hyper Terminal session before executing the display
diagnostic-information command. Sometimes, H3C/3Com Technical Support engineers may
ask you to send this log. To assistance in this process, use the screen-length disabled
command (this is equivalent to Cisco’s terminal length 0 command). Using this command
removes the need of hitting the space bar to page through the output—all output is displayed and
then the prompt is redisplayed.

10. View the CPU and memory utilization of your switch.

What is the CPU utilization? ____________________________

What is the memory usage? ____________________________

11. Access the console of your router and ping CoreRouter-1.

12. From the console of your router, enable output of debugging messages to the
console with the terminal command.

13. From the console of your router, turn on the debugging for IP ICMP with the
debug command. Repeat the ping process to the CoreRouter-1.

How is the console output different from the previous ping?

14. Disable all debug processes on your router.

Tip:
Sometimes once you enable terminal debugging, the screen becomes flooded with debugging
information output. If that’s the case and you would like to turn off all debugging, simply ignore
what you see on the terminal screen and type “u d a”, which stands for undo debugging all and
hit enter. CNTRL+O will also disable debugging.
Some other shortcuts you might want to remember include CTRL+G corresponds to the display
current-configuration command; and CTRL+L corresponds to the display ip routing-table
command.

15. Disable output of debugging messages to the console terminal.

16. This completes this lab exercise.


Section F: Lab Answers

Section A: Answers

1. Commands:

reset saved-configuration
reboot

Name: H3C
Interfaces: Administratively down

2. Commands: save

3. Commands:

reset saved-configuration
reboot
display stp

Name: H3C
Interfaces: UP
STP disabled

4. Commands:

system-view
stp enable
display stp

5. Commands:

save
Section B: Answers

1. Commands:

display version
display brief interface

Comware: 5.20 release…


RAM: 256MB
GE interfaces: 2
Cards: 4-port Ethernet, Cellular, and, possibly, a 4-port serial card
Difference between flash amounts: display version only displays available flash on the
device’s motherboard—dir /all displays the amount of flash for the default flash location
(in this case the router’s compact flash card)

2. Commands:

display version

Comware: 5.20 release…


RAM: 256MB
Interfaces: 28 (only 24 can be used, however)
SFP: 4

3. Commands

display version
dir

Flash (compact card): 32MB


File name: startup.cfg
OS extension: “.bin”

4. Commands:

delete startup.cfg
dir

No

5. Commands

dir /all

Square brackets
6. Commands:

undelete startup.cfg
dir

7. Commands:

delete /unreserved startup.cfg


dir /all

No

8. Commands:

save

9. Commands:

delete /unreserved startup.cfg


reset recycle-bin
dir /all

No

10. Commands:

save
Section C: Answers

1. Commands:

[H3C] sysname SwitchX


[SwitchX]

2. Commands

[SwitchX] local-user admin


New local user added.
[SwitchX-luser-admin] service telnet
[SwitchX-luser-admin] password simple 3com
[SwitchX-luser-admin] quit

3. Commands

[SwitchX]user-interface vty 0 4
[SwitchX-ui-vty0-4] authentication-mode scheme
[SwitchX-ui-vty0-4] protocol inbound telnet
[SwitchX-ui-vty0-4] quit

4. Commands:

[SwitchX] telnet server enable

5. Commands:

[SwitchX] super password level 3 simple 3com

6. Commands:
[SwitchX] interface g1/0/4
[SwitchX-GigabitEthernet1/0/4] undo shutdown
Interface GigabitEthernet1/0/4 is not shut down
[SwitchX-GigabitEthernet1/0/4] description RouterX in VLAN 20x
[SwitchX-GigabitEthernet1/0/4] quit

7. Commands:

display brief interface


-or-
display interface g1/0/4
8. Commands:

[SwitchX] interface g1/0/5


[SwitchX-GigabitEthernet1/0/5] undo shutdown
Interface GigabitEthernet1/0/5 is not shut down
[SwitchX-GigabitEthernet1/0/5] description RouterX trunk on G0/1
[SwitchX-GigabitEthernet1/0/5] quit

9. Commands:

display brief interface


-or-
display interface g1/0/4

10. Commands:

[SwitchX] interface g1/0/11


[SwitchX-GigabitEthernet1/0/11] undo shutdown
Interface GigabitEthernet1/0/11 is not shut down
[SwitchX-GigabitEthernet1/0/11] description Connected to CoreSwitch-1
[SwitchX-GigabitEthernet1/0/11] quit
[SwitchX] display interface g1/0/11

11. Commands

[SwitchX] interface g1/0/12


[SwitchX-GigabitEthernet1/0/12] shutdown
%Apr 26 12:36:08:339 2000 SwitchX IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/12: link status is DOWN
[SwitchX-GigabitEthernet1/0/12] description Connected to CoreSwitch-1
[SwitchX-GigabitEthernet1/0/12] quit
[SwitchX] display interface g1/0/12
12. Commands:

SwitchX] interface g1/0/21


[SwitchX-GigabitEthernet1/0/21] shutdown
%Apr 26 12:36:08:339 2000 SwitchX IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/21: link status is DOWN
[SwitchX-GigabitEthernet1/0/21] description Connected to CoreSwitch-2
[SwitchX-GigabitEthernet1/0/21] quit
[SwitchX] display interface g1/0/21

SwitchX] interface g1/0/22


[SwitchX-GigabitEthernet1/0/22] shutdown
%Apr 26 12:36:08:339 2000 SwitchX IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/22: link status is DOWN
[SwitchX-GigabitEthernet1/0/22] description Connected to CoreSwitch-2
[SwitchX-GigabitEthernet1/0/22] quit
[SwitchX] display interface g1/0/22

13. Commands:

SwitchX] interface g1/0/XX


[SwitchX-GigabitEthernet1/0/XX] shutdown
%Apr 26 12:36:08:339 2000 SwitchX IFNET/4/LINK UPDOWN:
GigabitEthernet1/0/XX: link status is DOWN
[SwitchX-GigabitEthernet1/0/XX] quit
[SwitchX] display brief interface

14. Commands:

[SwitchX] interface vlan 1


%Apr 26 12:41:12:117 2000 SwitchX IFNET/4/LINK UPDOWN:
Vlan-interface1: link status is UP
[SwitchX-Vlan-interface1] ip address 10.254.254.2X 24
%Apr 26 12:41:24:370 2000 SwitchX IFNET/4/UPDOWN:
Line protocol on the interface Vlan-interface1 is UP
[SwitchX-Vlan-interface1] quit
[SwitchX] display ip interface brief

15. Commands:

[SwitchX] save
Section D: Answers

1. Commands:

[H3C] sysname RouterX


[RouterX]

2. Commands

[RouterX] user-interface aux 0


[RouterX-ui-aux0] set authentication password simple 3com
[RouterX-ui-aux0] user privilege level 3
[RouterX-ui-aux0] quit

3. Commands:

[RouterX] local-user admin


[RouterX-luser-admin] service-type telnet
[RouterX-luser-admin] password simple 3com
[RouterX-luser-admin] quit

4. Commands:

[RouterX] user-interface vty 0 4


[RouterX-ui-vty0-4] authentication-mode scheme
[RouterX-ui-vty0-4] protocol inbound telnet
[RouterX-ui-vty0-4] quit

5. Commands:

[RouterX] telnet server enable


% Start Telnet server

6. Commands:

[RouterX]super password level 3 simple 3com


7. Commands:

[RouterX] interface g0/0


[RouterX-GigabitEthernet0/0] undo ip address
%Apr 19 18:23:43:860 2010 RouterX IFNET/4/UPDOWN:
Line protocol on the interface GigabitEthernet0/0 is DOWN
[RouterX-GigabitEthernet0/0] undo shutdown
Interface GigabitEthernet0/0 is not shut down
[RouterX-GigabitEthernet0/0] description Connected to SwitchX on G1/0/4
[RouterX-GigabitEthernet0/0] ip address 10.254.254.1X 24
%Apr 19 18:24:25:757 2010 RouterX IFNET/4/UPDOWN:
Line protocol on the interface GigabitEthernet0/0 is UP
[RouterX-GigabitEthernet0/0] quit
[RouterX] display ip interface brief

8. Commands: save.
Section E: Answers

1. Commands:

display lldp neighbor

Core switch name: CoreSwitch-1


Port: see Port ID field

display lldp status

Interval: see the Transmit Interval field (30 seconds)

2. Commands:

[SwitchX] ping 10.254.254.1x


[SwitchX] ping 10.254.254.201
[SwitchX] ping 10.254.254.101

3. Commands:

display arp

4. Commands:

display mac-address

5. Commands:

[SwitchX] quit
<SwitchX> telnet 10.254.254.1x

6. Commands:

[RouterX] ping 10.254.254.2x


[RouterX] ping 10.254.254.201
[RouterX] ping 10.254.254.101

7. Commands:

[RouterX] quit
<RouterX> telnet 10.254.254.2x

8. Commands:

display history
9. Commands:

display diagnostic-information

10. Commands:

display cpu-usage
display memory

11. Command:

[RouterX] ping 10.254.254.101

12. Commands:

[RouterX] quit
<RouterX> terminal debugging
Info: Current terminal debugging is on.

13. Commands:

<RouterX> debug ip icmp


<RouterX> ping 10.254.254.101

14. Commands

undo debug all


-or-
<CNTRL>O

15. Commands:

undo terminal debugging


Example Configuration for Switch1:

<Switch1>display current-configuration
sysname Switch1
#
super password level 3 simple 3com
telnet server enable
#
undo ip ttl-expires
#
vlan 1
#
user-group system
#
local-user admin
password simple 3com
service-type telnet
#
stp enable
#
interface NULL0
#
interface Vlan-interface1
ip address 10.254.254.21 255.255.255.0
#
interface GigabitEthernet1/0/1
shutdown
#
interface GigabitEthernet1/0/2
shutdown
#
interface GigabitEthernet1/0/3
shutdown
#
interface GigabitEthernet1/0/4
description RouterX in VLAN 20x
#
interface GigabitEthernet1/0/5
description RouterX trunk on E2/2
#
interface GigabitEthernet1/0/6
shutdown
#
interface GigabitEthernet1/0/7
shutdown
#
interface GigabitEthernet1/0/8
shutdown
#
interface GigabitEthernet1/0/9
shutdown
#
interface GigabitEthernet1/0/10
shutdown
#
interface GigabitEthernet1/0/11
description Connected to CoreSwitch-1
#
interface GigabitEthernet1/0/12
description Connected to CoreSwitch-1
shutdown
#
interface GigabitEthernet1/0/13
shutdown
#
interface GigabitEthernet1/0/14
shutdown
#
interface GigabitEthernet1/0/15
shutdown
#
interface GigabitEthernet1/0/16
shutdown
#
interface GigabitEthernet1/0/17
shutdown
#
interface GigabitEthernet1/0/18
shutdown
#
interface GigabitEthernet1/0/19
shutdown
#
interface GigabitEthernet1/0/20
shutdown
#
interface GigabitEthernet1/0/21
description Connected to CoreSwitch-2
shutdown
#
interface GigabitEthernet1/0/22
description Connected to CoreSwitch-2
shutdown
#
interface GigabitEthernet1/0/23
shutdown
#
interface GigabitEthernet1/0/24
shutdown
#
interface GigabitEthernet1/0/25
shutdown
#
interface GigabitEthernet1/0/26
shutdown
#
interface GigabitEthernet1/0/27
shutdown
#
interface GigabitEthernet1/0/28
shutdown
#
user-interface aux 0 8
user-interface vty 0 4
authentication-mode scheme
protocol inbound telnet
#
return
Example Configuration for Router1:

sysname Router1
#
super password level 3 simple 3com
#
telnet server enable
#
vlan 1
#
user-group system
#
local-user admin
password simple 3com
authorization-attribute level 3
service-type telnet
#
interface Aux0
async mode flow
link-protocol ppp
#
interface Cellular0/0
async mode protocol
link-protocol ppp
#
interface Serial5/0
link-protocol ppp
#
interface Serial5/1
link-protocol ppp
#
interface Serial5/2
link-protocol ppp
#
interface Serial5/3
link-protocol ppp
#
interface NULL0
#
interface Ethernet2/0
port link-mode bridge
#
interface Ethernet2/1
port link-mode bridge
#
interface Ethernet2/2
port link-mode bridge
#
interface Ethernet2/3
port link-mode bridge
#
interface GigabitEthernet0/0
port link-mode route
description Connected to SwitchX on G1/0/4
ip address 10.254.254.11 255.255.255.0
#
interface GigabitEthernet0/1
port link-mode route
#
user-interface con 0
user-interface tty 13
user-interface aux 0
user privilege level 3
set authentication password simple 3com
user-interface vty 0 4
authentication-mode scheme
protocol inbound telnet
#
return