Lab1 Week7
Lab1 Week7
Course ME8000
Basic Switch Operations Lab Guide
ISSUE 1.00
课程 XXXXXXXX XXX 上机任务指导书 ISSUE 1.0 Error! Use the Home tab to apply TOC
Heading to the text that you want to
appear here.
Contents
Course Instruction ........................................................................................................................1
About This Course .......................................................................................................................1
Course Objectives........................................................................................................................1
Relevant Materials .......................................................................................................................1
Chapter 1 About This Exercise ....................................................................................................1
1.1 Laboratory Networking Introduction .......................................................................................1
1.2 Equipment Description ...........................................................................................................2
1.3 Grouping Method ...................................................................................................................2
Chapter 2 LAN Cable Handling and Testing ................................................................................2
2.1 Exercise Objective .................................................................................................................2
2.2 Networking and Service Description ......................................................................................3
2.3 Task .......................................................................................................................................4
2.4 Additional Task ......................................................................................................................6
Chapter 3 Switch Configuration via Console Connection ............................................................7
3.1 Exercise Objective .................................................................................................................7
3.2 Networking and Service Description ......................................................................................7
3.3 Task .......................................................................................................................................8
Chapter 4 Understanding Basic VRP Commands .....................................................................12
4.1 Exercise Objective .............................................................................................................. 12
4.2 VRP Introduction ................................................................................................................. 12
4.3 Networking and Service Description ................................................................................... 20
4.4 Task .................................................................................................................................... 20
4.5 Additional Tasks.................................................................................................................. 21
Chapter 5 Layer 2 Switch Basic Operation ................................................................................22
5.1 Exercise Objective .............................................................................................................. 22
5.2 Networking and Service Description ................................................................................... 22
5.3 Task .................................................................................................................................... 22
5.4 Additional Task ................................................................................................................... 24
Chapter 6 Switch Configuration via TELNET .............................................................................25
6.1 Exercise Objective .............................................................................................................. 25
6.2 Networking and Service Description ................................................................................... 25
6.3 Task .................................................................................................................................... 26
6.4 Additional Task ................................................................................................................... 28
Course Instruction
Course Objectives
Upon completion of this course, you will be able to:
Understand the line arrangement of UTP Ethernet cables
Grasp the basic setup of LAN using Layer 2 switch
Able to perform basic switch configurations via console cable and
TELNET
Relevant Materials
Huawei S3700 series switch product description
Huawei S3700 series switch command reference
2.2.2 Description
Unshielded Twisted Pair (UTP) cables are commonly used for connecting
Ethernet devices. A UTP cable consists of 4 pairs of wires, and these pairs
can be arranged in different ways. Two typical arrangements are as follows:
(a) Direct and (b) Cross.
Direct arrangement is used for:
Connecting a router to a hub or switch
Connecting a computer to a hub or switch
In the following exercise, you will be making a Cross cable for connecting two
computers together.
2.3 Task
(1) Strip off about 5 cm of the plastic jacket from one end of a UTP cable.
(2) Spread apart the wires as shown in Figure 2-3.
(10) Confirm that PC1 and PC2 can communicate with each other using the
ping command.
Note: The ping command needs to be run from the Command Prompt
program. To run Command Prompt, click Start, type CMD, and press
Enter.
C:\ping 192.168.1.2
A sample output for a successful ping is given in Figure 2-5. The output
of an unsuccessful ping should look like Figure 2-6.
3.2.2 Description
3.3 Task
(1) Establish the physical connection between the PC and the switch using
a DB9 (or DB25) to RJ45 console cable: connect the DB9 (or DB25)
end to the PC and the RJ45 end to the switch.
Note: If the PC does not have a suitable interface, you may use a DB9
(or DB25) to USB adaptor to connect to the PC’s USB port.
(2) On the PC, run the terminal emulation program such as HyperTerminal.
Note: You may use other programs like TeraTermPro or Putty (if
available).
(3) In HyperTerminal, select File → New Connection. Give a name for the
new connection, for example, SW Connection.
(4) Next select the COM port used by the PC as shown in Figure 3-4.
(6) Power on the switch. The prompt <Quidway> as in Figure 3-6 should
appear right after the switch self-check is finished. If the prompt does
not appear, recheck the setting of HyperTerminal, especially the COM
port used.
<Quidway> reboot
Note: When prompted to save the current configuration for the next
startup, enter N. This ensures the system will restart in a fresh state.
(7) View the system information. Run the display version command to
view the software version and hardware information of the system.
<Quidway> display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.90
… … output omitted … …
The next exercise explores several basic VRP commands for switch
configuration.
VRP system commands are arranged into 4 levels: visit, monitor, config
and manage.
The visit level: includes commands for network diagnosis such as ping
and tracert and commands for visiting external equipment such as
TELNET client, SSH, and Rlogin commands.
The monitor level: includes commands for system maintenance and
service trouble diagnosis such as the display and debugging
commands.
The config level: includes service configuration commands involving
routing commands, commands for all network layers and commands for
providing direct network services for users.
The manage level: includes commands that supports the running of the
system and other services involving file system commands, FTP, TFTP
commands, Xmodem downloading commands, configuration file
switching commands, the slave board controlling commands, user
management commands, command level setting commands, and
parameter setting commands.
Users are also divided into 4 levels to match with the command levels.
Hence users can only use commands that have equal to or lower level
than their level. To switch a user of a lower level to a higher level, the
super [level] command is used.
Command Description
Examples:
To enter system view:
<Quidway>system-view
Enter system view, return user view with Ctrl+Z.
[Quidway]
To enter and exit interface view (in this example, Ethernet 0/0/1 view):
[Quidway]interface Ethernet 0/0/1
[Quidway-Ethernet0/0/1]quit
[Quidway]
[Quidway]quit
<Quidway>
The VRP platform provides an online help system which can be invoked
by entering ? after a full or partial command.
Try the following examples to observe the help shown for each of the
commands.
<Quidway>?
<Quidway>display ?
<Quidway>d?
<Quidway>system-view
[Quidway]interface ?
[Quidway]interface Ethernet ?
After inputting an incomplete keyword, you can press Tab and obtain all
related keywords or verify the correctness of the input keyword.
Tab can be used in three ways as shown in the following example.
1. The matching key word is unique after the incomplete key word is input.
Input an incomplete key word:
[Quidway] info-
Press Tab. The system will replace the input with the complete key
word and display it in a new line with the cursor leaving a space
behind.
[Quidway] info-center
2. There are several matches or no match after the incomplete key word is
input.
For example, the keyword info-center can be followed by the following
keywords which all begin with prefix log.
Press Tab. The system first displays the first possible keyword –
logbuffer:
[Quidway] info-center logbuffer
Stop pressing Tab right after the keyword that you need is
displayed.
Press Tab.
[Quidway] info-center loglog
To verify the login information has been changed, quit the switch
command line interface and log back to view the login information:
[Quidway] quit
< Quidway > quit
Configuration console exit, please retry to log on
Welcome to Huawei University Courseware Lab
< Quidway >
Command Description
4.3.2 Description
The PC is connected to the switch using a DB9 (or DB25) to RJ45 console
cable to set up the configuration environment. The HyperTerminal program
is used to login to the switch.
Console cable
console
PC HQ-AS-1
Figure 4-4: Console Connection Between PC and Switch
4.4 Task
Execute each of the following commands on the system. Observe the
response. Use the command reference and online help system to
understand the command and response observed.
Note: Some of the commands only work for certain views. Hence you may
need to change the view accordingly.
(1) dir
(2) system-view
(3) sysname HQ-AS-1
(4) display version
(5) display clock
(6) clock datetime 18:10:00 2012-04-16
(7) display clock
(8) display current-configuration
(9) display interface
(10) display interface brief
(11) interface Ethernet 0/0/2
(12) shutdown
5.2.2 Description
HQ-AS-1
E0/0/1 E0/0/2
PC1 PC2
192.168.1.1/24 192.168.1.2/24
Figure 5-1: Connecting Computers to a Layer 2 Switch
5.3 Task
(1) Connect one of the PCs to the switch using a console cable. Reset the
saved configuration in the switch, and reboot the switch. This ensures
the switch is booted into its default configuration, and thus can be used
as a simple plug-and-play Layer 2 switch.
<Quidway> reboot
Note: when prompted to save the current configuration for the next
startup, enter N. This ensures the system will restart in a fresh state.
When prompt to reboot the system, enter Y to begin the reboot process.
<Quidway> system-view
[Quidway] sysname HQ-AS-1
(3) Connect two computers (PC1 and PC2) to the switch using two UTP
cables as shown in Figure 5-1.
(4) Configure the IP addresses of PC1 and PC2 to 192.168.1.1 and
192.168.1.2, respectively. Configure the subnet mask to 255.255.255.0,
and leave the default gateway field blank.
(5) Verify that PC1 and PC2 can communicate with each other using the
ping program.
(4) Undo the shutdown command. Can PC1 and PC2 ping each other
now?
6.2.2 Description
HQ-AS-1
E0/0/1
PC1
192.168.1.1/24
Figure 6-1: Reference Network Topology
password), the authentication mode, and the incoming and outgoing call
restriction through the console interface on the switch.
6.3 Task
Note: Use the online help system/command reference to understand the
command and response observed.
(1) Connect the PC to the switch using a console cable to establish the
configuration environment.
(2) Configure the IP address to the default VLAN 1 interface (VLANIF 1).
Note: In the following, the # character preceding a statement indicates
that the statement is a comment, i.e., not to be entered into the system.
The command to be entered is in bold.
<Quidway>system-view
[Quidway]aaa
[Quidway-aaa]quit
[Quidway]user-interface vty 0 4
[Quidway-ui-vty0-4]authentication-mode aaa
(1) Connect the Ethernet port of the PC to the Ethernet 0/0/1 port (or any
other port) of the switch using a UTP cable (see Figure 6-1).
(2) Configure the IP address of the PC as shown in Figure 6-1.
(3) Verify that the PC and the switch can communicate with each other
using the ping program.
(4) Open the Command Prompt, and run the TELNET program as follows:
(5) You will be asked for the user name and password to log in to the
switch. Enter the user name and password previously configured in
Section 6.3.1 . After the authentication process, a command line
prompt such as <Quidway> should appear. You have entered the
configuration environment in the user view.