Sunteți pe pagina 1din 10

8th, 2013 by admin

Huawei switch configuration commands

QuidWay switch Huawei configuration command:

1, start

Establishing a local configuration environment, will host through the serial portconfiguration cable with
Ethernet switch Console port connection.

Running terminal emulation program on the host (such as Windows superterminal), set the terminal
communication parameters: baud rate is 9600bit/s, 8 data bits, 1 stop bit, no parity with and without
flow control, and select theterminal is VT100.

Ethernet Switch Ethernet switch electric, self-test information display terminal,performed after the
prompt the user to type the enter, will appear after the command prompt (such as <Quidway>).

Type the command, configuration of Ethernet Switch Ethernet switch or view the running state. Need
help at any time by typing “?”

2, the command view

(1) the user view (simple operation and statistical information exchange)<Quidway>: connection
establishment entry and exchange

(2) view of the system (system parameter) [Quidway]: in user view type System-View

(3) the Ethernet port view (configuration parameters of [Quidway-Ethernet0/1]Ethernet port): in view
of the system by typing interface Ethernet 0/1

(4) the VLAN view (VLAN parameter) [Quidway-Vlan1]: in view of the systemtype VLAN 1

(5) VLAN interface view (IP interface configuration VLAN and VLANconvergence corresponding)
[Quidway-Vlan-interface1]: in view of the systemtype interface vlan-interface 1

(6) the local user view (to configure the local user parameters) [Quidway-luser-user1]: in view of the
system type local-user user1

(7) the user interface (UI [Quidway-ui0] configuration parameters): in view of the system type user-
interface

3, the other commands

Set the system date and time <Quidway>clock time Beijing add 8

<Quidway>clock datetime 12:00:00 2005/01/23


Set the switch by the name of [Quidway]sysname TRAIN-3026-1[TRAIN-3026-1]

Configure user login [Quidway]user-interface vty 04

[Quidway-ui-vty0]authentication-mode scheme

Create a local user [Quidway]local-user Huawei

[Quidway-luser-huawei]password simple Huawei

[Quidway-luser-huawei] service-type telnet Level 3

4, VLAN configuration method

The configuration of the environment parameters.

SwitchA port E0/1 belongs to VLAN2, E0/2 to VLAN3

“Network demand.”

The switch port E0/1 into VLAN2, E0/2 into VLAN3

Data configuration steps

“VLAN configuration process.

(1) by default all ports are belonging to VLAN 1, and the port is access port, a access port can only
belong to one vlan;

(2) if the port is access port, the port is added to another VLAN at the same time, the system
automatically deleted from the original VLAN in the port;

(3) in addition to VLAN1, if the VLAN XX does not exist, in view of the systemby typing VLAN XX, create a
VLAN XX and enter the VLAN view; if the VLAN XX already exists, then go to the VLAN view.

[] SwitchA configuration

Method:

(1) create (into) vlan2

[SwitchA]vlan 2

(2) the port E0/1 is added to the vlan2

[SwitchA-vlan2]port Ethernet 0/1

(3) create (into) vlan3

[SwitchA-vlan2]vlan 3
(4) the port E0/2 is added to the vlan3

[SwitchA-vlan3]port Ethernet 0/2

Methods two:

(1) create (into) vlan2

[SwitchA]vlan 2

(2) to enter the port E0/1 view

[SwitchA]interface Ethernet 0/1

(3) specify the port E0/1 belongs to vlan2

[SwitchA-Ethernet1]port access VLAN 2

(4) create (into) vlan3

[SwitchA]vlan 3

(5) to enter the port E0/2 view

[SwitchA]interface Ethernet 0/2

(6) specify the port E0/2 belongs to vlan3

[SwitchA-Ethernet2]port access VLAN 3

Test validation

(1) using the command disp cur can see the port E0/1 belongs to vlan2, E0/2to vlan3;

(2) using the display interface Ethernet 0/1 can see the port to access port,PVID 2;

(3) using the display interface Ethernet 0/2 can see the port to access port,PVID 3

5, IP address allocation

Description of function demand and network

The configuration of the environment parameters.

The three layer switch with two ports SwitchA ethetnet 0/1, Ethernet 0/2,belonged to VLAN 2, VLAN 3;

Based on the three layer interface address VLAN 2 are 1.0.0.1/24 as the PC1gateway;
Based on the three layer interface address 3 VLAN respectively is 2.0.0.1/24as the PC2 gateway;

“Network demand.”

PC1 and PC2 through the three layer interface interoperability

[] SwitchA configuration

(1) create (into) vlan2

[Quidway]vlan 2

(2) the port E0/1 is added to the vlan2

[Quidway-vlan2]port Ethernet 0/1

(3) the virtual interface into the vlan2

[Quidway-vlan2]interface VLAN 2

(4) configured IP address in the virtual interface vlan2.

[Quidway-Vlan-interface2]ip address 1.0.0.1 255.255.255.0

(5) create (into) vlan3

[Quidway]vlan 3

(6) E0/2 was added to vlan3

[Quidway-vlan3]port Ethernet 0/2

(7) the virtual interface into the vlan3

[Quidway-vlan3]interface VLAN 3

(8) configured IP address in the virtual interface vlan3.

[Quidway-Vlan-interface3]ip address 2.0.0.1 255.255.255.0

Test validation

(1) PC1 and PC2 can PING through his gateway

(2) PC1 and PC2 can mutually PING

6, trunk port configuration

The configuration of the environment parameters.


(1) SwitchA port E0/1 belongs to vlan10, E0/2 belongs to vlan20, E0/3 andSwitchB port of E0/3
iterconnection

(2) SwitchB port E0/1 belongs to vlan10, E0/2 belongs to vlan20, E0/3 andSwitchA port of E0/3
interconnection

“Network demand.”

(1) PC interworking PC and the requirements of SwitchB SwitchA vlan10vlan10

(2) PC interworking PC and the requirements of SwitchB SwitchA vlan20vlan20

Data configuration steps

(1) create (into) vlan10

[SwitchA] VLAN 10

(2) E0/1 was added to vlan10

[SwitchA-vlan10]port Ethernet 0/1

(3) create (into) vlan20

[SwitchA]vlan 20

(4) E0/2 was added to vlan20

[SwitchA-vlan20]port Ethernet 0/2

(5) practice will generally be uplink port is set to the trunk attribute, allowing the VLAN transmission

[SwitchA-Ethernet0/3]port link-type trunk

(6) allows all of the VLAN from the E0/3 port passes through, you can also specify the specific value of
VLAN

[SwitchA-Ethernet0/3]port trunk permit VLAN all

[] SwitchB configuration

1) create (into) vlan10

[SwitchB] VLAN 10

(2) E0/1 was added to vlan10

[SwitchB-vlan10]port Ethernet 0/1


(3) create (into) vlan20

[SwitchB]vlan 20

(4) E0/2 was added to vlan20

[SwitchB-vlan20]port Ethernet 0/2

(5) practice will generally be uplink port is set to the trunk attribute, allowing the VLAN transmission

[SwitchB-Ethernet0/3]port link-type trunk

(7) allows all of the VLAN from the E0/3 port passes through, you can also specify the specific value of
VLAN

[SwitchB-Ethernet0/3]port trunk permit VLAN all

[footnote]

(1) if a port is trunk port, the port can belong to multiple vlan;

(2) the default trunk port 1 for PVID, you can modify the port by the command port trunk PVID VLAN
vlanid on port PVID model;

(3) if the data message forwarded from the trunk VLAN ID and port PVID, the message VLAN information
will be stripped away, the need to pay attention toin the configuration of the trunk port.

(4) a switch on if you have set a port to hybrid port, can not put the other port is set to trunk port.

(5) is usually best to specify the port allowed by specific VLAN, don’t set up to allow all VLAN through.

Test validation

(1) SwitchA vlan10 PC can PC interworking with SwitchB in vlan10

(2) SwitchA vlan20 PC can PC interworking with SwitchB in vlan20

(3) PC interworking of SwitchA vlan10 PC and not SwitchB vlan20 in

(4) PC interworking of SwitchA vlan20 PC and not SwitchB vlan10 in

7, the port trunking configuration

The configuration of the environment parameters.

(1) switches SwitchA and SwitchB realize the interconnection through the Ethernet port.

(2) SwitchA for the interconnection of the port for e0/1 and e0/2, SwitchB for the interconnection of the
Port for e0/1 and e0/2.
“Network demand.”

Increasing interconnection link SwitchA SwitchB bandwidth, and can realize thelink backup, use port
aggregation

Data configuration steps

[] SwitchA switch configuration

(1) to enter the port E0/1

[SwitchA]interface Ethernet 0/1

(2) trunking port must work in full duplex mode

[SwitchA-Ethernet0/1]duplex full

(3) gathering port rate requirements are the same, but can not be adaptive

[SwitchA-Ethernet0/1]speed 100

(4) to enter the port E0/2

[SwitchA]interface Ethernet 0/2

(5) trunking port must work in full duplex mode

[SwitchA-Ethernet0/2]duplex full

(6) gathering port rate requirements are the same, but can not be adaptive

[SwitchA-Ethernet0/2]speed 100

(7) for port aggregation based on source and destination MAC

[SwitchA]link-aggregation Ethernet 0/1 to Ethernet 0/2 both

[] SwitchB switch configuration

[SwitchB]interface Ethernet 0/1

[SwitchB-Ethernet0/1]duplex full

[SwitchB-Ethernet0/1]speed 100

[SwitchB]interface Ethernet 0/2

[SwitchB-Ethernet0/2]duplex full

[SwitchB-Ethernet0/2]speed 100
[SwitchB]link-aggregation Ethernet 0/1 to Ethernet 0/2 both

[footnote]

(1) link type link type and the main ports are members of the sameaggregation group port is consistent,
namely if the main port to Trunk port,then member port also to Trunk port; such as the link type master
port to Access port, then member port link type into Access port.

(2) of different products are different on the starting port number port aggregation when required,
please control ”manual” configuration.

8, port mirroring configuration

“The environment configuration parameters.

(1) the PC1 connected to the switch E0/1 port, IP address 1.1.1.1/24

(2) the PC2 connected to the switch E0/2 port, IP address 2.2.2.2/24

(3) E0/24 switch uplink port

(4) the Server connected to the switch E0/8 port, the port as the mirror port

“Network demand.”

(1) for monitoring service message for two PC by switch port mirroringfunctionality using server.

According to the different types of Quidway switch, mirror has configured in different ways:

Port mirroring – port mirroring is based on the import data message mirroringport completely copy to
the mirror port, so to flow observation or fault location.

Current mirror – Based on flow mirror switch based on some current mirror,each connection has two
direction of data flow, to switch the two data stream is to separate the mirror.

S2008/S2016/S2026/S2403H/S3026 switches support are port mirroring

8016 switches support port mirroring

3500/3026E/3026F/3050 supports the current mirror based on

5516/6506/6503/6506R supports image of port traffic

Data configuration steps

Taking Quidway S3026C as an example, through the mirror configurationbased on two laminar flow:

(1) define a ACL


[SwitchA]acl num 200

(2) define a rule sent from E0/1 to all other ports of the packet

[SwitchA]rule 0 permit ingress interface Ethernet0/1 egress interfaceEthernet0/2

(3) define a rule to the E0/1 port of the data from all the other port packet

[SwitchA]rule 1 permit ingress interface Ethernet0/2 egress interfaceEthernet0/1

(4) will be in accordance with the ACL packets mirror to E0/8

[SwitchA]mirrored-to link-group 200 interface e0/8

9, spanning tree STP configuration

The configuration of the environment parameters.

(1) switches SwitchA, SwitchB and SwitchC through the GE interfaceinterconnection

2) SwitchB and SwitchC switch is the core switch, requirements of the mainpreparation.

“Network demand.”

Requests the whole network running the STP protocol

Data configuration steps

(1) [] SwitchA switch configuration

Start the spanning tree protocol: [SwitchA]stp enable

(1) [] SwitchB switch configuration

Start the spanning tree protocol: [SwitchB]stp enable

(3) the bridge as the root bridge

[SwitchB]stp root primary

(4) [] SwitchC switch configuration

A start the spanning tree protocol [SwitchC]stp enable

The B configuration of the bridge as the root bridge [SwitchC]stp rootsecondary backup

(5) [] SwitchD switch configuration

A start the spanning tree protocol [SwitchD]stp enable


[footnote]

(1) default switch priority is 32768, if want to a switch is specified as the root switch, can also be
achieved by modifying the priority;

(2) the default open the spanning tree, all ports will open the spanning tree protocol, please contact PC
port edge port mode;

(3) if you want to control a link state can be achieved by setting the value of cost port.

Test validation

(1) using the display STP view switch STP running state

(2) STP display STP interface view port state Ethernet XX is correct

10, Quidway switch maintenance

Display version information: display version

Display diagnostic information: display diagnostic-information

Display the current system configuration: display current-configuration

Display system to save the configuration: display saved-configuration

Display interface information: display interface

Display routing information: display IP routing-table

Display VLAN information: display VLAN

Show spantree information: display STP

Displays the MAC address table: display mac-address

Display ARP information: display ARP

Display system CPU usage: display CPU

Display system memory usage: display memory

Display system log: display log

Display clock: display clock

Verify that the configuration is correct, use the save configuration commands:save

o delete a command, the general use of the command: undo

S-ar putea să vă placă și