Sie sind auf Seite 1von 15

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Table of Contents

Table of Contents
Chapter 1 VLAN Configuration Commands................................................................................ 1-1 1.1 VLAN Configuration Commands........................................................................................ 1-1 1.1.1 description ............................................................................................................... 1-1 1.1.2 display interface Vlan-interface ............................................................................... 1-1 1.1.3 display vlan.............................................................................................................. 1-3 1.1.4 interface Vlan-interface ........................................................................................... 1-4 1.1.5 name ....................................................................................................................... 1-5 1.1.6 shutdown ................................................................................................................. 1-6 1.1.7 vlan.......................................................................................................................... 1-7 1.1.8 vlan to...................................................................................................................... 1-8 1.2 Port-Based VLAN Configuration Commands .................................................................... 1-9 1.2.1 port .......................................................................................................................... 1-9 1.3 Protocol-Based VLAN Configuration Commands............................................................ 1-10 1.3.1 display protocol-vlan interface............................................................................... 1-10 1.3.2 display protocol-vlan vlan...................................................................................... 1-11 1.3.3 port hybrid protocol-vlan vlan ................................................................................ 1-12 1.3.4 protocol-vlan.......................................................................................................... 1-13

Huawei Technologies Proprietary i

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

Chapter 1 VLAN Configuration Commands


1.1 VLAN Configuration Commands
1.1.1 description
Syntax
description text undo description

View
VLAN view, VLAN interface view

Parameter
text: String to describe the current VLAN or VLAN interface.
! !

In the range of 1 to 32 characters when describing the current VLAN. In the range of 1 to 80 characters when describing the current VLAN interface.

Description
Use the description command to assign a description string to the current VLAN or VLAN interface. Use the undo description command to restore the default description string. By default, the description string of the current VLAN is its VLAN ID, such as VLAN 0001; the description string of the current VLAN interface is its name, such as Vlan-interface 1 Interface. Related command: display vlan, and display interface Vlan-interface.

Example
# Specify the description string of the current VLAN as RESEARCH.
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] vlan 1 [Quidway-vlan1] description RESEARCH

1.1.2 display interface Vlan-interface


Syntax
display interface Vlan-interface [ vlan-id ]

Huawei Technologies Proprietary 1-1

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

View
Any view

Parameter
vlan-id: ID of the specific VLAN interface.

Description
Use the display interface Vlan-interface command to display the information about the VLAN interface, including:
! ! ! !

Physical state and link state of the VLAN interface Format of the sent frames MAC address, IP address and subnet mask of the VLAN interface Description string and MTU of the VLAN interface

If the vlan-id argument is specified, the information about the specified VLAN interface is displayed; if the vlan-id argument is not specified, the information about all the created VLAN interfaces is displayed. Related command: interface Vlan-interface.

Example
# Display the information about VLAN-interface2.
<Quidway> display interface Vlan-interface 2 Vlan-interface2 current state : DOWN Line protocol current state : DOWN IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is

00e0-fc07-4101 Internet Address is 10.1.1.1/24 Primary Description : Vlan-interface2 Interface The Maximum Transmit Unit is 1500

Table 1-1 Description on the fields of the display interface Vlan-interface command Field Vlan-interface2 current state Line protocol current state IP Sending Frames' Format Hardware address Internet Address Description Current state of the VLAN interface Current state of the Line protocol Format of the frames that IP sends MAC address corresponding to the VLAN interface IP address corresponding to the VLAN interface

Huawei Technologies Proprietary 1-2

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

Field Description The Maximum Transmit Unit

Description Description on the VLAN interface Maximum transmission unit (MTU)

1.1.3 display vlan


Syntax
display vlan [ vlan-id [ to vlan-id ] | all | dynamic | static ]

View
Any view

Parameter
vlan-id: VLAN ID, in the range of 1 to 4094. to: Specifies multiple contiguous VLAN IDs. all: Displays the information about all the VLANs. dynamic: Displays the VLANs created dynamically. static: Displays the VLANs created statically.

Description
Use the display vlan command to display the information about the specified VLANs or all VLANs. If the vlan-id argument or the all keyword is specified, the information about the specified VLANs or the all VLANs is displayed, including:
! ! !

VLAN ID VLAN type (dynamic or static) Whether the routing function is enabled (If yes, the primary IP address and mask are displayed) VLAN description Member ports

! !

If no argument/keyword is specified, this command displays the amount and VLAN IDs of all the existing VLANs. If the dynamic or static keyword is specified, this command displays the amount and VLAN IDs of the VLANs that are created dynamically or statically. Related command: vlan.

Example
# Display the information about VLAN 1.

Huawei Technologies Proprietary 1-3

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510


<Quidway> display vlan 1 VLAN ID: 1 VLAN Type: static Route Interface: configured IP Address: 192.168.0.39 Subnet Mask: 255.255.255.0 Description: VLAN 0001 Name: VLAN 0001 Tagged Ports: none

Chapter 1 VLAN Configuration Commands

Untagged Ports: Ethernet1/0/1 Ethernet1/0/4 Ethernet1/0/7 Ethernet1/0/10 Ethernet1/0/13 Ethernet1/0/16 Ethernet1/0/19 Ethernet1/0/22 Ethernet1/0/2 Ethernet1/0/5 Ethernet1/0/8 Ethernet1/0/11 Ethernet1/0/14 Ethernet1/0/17 Ethernet1/0/20 Ethernet1/0/23 Ethernet1/0/3 Ethernet1/0/6 Ethernet1/0/9 Ethernet1/0/12 Ethernet1/0/15 Ethernet1/0/18 Ethernet1/0/21 Ethernet1/0/24

Table 1-2 Description on the fields of the display vlan command Field VLAN ID VLAN Type Route Interface IP Address Subnet Mask Description Name Tagged Ports Untagged Ports VLAN ID VLAN type (dynamic or static) Whether the routing interface function is enable for this VLAN IP address Subnet mask Description on the VLAN VLAN name Ports packets transmitted through which are tagged Port packets transmitted through which are untagged Description

1.1.4 interface Vlan-interface


Syntax
interface Vlan-interface vlan-id undo interface Vlan-interface vlan-id

Huawei Technologies Proprietary 1-4

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

View
System view

Parameter
vlan-id: ID of the VLAN interface, in the range of 1 to 4,094.

Description
Use the interface Vlan-interface command to create a VLAN interface or enter VLAN interface view. Use the undo interface Vlan-interface command to delete the VLAN interface. Related command: display interface Vlan-interface.

Example
# Enter VLAN-interface1 view
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] interface Vlan-interface 1 [Quidway-Vlan-interface1]

1.1.5 name
Syntax
name text undo name

View
VLAN view

Parameter
text: String that refers to the name of the current VLAN, in the range of 1 character to 32 characters. It can contain special characters and space.

Parameter
Use the name command to assign a name to a VLAN. Use the undo name command to restore to the default VLAN name. By default, the name of a VLAN is its VLAN ID, such as VLAN 0001.

Example
# Specify the name of VLAN 2 as test vlan.
<Quidway> system-view

Huawei Technologies Proprietary 1-5

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

System View: return to User View with Ctrl+Z. [Quidway] vlan 2 [Quidway-vlan2] name test vlan

1.1.6 shutdown
Syntax
shutdown undo shutdown

View
VLAN interface view

Parameter
None

Description
Use the shutdown command to disable the VLAN interface. Use the undo shutdown command to enable the VLAN interface. By default, the VLAN interfaces management state is enabled. In this case, the physical state of the VLAN interface is affected by the ports state in the VLAN. When all the Ethernet ports of a VLAN are down, the VLAN interface of the VLAN is down, that is, the VLAN interface is disabled; when one or more Ethernet ports of a VLAN are up, the VLAN interface of the VLAN is up, that is, the VLAN interface is enabled. If you disable the VLAN interfaces management state, the VLAN interface will always be down, regardless of the states of the ports in the VLAN. You can use the undo shutdown command to enable a VLAN interface when its related parameters and protocols are configured. When a VLAN interface fails, you can use the shutdown command to disable the interface, and then use the undo shutdown command to enable this interface again, which may restore the interface. The operation of enabling/disabling a VLAN interface does not influence the Ethernet ports belonging to this VLAN.

Example
# Disable the VLAN-interface2.
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] interface Vlan-interface 2 [Quidway-Vlan-interface2] shutdown

Huawei Technologies Proprietary 1-6

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

1.1.7 vlan
Syntax
vlan vlan-id undo vlan vlan-id

View
System view

Parameter
vlan-id: ID of the VLAN which you want to create and whose view you want to enter. This argument ranges from 1 to 4,094.

Description
Use the vlan command to enter VLAN view. If the VLAN identified by the vlan-id argument does not exist, this command creates the VLAN and then enters VLAN view. Use the undo vlan command to remove a VLAN.

Caution:
! !

VLAN 1 is the default VLAN and cannot be removed. When you use the undo vlan command to remove a VLAN which is the default VLAN of a trunk port or a hybrid port on the device, the configuration of the default VLAN of the trunk port or hybrid port does not change after the undo vlan command is executed, that is, the trunk port or the hybrid port will use the removed VLAN (the already non-existing VLAN) as its default VLAN.

Example
# Enter VLAN 1 view.
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] vlan 1 [Quidway-vlan1]

# Remove VLAN 5.
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] undo vlan 5

Huawei Technologies Proprietary 1-7

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

1.1.8 vlan to
Syntax
vlan { vlan-id1 to vlan-id2 | all } undo vlan { vlan-id1 to vlan-id2 | all }

View
System view

Parameter
vlan-id1: ID of the initial VLAN to be created, in the range of 1 to 4,094. to: Specifies the VLAN range. vlan-id2: ID of the terminal VLAN to be created, in the range of 1 to 4,094. The value of the argument is no smaller than that of the vlan-id1 argument all: Specifies all VLANs.

Description
Use the vlan to command to create multiple VLANs in batch. Use the undo vlan to command to remove multiple VLANs in batch.

Caution: The undo vlan to command or the undo vlan all command cannot be used to remove the VLANs kept by the protocol, the Voice VLANs, the default VLANs (VLAN 1), the management VLANs and the probe VLANs for remote mirroring.

Example
# Create VLAN 4 through VLAN 100.
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] vlan 4 to 100 Please wait............. Done.

# Remove VLAN 2 through VLAN 9 in batch, in which VLAN 5 is a Voice VLAN.


<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] undo vlan 2 to 9 Note:The VLAN kept by protocol, the voice VLAN, the default VLAN, the manageme

Huawei Technologies Proprietary 1-8

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

nt VLAN and the remote probe VLAN will not be deleted! Please wait... Done. [Quidway] display vlan The following VLANs exist: 1(default), 5

1.2 Port-Based VLAN Configuration Commands


1.2.1 port
Syntax
port interface-list undo port interface-list

View
VLAN view

Parameter
interface-list: List of Ethernet ports to be added to or removed from a VLAN. You need to provide this argument in the form of interface-list = { interface-type interface-number [ to interface-type interface-number ] } &<1-10>, where:
! !

interface-type is port type and interface-number is port number. The port number to the right of the to keyword must be larger than or equal to the one to the left of the keyword. &<1-10> means that you can provide up to 10 ports or ports lists.

Parameter
Use the port command to add a port or multiple ports to a VLAN. Use the undo port command to remove a port or multiple ports from a VLAN.

Caution: The port command is only applicable to access ports. To add trunk ports and hybrid ports to a VLAN, you can use the port trunk permit vlan and port hybrid vlan commands in Ethernet port view. For the configuration procedure, refer to the section Port Basic Configuration in Quidway S3900 Series Ethernet Switches Operation Manual-Release 1510.

Related command: display vlan.

Huawei Technologies Proprietary 1-9

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

Example
# Add Ethernet1/0/2 through Ethernet1/0/4 to VLAN 2.
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] vlan 2 [Quidway-vlan2] port Ethernet 1/0/2 to Ethernet 1/0/4

1.3 Protocol-Based VLAN Configuration Commands


1.3.1 display protocol-vlan interface
Syntax
display protocol-vlan interface { interface-type interface-number [ to interface-type interface-number ] | all }

View
Any view

Parameter
interface-type interface-number [ to interface-type interface-number ]: Specifies the port number of the protocol to be displayed. If you do not use the to keyword, only one port is specified. If you use the to keyword, multiple contiguous ports are specified. The interface-type argument refers to the port type and the interface-number argument refers to the port number. all: Displays the protocol-related information about all ports.

Description
Use the display protocol-vlan interface command to display the protocol information and protocol indexes configured for specified ports.

Example
# Display protocol information and protocol index configured for Ethernet1/0/1 and Ethernet1/0/2 ports.
<Quidway> display protocol-vlan interface Ethernet1/0/1 to Ethernet1/0/2 Interface: Ethernet1/0/1 VLAN ID 50 80 100 100 Protocol-Index 0 1 0 1 Protocol-type ip ip ip ipx ethernetii

Interface: Ethernet1/0/2

Huawei Technologies Proprietary 1-10

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510


VLAN ID 50 80 100 100 Protocol-Index 1 2 3 4

Chapter 1 VLAN Configuration Commands

Protocol-type ipx raw at snap etype 0x0abc llc dsap 0xac ssap 0xbd

1.3.2 display protocol-vlan vlan


Syntax
display protocol-vlan vlan { vlan-id [ to vlan-id ] | all }

View
Any view

Parameter
vlan-id: VLAN ID in the range of 1 to 4094. to: Specifies a VLAN ID range. Make sure the vlan-id argument to the right of this keyword is larger than or equal to the argument to the left of this keyword. all: Specifies all VLANs.

Description
Use the display protocol-vlan vlan command to display the protocol information and protocol indexes configured for specified VLANs. Related command: display vlan.

Example
# Display the protocol information and protocol indexes configured for VLAN 10 through VLAN 20.
<Quidway> display protocol-vlan vlan 10 to 20 VLAN ID: 10 VLAN Type: Protocol-based VLAN Protocol-Index 0 1 2 3 VLAN ID: 15 VLAN Type: Protocol-based VLAN Protocol-Index 0 1 Protocol-Type ip snap etype 0x0abcd Protocol-Type ip ip ipx ethernetii at

Huawei Technologies Proprietary 1-11

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

1.3.3 port hybrid protocol-vlan vlan


Syntax
port hybrid protocol-vlan vlan vlan-id { protocol-index [ to protocol-end ] | all } undo port hybrid protocol-vlan vlan vlan-id { protocol-index [ to protocol-end ] | all }

View
Ethernet port view

Parameter
vlan-id: VLAN ID in the range of 1 to 4094. protocol-index: Beginning protocol index in the range of 0 to 4. protocol-end: End protocol index in the range of 0 to 4. Note that this argument must be larger than or equal to the protocol-index argument. all: Specifies all protocols.

Description
Use the port hybrid protocol-vlan vlan command to associate a port with the protocol-based VLAN. Use the undo port hybrid protocol-vlan vlan command to remove the association between the specified protocol-based VLAN and a port.

" Note:
! !

The port hybrid protocol-vlan vlan command can be executed on hybrid ports only. Before you associate a port with the protocol-based VLAN, make sure the port belongs to the protocol-based VLAN. When the undo port hybrid protocol-vlan vlan command is being executed, the switch will prompt operation failure if the index of the specified protocol to be removed does not exist. If a part of the specified protocol indexes to be removed do not exist, the switch will remove the existing indexes when it prompts errors.

Related command: display protocol-vlan interface.

Example
# Associate Ethernet1/0/1 with the protocols indexed from 0 to 4 of VLAN 3 (assuming that VLAN 3 is a protocol-based VLAN).
<Quidway> system-view System View: return to User View with Ctrl+Z.

Huawei Technologies Proprietary 1-12

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510


[Quidway] interface Ethernet 1/0/1

Chapter 1 VLAN Configuration Commands

[Quidway-Ethernet1/0/1] port hybrid protocol-vlan vlan 3 0 to 4

1.3.4 protocol-vlan
Syntax
protocol-vlan [ protocol-index ] { at | ip | ipx { ethernetii | llc | raw | snap } | mode { ethernetii etype etype-id | llc { dsap dsap-id ssap ssap-id } | snap etype etype-id } } undo protocol-vlan { protocol-index [ to protocol-end ] | all }

View
VLAN view

Parameter
at: Specifies the VLAN to be an AppleTalk-based VLAN. ip: Specifies the VLAN to be an IP-based VLAN. ipx: Specifies the VLAN to be an IPX-based VLAN. The ethernetii, llc, raw and snap keywords specify the four IPX encapsulation types. mode: Configures user-defined protocol templates. ethernetii: Ethernet II encapsulation format. etype-id: Protocol type of the packet, in the range of 600 to FFFF. llc: LLC encapsulation format. dsap-id: Destination service access point. This argument ranges from 0 to FF. ssap-id: Source service access point. This argument ranges from 0 to FF. snap: SNAP encapsulation format. etype-id: Protocol type of the packet, in the range of 600 to FFFF. protocol-index: Beginning protocol index ranging from 0 to 4. Note that this argument must be less than or equal to the protocol-end argument. If you do not specify this argument, the beginning protocol index will be determined by the system. protocol-end: End protocol index ranging from 0 to 4. Note that this argument must be larger than or equal to the protocol-index argument. all: Specifies all the protocol indexes.

Huawei Technologies Proprietary 1-13

Command Manual VLAN Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 VLAN Configuration Commands

" Note: When you use the mode keyword to configure protocol-based VLANs, if you set the etype-id arguments of Ethernet II or SNAP packets to 0x0800, 0x089b, or 0x8137, the matched packets have the same format as that of IP, IPX, and Appletalk packets respectively. In order that two commands do not configure the same protocol repetitively, the switch will prompt you that you cannot specify the etype-id arguments of Ethernet II and SNAP packets to 0x0800, 0x089b, or 0x8137.

Description
Use the protocol-vlan command to configure the protocol template used for classifying protocol-based VLANs. Use the undo protocol-vlan command to disable the configuration. Related command: display protocol-vlan vlan.

Example
# Configure VLAN 3 as a protocol-based VLAN and assign IP packets to VLAN 3 for transmission.
<Quidway> system-view System View: return to User View with Ctrl+Z. [Quidway] vlan 3 [Quidway-vlan3] protocol-vlan ip

Caution: Because the IP protocol is closely associated with the ARP protocol, you are recommended to configure the ARP protocol type when configuring the IP protocol type and associate the two protocol types with the same port, in case that ARP packets and IP packets are not assigned to the same VLAN, which will cause IP address resolution failure.

# Configure an ARP protocol template. The code for the ARP protocol is 0x0806.
!

Perform the following command when Ethernet encapsulation is used. Perform the following configuration when 802.3 encapsulation format is used.

[Quidway-vlan3] protocol-vlan mode ethernetii etype 0806


!

[Quidway-vlan3] protocol-vlan mode snap etype 0806

Huawei Technologies Proprietary 1-14

Das könnte Ihnen auch gefallen