Layer 2 - LAN Switching Command Reference

HomeSupportWLANH3C WA2200 Series WLAN Access PointsReference GuidesCommand ReferencesH3C WA Series WLAN Access Points Command Reference-6W100Layer 2 - LAN Switching Command Reference
06-VLAN Commands
Title Size Download
06-VLAN Commands 90.87 KB

l          The models listed in this document are not applicable to all regions. Please consult your local sales office for the models applicable to your region.

l          Support of the H3C WA series WLAN access points (APs) for commands may vary by AP model. For more information, see Feature Matrix.

l          The interface types and the number of interfaces vary by AP model.

 

VLAN Configuration Commands

description

Syntax

description text

undo description

View

VLAN view, VLAN interface view

Default Level

2: System level

Parameters

text: Description of a VLAN or VLAN interface. Currently, the AP supports the following types of characters or symbols: standard English characters (numbers and case-sensitive letters), special English characters, spaces, and other characters or symbols that conform to the Unicode standard.

l          For a VLAN, the description string contains 1 to 32 characters.

l          For a VLAN interface, the description string contains 1 to 80 characters.

 

l          A VLAN or VLAN interface description can be the mixture of English characters and other Unicode characters. The mixed description cannot exceed the specified length.

l          To use a type of Unicode characters or symbols in a VLAN or VLAN interface description, you need to install the corresponding Input Method Editor (IME) and log in to the AP through remote login software that supports this character type.

l          Each Unicode character or symbol (non-English characters) takes the space of two regular characters. When the length of a description string reaches or exceeds the maximum line width on the terminal software, the software starts a new line, possibly breaking a Unicode character into two parts. As a result, garbled characters may be displayed at the end of a line.

 

Description

Use the description command to configure the description of the current VLAN or VLAN interface.

Use the undo description command to restore the default.

For a VLAN, the default description is the VLAN ID, for example, VLAN 0001; for a VLAN interface, the default description is the name of the interface, for example, Vlan-interface 1 Interface.

You can configure a description to describe the function or connection of a VLAN or VLAN interface for ease of management.

Examples

# Configure the description of VLAN 2 as sales-private.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2] description sales-private

# Configure the description of VLAN-interface 2 as linktoPC56.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2] quit

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] description linktoPC56

display interface vlan-interface

Syntax

display interface vlan-interface [ vlan-interface-id ]

View

Any view

Default Level

1: Monitor level

Parameters

vlan-interface-id: VLAN interface number.

Description

Use the display interface vlan-interface command to display information about a specified or all VLAN interfaces if no interface is specified.

Related commands: interface vlan-interface.

Examples

# Display the information of VLAN-interface 2.

<Sysname> display interface vlan-interface 2

Vlan-interface2 current state: DOWN

Line protocol current state: DOWN

Description: Vlan-interface2 Interface

The Maximum Transmit Unit is 1500

Internet protocol processing : disabled

IP Packet Frame Type: PKTFMT_ETHNT_2,  Hardware Address: 000f-e249-8050

Last clearing of counters:  Never

Table 1-1 display interface vlan-interface command output description

Field

Description

Vlan-interface2 current state

The physical state of a VLAN interface, which can be one of the following:

l      Administratively DOWN: The administrative state of the VLAN interface is down because it has been manually shut down with the shutdown command.

l      DOWN: The administrative state of this VLAN interface is up, but its physical state is down. It indicates that the VLAN corresponding to this interface does not contain any port in the UP state (possibly because the ports are not well connected or the lines have failed).

l      UP: both the administrative state and the physical state of this VLAN interface are up.

Line protocol current state

The link layer protocol state of a VLAN interface, which can be one of the following:

l      DOWN: The protocol state of this VLAN interface is down, usually because no IP address is configured.

l      UP: The protocol state of this VLAN interface is up.

Description

The description string of a VLAN interface

The Maximum Transmit Unit

The MTU of a VLAN interface

Internet protocol processing :

IP packets processing capability. disabled indicates that the interface is not configured with an IP address.

IP Packet Frame Type

IPv4 outgoing frame format

Hardware address

MAC address corresponding to a VLAN interface

Last clearing of counters

Time when the statistics on the VLAN interface was last cleared.

 

display vlan

Syntax

display vlan [ vlan-id1 [ to vlan-id2 ] | all | dynamic | static ]

View

Any view

Default Level

1: Monitor level

Parameters

vlan-id1: Displays the information of a VLAN specified by VLAN ID in the range of 1 to 4094.

vlan-id1 to vlan-id2: Displays the information of a range of VLANs specified by a VLAN ID range.

all: Displays information about all the VLANs.

dynamic: Displays the number of dynamic VLANs and the ID of each dynamic VLAN. Dynamic VLANs refer to VLANs that are generated through GVRP or those distributed by a RADIUS server.

static: Displays the number of static VLANs and the ID of each static VLAN. Static VLANs refer to VLANs manually created.

Description

Use the display vlan command to display VLAN information.

Related commands: vlan.

Examples

# Display VLAN 2 information.

<Sysname> display vlan 2

 VLAN ID: 2

 VLAN Type: static

 Route Interface: configured

 IP Address: 10.1.0.5

 Subnet Mask: 255.255.255.0

 Description: VLAN 0002

 Name: V2

 Tagged   Ports: none

 Untagged Ports: none

Table 1-2 display vlan command output description

Field

Description

VLAN Type

VLAN type (static or dynamic)

Route interface

Whether the VLAN interface is configured for the VLAN: not configured or configured

IP Address

Primary IP address of the VLAN interface (available only on a VLAN interface configured with an IP address). You can use the display interface vlan-interface command in any view or the display this command in VLAN interface view to display its secondary IP addresses, if any.

Subnet Mask

Subnet mask of the primary IP address (available only on a VLAN interface configured with an IP address)

Description

VLAN description

Name

VLAN name

Tagged Ports

Ports through which packets of the VLAN are sent tagged

Untagged Ports

Ports through which packets of the VLAN are sent untagged

 

interface vlan-interface

Syntax

interface vlan-interface vlan-interface-id

undo interface vlan-interface vlan-interface-id

View

System view

Default Level

2: System level

Parameters

vlan-interface-id: VLAN interface number, in the range of 1 to 4094.

Description

Use the interface vlan-interface command to create a VLAN interface and enter its view or enter the view of an existing VLAN interface.

Before you can create the VLAN interface of a VLAN, create the VLAN first.

Use the undo interface vlan-interface command to remove the specified VLAN interface.

You can use the ip address command in VLAN interface view to configure an IP address for a VLAN interface to perform IP routing.

Related commands: display interface vlan-interface.

Examples

# Create VLAN interface 2.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2] quit

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2]

ip address

Syntax

ip address ip-address { mask | mask-length } [ sub ]

undo ip address [ ip-address { mask | mask-length } [ sub ] ]

View

VLAN interface view

Default Level

2: System level

Parameters

ip-address: IP address to be assigned to the current VLAN interface, in dotted decimal format.

mask: Subnet mask in dotted decimal notation.

mask-length: Subnet mask length, the number of consecutive ones in the mask. The value range is 0 to 32.

sub: Indicates the address is a secondary IP address.

Description

Use the ip address command to assign an IP address and subnet mask to a VLAN interface.

Use the undo ip address command to remove the IP address and subnet mask for a VLAN interface.

By default, no IP address is assigned to any VLAN interface.

When a VLAN connects to one subnet, you need to assign only one IP address for its VLAN interface. When the VLAN connects to multiple subnets, you need to assign multiple IP addresses for the VLAN interface. Among these IP addresses, one is primary and the others are secondary. You can configure up to two IP addresses for a VLAN interface currently.

When configuring IP addresses for a VLAN interface, consider the following:

l          You can assign only one primary IP address to an interface.

l          Before removing the primary IP address, remove all secondary IP addresses.

l          To remove all IP addresses, use the undo ip address command without any parameter.

l          To remove the primary IP address, use the undo ip address ip-address { mask | mask-length } command.

l          To remove a secondary IP address, use the undo ip address ip-address { mask | mask-length } sub command.

Related commands: display ip interface (IP Addressing in the Layer 3 – IP Services Command Reference).

Examples

# Specify the IP address as 1.1.0.1, the subnet mask as 255.255.255.0 for VLAN-interface 1.

<Sysname> system-view

[Sysname] interface vlan-interface 1

[Sysname-Vlan-interface1] ip address 1.1.0.1 255.255.255.0

name

Syntax

name text

undo name

View

VLAN view

Default Level

2: System level

Parameters

text: VLAN name, a string of 1 to 32 characters. Spaces and special characters can be included in the name.

Description

Use the name command to configure a name for the current VLAN.

Use the undo name command to restore the default name of the VLAN.

The default name of a VLAN is its VLAN ID, VLAN 0001 for example.

When 802.1X or MAC address authentication is configured on a switch, you can use a RADIUS server to issue VLAN configuration to ports that have passed the authentication. Some servers can send IDs or names of the issued VLANs to the switch. When there are a large number of VLANs, you can use VLAN names rather than VLAN IDs to better locate VLANs.

Examples

# Configure the name of VLAN 2 as test vlan.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2] name test vlan

shutdown

Syntax

shutdown

undo shutdown

View

VLAN interface view

Default Level

2: System level

Parameters

 None

Description

Use the shutdown command to shut down a VLAN interface.

Use the undo shutdown command to bring up a VLAN interface.

By default, a VLAN interface is up except when all ports in the VLAN are down.

You can use the undo shutdown command to bring up a VLAN interface after setting related parameters and protocols for the VLAN interface. When a VLAN interface fails, you can shut down the interface with the shutdown command and then bring it up with the undo shutdown command. In this way, the interface may resume.

The state of any port in a VLAN is independent of the VLAN interface state.

Examples

# Shut down VLAN interface 2 and then bring it up.

<Sysname> system-view

[Sysname] interface vlan-interface 2

[Sysname-Vlan-interface2] shutdown

[Sysname-Vlan-interface2] undo shutdown

vlan

Syntax

vlan { vlan-id1 [ to vlan-id2 ] }

undo vlan { vlan-id1 [ to vlan-id2 ] }

View

System view

Default Level

2: System level

Parameters

vlan-id1/vlan-id2: VLAN ID, in the range 1 to 4094.

vlan-id1 to vlan-id2: Specifies a VLAN range. A VLAN ID is in the range 1 to 4094. Note that vlan-id2 must be no smaller than vlan-id1.

Description

Use the vlan vlan-id command to create a VLAN and enter its view or enter the view of an existing VLAN.

Use the vlan vlan-id1 to vlan-id2 command to create a range of VLANs specified by vlan-id1 to vlan-id2.

Use the undo vlan command to remove the specified VLAN(s).

As the default VLAN, VLAN 1 cannot be created or removed.

Related commands: display vlan.

Examples

# Enter VLAN 2 view.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2]

# Create VLAN 4 through VLAN 100.

<Sysname> system-view

[Sysname] vlan 4 to 100

Please wait............. Done.

Port-Based VLAN Configuration Commands

display port

Syntax

display port { hybrid | trunk }

View

Any view

Default Level

1: Monitor level

Parameters

hybrid: Displays hybrid ports.

trunk: Displays trunk ports.

Description

Use the display port command to display information about hybrid or trunk ports on the AP, including the port names, default VLAN IDs, and allowed VLAN IDs.

Examples

# Display information about hybrid ports in the system.

<Sysname> display port hybrid

Interface            PVID  VLAN passing

Eth1/0/1             100   Tagged:  1000, 1002, 1500, 1600-1611, 2000,

                                    2555-2558, 3000, 4000

                           Untagged:1, 10, 15, 18, 20-30, 44, 55, 67, 100,

                                    150-160, 200, 255, 286, 300-302

Table 1-3 display port command output description

Field

Description

Interface

Port name

PVID

Default VLAN ID of the port

VLAN passing

VLANs whose packets are allowed to pass through the port.

Tagged

VLANs whose packets are required to pass through the port tagged.

Untagged

VLANs whose packets are required to pass through the port untagged.

 

port

Syntax

port interface-list

undo port interface-list

View

VLAN view

Default Level

2: System level

Parameters

interface interface-list: Specifies an Ethernet port list, in the format of interface-list = { interface-type interface-number [ to interface-type interface-number ] }&<1-10>, where &<1-10> indicates that you can specify up to 10 ports or port ranges.

Description

Use the port command to assign one or multiple access ports to the current VLAN.

Use the undo port command to remove one or multiple access ports from the current VLAN.

By default, all ports are in VLAN 1.

This command is only applicable on access ports.

All ports are access ports by default, but you can manually configure the link type of ports. For more information, see the port link-type command.

Related commands: display vlan.

Examples

# Assign Ethernet 1/0/1 and Ethernet 1/0/2 to VLAN 2.

<Sysname> system-view

[Sysname] vlan 2

[Sysname-vlan2] port ethernet 1/0/1 to ethernet 1/0/2

port access vlan

Syntax

port access vlan vlan-id

undo port access vlan

View

Ethernet interface view

Default Level

2: System level

Parameters

vlan-id: VLAN ID, in the range of 1 to 4094. Make sure that the VLAN specified by the VLAN ID already exists.

Description

Use the port access vlan command to assign the current access port to the specified VLAN.

Use the undo port access vlan command to restore the default.

By default, all access ports belong to VLAN 1.

Examples

# Assign Ethernet 1/0/1 to VLAN 3.

<Sysname> system-view

[Sysname] vlan 3

[Sysname-vlan3] quit

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] port access vlan 3

port hybrid pvid vlan

Syntax

port hybrid pvid vlan vlan-id

undo port hybrid pvid

View

Ethernet interface view

Default Level

2: System level

Parameters

vlan-id: VLAN ID, in the range of 1 to 4094.

Description

Use the port hybrid pvid vlan command to configure the default VLAN ID of the hybrid port.

Use the undo port hybrid pvid command to restore the default.

By default, the default VLAN of a hybrid port is VLAN 1.

You can use a nonexistent VLAN as the default VLAN for a hybrid port. Removing the default VLAN of a hybrid port with the undo vlan command does not affect the setting of the default VLAN on the port.

It is recommended that you configure the same default VLAN ID for the local and remote hybrid ports.

After configuring the default VLAN for a hybrid port, you must use the port hybrid vlan command to configure the hybrid port to allow packets from the default VLAN to pass through, so that the port can forward packets from the default VLAN.

Related commands: port link-type and port hybrid vlan.

Examples

# Configure VLAN 100 as the default VLAN of hybrid port Ethernet 1/0/1.

<Sysname> system-view

[Sysname] vlan 100

[Sysname-vlan100] quit

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] port link-type hybrid tagged 100

[Sysname-Ethernet1/0/1] port hybrid pvid vlan 100

port hybrid vlan

Syntax

port hybrid vlan vlan-id-list { tagged | untagged }

undo port hybrid vlan vlan-id-list

View

Ethernet interface view

Default Level

2: System level

Parameters

vlan-id-list: VLANs that the hybrid port will be assigned to. This argument is expressed in the format of [ vlan-id1 [ to vlan-id2 ] ]&<1-10>, where vlan-id ranges from 1 to 4094 and &<1-10> indicates that you can specify up to 10 VLAN IDs or VLAN ID ranges. Be sure that the specified VLANs already exist.

tagged: Specifies the Ethernet interface to send the packets of the specified VLANs with the tags kept.

untagged: Specifies the Ethernet interface to send the packets of the specified VLANs with the tags removed.

Description

Use the port hybrid vlan command to assign the current hybrid port to the specified VLAN(s).

Use the undo port hybrid vlan command to remove the current hybrid port from the specified VLAN(s).

By default, a hybrid port only allows packets from VLAN 1 to pass through untagged.

A hybrid port can carry traffic of multiple VLANs. If you execute the port hybrid vlan command multiple times, the VLANs whose traffic the hybrid port carries are the set of VLANs specified by vlan-id-list in each execution.

Related commands: port link-type.

Examples

# Assign hybrid port Ethernet 1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100 (assume these VLANs already exist) in tagged mode.

<Sysname> system-view

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] port link-type hybrid

[Sysname-Ethernet1/0/1] port hybrid vlan 2 4 50 to 100 tagged

port link-type

Syntax

port link-type { access | hybrid | trunk }

undo port link-type

View

Ethernet interface view

Default Level

2: System level

Parameters

access: Configures the link type of a port as access.

hybrid: Configures the link type of a port as hybrid.

trunk: Configures the link type of a port as trunk.

Description

Use the port link-type command to configure the link type of a port.

Use the undo port link-type command to restore the default link type of a port.

By default, any port is an access port.

 

To change the link type of a port from trunk to hybrid or vice versa, you must set the link type to access first.

 

Examples

# Configure Ethernet 1/0/1 as a trunk port.

<Sysname> system-view

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] port link-type trunk

port trunk permit vlan

Syntax

port trunk permit vlan { vlan-id-list | all }

undo port trunk permit vlan { vlan-id-list | all }

View

Ethernet interface view

Default Level

2: System level

Parameters

vlan-id-list: VLANs that the trunk port will be assigned to. This argument is expressed in the format of [vlan-id1 [ to vlan-id2 ] ]&<1-10>, where vlan-id ranges from 1 to 4094 and &<1-10> indicates that you can specify up to 10 VLAN IDs or VLAN ID ranges.

all: Assigns the trunk port to all VLANs. On GVRP-enabled trunk ports, you must configure the port trunk permit vlan all command to ensure that the traffic of all dynamically registered VLANs can pass through. However, When GVRP is disabled on a port, you are discouraged to configure the command on the port. This is to prevent users of unauthorized VLANs from accessing restricted resources through the port.

Description

Use the port trunk permit vlan command to assign the current trunk port to the specified VLAN(s).

Use the undo port trunk permit vlan command to remove the trunk port from the specified VLANs.

By default, a trunk port allows only packets from VLAN 1 to pass through.

A trunk port can carry traffic of multiple VLANs. If you execute the port trunk permit vlan command multiple times, the VLANs whose traffic the trunk port carries are the set of VLANs specified by vlan-id-list in each execution.

On a trunk port, only traffic of the default VLAN can pass through untagged.

Related commands: port link-type.

Examples

# Assign trunk port Ethernet 1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100.

<Sysname> system-view

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] port link-type trunk

[Sysname-Ethernet1/0/1] port trunk permit vlan 2 4 50 to 100

Please wait........... Done.

port trunk pvid vlan

Syntax

port trunk pvid vlan vlan-id

undo port trunk pvid

View

Ethernet interface view

Default Level

2: System level

Parameters

vlan-id: VLAN ID, in the range of 1 to 4094

Description

Use the port trunk pvid vlan command to configure the default VLAN ID for the trunk port.

Use the undo port trunk pvid command to restore the default.

By default, the default VLAN of a trunk port is VLAN 1.

You can use a nonexistent VLAN as the default VLAN for a trunk port. Removing the default VLAN of a trunk port with the undo vlan command does not affect the setting of the default VLAN on the port.

The local and remote trunk ports must use the same default VLAN ID for the traffic of the default VLAN to be transmitted properly.

After configuring the default VLAN for a trunk port, you must use the port trunk permit vlan command to configure the trunk port to allow packets from the default VLAN to pass through, so that the port can forward packets from the default VLAN.

Related commands: port link-type and port trunk permit vlan.

Examples

# Configure VLAN 100 as the default VLAN of trunk port Ethernet 1/0/1.

<Sysname> system-view

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] port link-type trunk

[Sysname-Ethernet1/0/1] port trunk pvid vlan 100

MAC Address-Based VLAN Configuration Commands

display mac-vlan

Syntax

display mac-vlan { all | dynamic | mac-address mac-address [ mask mac-mask ] | static | vlan vlan-id }

View

Any view

Default Level

1: Monitor level

Parameters

all: Displays all the MAC address-to-VLAN entries.

dynamic: Displays dynamically configured MAC address-to-VLAN entries.

mac-address mac-address: Displays the MAC address-to-VLAN entry containing the specified MAC address.

mask mac-mask: Displays the MAC address-to-VLAN entries with their MAC addresses in the specified range.

static: Displays the statically configured MAC address-to-VLAN entries.

vlan vlan-id: Displays the MAC address-to-VLAN entries associated with the specified VLAN.

Description

Use the display mac-vlan command to display the specified MAC address-to-VLAN entries.

If mac-address mac-addr is specified while mask is not specified, only the MAC address-to-VLAN entry containing the specified MAC address is displayed.

Examples

# Display all the MAC address-to-VLAN entries.

<Sysname> display mac-vlan all

The following MAC-VLAN address exist:

S: Static   D: Dynamic

MAC ADDR           MASK                    VLAN ID   PRIO    STATE

-------------------------------------------------------------------

0008-0001-0000     FFFF-FF00-0000          5         3       S

0002-0001-0000     FFFF-FFFF-FFFF          5         3       S&D

 

Total MAC VLAN address count:2

Table 1-4 display mac-vlan command output description

Field

Description

S: Static

Character S stands for MAC address-to-VLAN entries that are configured statically.

D: Dynamic

Character D stands for MAC address-to-VLAN entries that are configured dynamically.

MAC ADDR

MAC address of a MAC address-to-VLAN entry

MASK

Mask of the MAC address of a MAC address-to-VLAN entry

VLAN ID

VLAN ID of a MAC address-to-VLAN entry

PRIO

802.1p priority corresponding to the MAC address of a MAC address-to-VLAN entry

STATE

The state of a MAC address-to-VLAN entry, which can be:

l      S, indicating that the MAC address-to-VLAN entry is configured statically.

l      D, indicating that the MAC address-to-VLAN entry is configured automatically through the authentication server

l      S&D, indicating that the MAC address-to-VLAN entry is configured both statically and dynamically

 

display mac-vlan interface

Syntax

display mac-vlan interface

View

Any view

Default Level

1: Monitor level

Parameters

None

Description

Use the display mac-vlan interface command to display all the ports with MAC address-based VLAN enabled.

Related commands: mac-vlan enable.

Examples

# Display all the interfaces with MAC address-based VLAN enabled.

<Sysname> display mac-vlan interface

MAC VLAN is enabled on following ports:

---------------------------------------

 Ethernet1/0/1  Ethernet1/0/2

mac-vlan enable

Syntax

mac-vlan enable

undo mac-vlan enable

View

Ethernet port view

Default Level

2: System level

Parameters

None

Description

Use the mac-vlan enable command to enable MAC address-based VLAN on a port.

Use the undo mac-vlan enable command to disable MAC address-based VLAN on a port.

By default, MAC address-based VLAN is not enabled on a port.

Examples

# Enable MAC address-based VLAN on Ethernet 1/0/1.

<Sysname> system-view

[Sysname] interface ethernet 1/0/1

[Sysname–Ethernet1/0/1] mac-vlan enable

mac-vlan mac-address

Syntax

mac-vlan mac-address mac-address [ mask mac-mask ] vlan vlan-id [ priority pri ]

undo mac-vlan { all | mac-address mac-address [ mask mac-mask ] | vlan vlan-id }

View

System view

Default Level

2: System level

Parameters

mac-address mac-address: Specifies a MAC address.

mask mac-mask: Specifies a mask for the MAC address in the format of H-H-H. The high-order part of the mac-mask argument must be binary bits of all 1s,

vlan vlan-id: Specifies a VLAN ID, in the range of 1 to 4094.

priority pri: Specifies the 802.1p priority value corresponding to the specified MAC address. This argument is in the range of 0 to 7, and defaulted to 0.

all: Removes all the static MAC address-to-VLAN entries.

Description

Use the mac-vlan mac-address command to associate the specified VLAN and priority value with the specified MAC addresses.

Use the undo mac-vlan command to remove the association.

The AP maintains two MAC address-to-VLAN entry tables. One table contains the MAC address-to-VLAN entries configured with the mask keyword specified. A MAC address-to-VLAN entry of this type describes the relationship between a group of MAC addresses and a VLAN, and a priority value. Another table contains the MAC address-to-VLAN entries configured without the mask keyword specified. A MAC address-to-VLAN entry of this type describes the relationship between individual MAC addresses and VLANs, and priority values. The system adds/removes MAC address-to-VLAN entries to/from these two tables according to your configuration.

Examples

# Associate MAC address 0-1-1 with VLAN 100 and 802.1p priority 7.

<Sysname> system-view

[Sysname] mac-vlan mac-address 0-1-1 vlan 100 priority 7

# Associate the MAC addresses with the high-order six hexadecimal digits being 111122 with VLAN 100 and 802.1p priority 4.

<Sysname> system-view

[Sysname] mac-vlan mac-address 1111-2222-3333 mask ffff-ff00-0000 vlan 100 priority 4

vlan precedence

Syntax

vlan precedence { mac-vlan | ip-subnet-vlan }

undo vlan precedence

View

Ethernet port view

Default Level

2: System level

Parameters

mac-vlan: Specifies the Ethernet port to match VLANs based on MAC addresses preferentially.

ip-subnet-vlan: Specifies the Ethernet port to match VLANs based on IP subnet settings preferentially.

Description

Use the vlan precedence command to set the order of VLAN matching.

Use the undo vlan precedence command to restore the default.

By default, VLANs are matched based on MAC addresses preferentially.

This command only applies to VLANs based on a single MAC address and IP subnet-based VLANs. If both MAC address-based VLAN and IP subnet-based VLAN are enabled on a port, MAC address-to-VLAN entries configured with the mask keyword specified are matched preferentially, and the left VLAN entries (VLAN entries based on a single MAC address and IP subnet-based VLANs) are matched as configured by the vlan precedence command.

Examples

# Configure to match VLANs based on MAC addresses preferentially on Ethernet 1/0/1.

<Sysname> system-view

[Sysname] interface ethernet 1/0/1

[Sysname-Ethernet1/0/1] vlan precedence mac-vlan

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网