H3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)

HomeSupportSwitchesH3C S7500 Switch SeriesReference GuidesCommand ReferencesH3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)
04-VLAN Commands
Title Size Download
04-VLAN Commands 128 KB

Chapter 1  VLAN Configuration Commands

1.1  VLAN Configuration Commands

1.1.1  broadcast-suppression

Syntax

broadcast-suppression { ratio | pps pps }

undo broadcast-suppression

View

VLAN view

Parameters

ratio: Maximum bandwidth ratio of broadcast traffic allowed in the specified VLAN. Its value ranges from 1 to 100 and defaults to 100. The smaller the ratio is, the less the broadcast traffic can pass through the VLAN.

pps pps: Specifies the maximum number of broadcast packets that can pass through a specific VLAN per second. Its value ranges from 1 to 148,800.

Description

Use the broadcast-suppression command to suppress broadcast traffic through a VLAN.

Use the undo broadcast-suppression command to reset the allowed broadcast traffic through a VLAN to the default value.

By default, the switch does not suppress broadcast traffic.

When the actual broadcast traffic exceeds the specified value, the system will discard the extra packets so that the bandwidth occupied by broadcast traffic can be kept within a specific ratio to ensure normal network operation.

The cards of S7500 series switches support different broadcast storm suppression modes, as listed in Table 1-1.

Table 1-1 Broadcast storm suppression modes and card types

Broadcast storm suppression mode

Type A card

Non-type-A card

VLAN pps suppression

Supported

Not supported

VLAN bandwidth ratio suppression

Supported

Not supported

 

&  Note:

Type A cards include LS81FT48A, LS81FM24A, LS81FS24A, LS81GB8UA, LS81GT8UA, iSalience I, Salience I and Salience II.

 

A VLAN only supports one broadcast storm suppression mode at one time. If you configure broadcast storm suppression modes multiple times for a VLAN, the latest configuration will overwrite the previous configuration.

Examples

# Allow broadcast traffic to occupy 20% bandwidth in VLAN 2.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 2

[H3C-vlan2] broadcast-suppression 20

1.1.2  description

Syntax

description { string | text }

undo description

View

VLAN view, VLAN interface view

Parameters

string: Contiguous string describing the VLAN. It contains 1 to 32 characters without space. The default value is the VLAN ID, for example, “VLAN 0001”.

text: Text describing the VLAN interface. It contains 1 to 80 characters and space is allowed. The default value is the VLAN interface name, for example, “Vlan-interface1 Interface”.

Description

Use the description command to set the description string or text for the current VLAN or VLAN interface.

Use the undo description command to restore the default description string or text.

By default, the description string of a VLAN is its VLAN ID, for example, ”VLAN 0001”; the descriptive text of a VLAN interface is its name, for example, “Vlan-interface 1 Interface”.

Related commands: display vlan, display interface Vlan-interface.

Examples

# Specify the description string of the current VLAN as research.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 1

[H3C-vlan1] description research

1.1.3  display interface Vlan-interface

Syntax

display interface Vlan-interface [ vlan-id ]

View

Any view

Parameters

vlan-id: ID of the specified VLAN interface.

Description

Use the display interface Vlan-interface command to display the related information of a 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, and descriptive 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 commands: interface Vlan-interface.

Examples

# Display the information about VLAN-interface 2.

<H3C> 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 0012-a990-2241

Internet Address is 10.1.1.1/24 Primary

Description : Vlan-interface2 Interface

The Maximum Transmit Unit is 1500

Table 1-2 Description on the fields of the display interface Vlan-interface command

Field

Description

Vlan-interface2 current state

Current state of the VLAN interface

Line protocol current state

Current state of the Line protocol

IP Sending Frames' Format

Format of the frames that IP sends

Hardware address

MAC address corresponding to the VLAN interface

Internet Address

IP address corresponding to the VLAN interface

Description

Description on the VLAN interface

The Maximum Transmit Unit

Maximum transmission unit

 

1.1.4  display vlan

Syntax

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

View

Any view

Parameters

vlan-id: VLAN ID, ranging from 1 to 4094.

to: Specifies multiple contiguous VLAN IDs.

all: Specifies to display the information about all the VLANs.

static: Specifies to display the VLANs created statically.

dynamic: Specifies to display the VLANs created dynamically.

Description

Use the display vlan command to display information about specified VLANs or all VLANs.

If the vlan-id argument or the all keyword is specified, the information about the specified VLANs or all VLANs is displayed, including VLAN ID, VLAN type (dynamic or static), routing function status (If enabled, the primary IP address and mask are displayed), VLAN description and VLAN name, VLAN broadcast storm suppression ratio, and VLAN member ports.

If no argument or keyword is specified, this command displays the list of all the existing VLANs. If the dynamic or static keyword is specified, this command displays the list of the VLANs that are created dynamically or statically.

Related commands: vlan.

Examples

# Display the information about VLAN 2.

<H3C> display vlan 2

 VLAN ID: 2

 VLAN Type: static

 Route Interface: not configured

Description: VLAN 0002

 Name: VLAN 0002

Broadcast MAX-ratio: 100

 Tagged   Ports: none

 Untagged Ports: 

  Ethernet3/0/30         

Table 1-3 Description of the fields of the display vlan command

Field

Description

VLAN ID

VLAN ID

VLAN Type

VLAN type (dynamic or static)

Route Interface

Whether the routing interface function is enable for this VLAN

Description

Description on the VLAN

Name

VLAN name

Broadcast MAX-ratio

VLAN broadcast storm suppression ratio

Tagged Ports

Ports through which packets are sent with VLAN tags kept.

Untagged Ports

Ports through which packets are sent with VLAN tags stripped off.

 

1.1.5  interface Vlan-interface

Syntax

interface Vlan-interface vlan-id

undo interface Vlan-interface vlan-id

View

System view

Parameters

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 commands: display interface Vlan-interface.

Examples

# Enter VLAN-interface 1 view

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Vlan-interface 1

[H3C-Vlan-interface1]

1.1.6  name

Syntax

name string

undo name

View

VLAN view

Parameters

string: String that refers to the VLAN name. It contains 1 to 32 characters.

Description

Use the name command to assign a name to the current VLAN.

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

By default, the name of a VLAN is its VLAN ID, for example, “VLAN 0001”.

Examples

# Specify the name of VLAN 2 as hello.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 2

[H3C-vlan2] name hello

1.1.7  shutdown

Syntax

shutdown

undo shutdown

View

VLAN interface view

Parameters

None

Description

Use the shutdown command to disable a VLAN interface.

Use the undo shutdown command to enable a VLAN interface.

By default, a VLAN interface is enabled. In this scenario, the VLAN interface’s status is determined by the status of its ports, that is, if all the ports of the VLAN are down, the VLAN interface is down (disabled); if one or more ports of the VLAN are up, the VLAN interface is up (enabled).

If a VLAN interface is disabled, its status is not determined by the status of its ports.

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 any Ethernet port belonging to this VLAN.

Examples

# Disable VLAN-interface 2 and then enable it.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Vlan-interface 2

[H3C-Vlan-interface2] shutdown

[H3C-Vlan-interface2] undo shutdown

1.1.8  vlan

Syntax

vlan vlan-id

undo vlan { vlan-id [ to vlan-id ] | all }

View

System view

Parameters

vlan-id: ID of the VLAN that you want to enter. Its value ranges from 1 to 4,094.

to: Specifies the range of VLANs to be removed.

all: Specifies to remove all VLANs.

Description

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

Use the undo vlan command to remove a VLAN.

 

  Caution:

l      The protocol reserved VLAN, Voice VLAN, the system default VLAN (VLAN 1) and remote-probe VLAN used for remote mirroring cannot be removed by the undo vlan command.

l      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 port will use VLAN 1 as the default VLAN after the undo vlan command is executed.

 

Related commands: display vlan

Examples

# Enter VLAN 1 view.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 1

[H3C-vlan1]

1.2  Port-Based VLAN Configuration Commands

1.2.1  port

Syntax

port interface-list

undo port interface-list

View

VLAN view

Parameters

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:

l           interface-type is port type and interface-number is port number. For detailed explanation, refer to port related command part in this manual.

l           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.

l           &<1-10> means that you can specify up to ten ports or port ranges.

Description

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 related command information, refer to the Port Basic Configuration part in H3C S7500 Series Ethernet Switches – Command Manual.

 

Related commands: display vlan.

Examples

# Add Ethernet 2/0/1 through Ethernet 2/0/3 to VLAN 2.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 2

[H3C-vlan2] port Ethernet2/0/1 to Ethernet2/0/3

1.2.2  port access vlan

Syntax

port access vlan vlan-id

undo port access vlan

View

Ethernet port view

Parameters

vlan-id: VLAN ID defined in IEEE802.1Q, in the range of 2 to 4,094.

Description

Use the port access vlan command to add the access port into the specified VLAN.

Use the undo port access vlan command to remove the access port from the specified VLAN.

You must specify the ID of an existing VLAN in the command.

Examples

# Add Ethernet 2/0/1 into VLAN 3 (VLAN 3 is an existing VLAN).

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet2/0/1

[H3C-Ethernet2/0/1] port access vlan 3

1.2.3  port hybrid pvid vlan

Syntax

port hybrid pvid vlan vlan-id

undo port hybrid pvid

View

Ethernet port view

Parameters

vlan-id: VLAN ID defined in IEEE802.1Q, in the range of 1 to 4094. It is 1 by default.

Description

Use the port hybrid pvid vlan command to set the default VLAN ID for the hybrid port.

Use the undo port hybrid pvid command to restore the default VLAN ID of the hybrid port.

Set the default VLAN ID of the local hybrid port to the same value as that of the hybrid port on the peer switch. Otherwise, packets cannot be forwarded properly.

Related commands: port link-type.

Examples

# Set the default VLAN ID of the hybrid port Ethernet 2/0/1 to 100.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet2/0/1

[H3C-Ethernet2/0/1] port hybrid pvid vlan 100

1.2.4  port hybrid vlan

Syntax

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

undo port hybrid vlan vlan-id-list

View

Ethernet port view

Parameters

vlan-id-list: VLAN range to which the hybrid port will be added. vlan-id-list = [ vlan-id1 [ to vlan-id2 ] ]&<1-10>, where, vlan-id is in the range of 1 to 4094 and can be discrete, and &<1-10> means you can input up to ten VLAN IDs/ID ranges.

tagged: Specifies to keep VLAN tags when packets of the specified VLANs are sent.

untagged: Specifies to strip off VLAN tags when packets of the specified VLANs are sent.

Description

Use the port hybrid vlan command to add the hybrid port into specified VLANs.

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

A hybrid port can belong to multiple VLANs. When you use the command several times, all VLAN specified in the commands will be allowed to pass the port.

The VLAN specified by the vlan-id argument must be existing. Otherwise, this command is invalid.

Related commands: port link-type.

Examples

# Add the hybrid port Ethernet 2/0/1 to VLAN 2, VLAN 4 and VLAN 50 through VLAN 100, and configure the port to keep the VLAN tags of packets of these VLANs when it sends the packets.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet2/0/1

[H3C-Ethernet2/0/1] port hybrid vlan 2 4 50 to 100 tagged

1.2.5  port link-type

Syntax

port link-type { access | hybrid | trunk }

undo port link-type

View

Ethernet port view

Parameters

access: Sets the port as an access port.

hybrid: Sets the port as a hybrid port.

trunk: Sets the port as a trunk port.

Description

Use the port link-type command to set the link type of the current Ethernet port.

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

The three types of ports can co-exist on the same Ethernet switch. However, a trunk port cannot be directly switched to a hybrid port, and vice versa. To set a trunk/hybrid port to another type (different from access), you must first set the port to an access port and then set the access port to the required type. For example, a trunk port cannot be directly set to a hybrid port. You must set the trunk port to an access port and then set it to a hybrid port.

By default, the link type of any port is access.

Examples

# Set Ethernet 2/0/1 as a trunk port.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet2/0/1

[H3C-Ethernet2/0/1] port link-type trunk

1.2.6  port trunk permit vlan

Syntax

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

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

View

Ethernet port view

Parameters

vlan-id-list: VLAN range to which the trunk port will be added. vlan-id-list = [ vlan-id1 [ to vlan-id2 ] ]&<1-10>, where, vlan-id is in the range of 1 to 4094 and can be discrete, and &<1-10> means you can input up to ten VLAN IDs/ID ranges.

all: Adds the trunk port into all VLANs.

Description

Use the port trunk permit vlan command to add the trunk port into the specified VLAN.

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

A trunk port can belong to multiple VLANs. When you use the command several times, all VLAN specified in the commands will be allowed to pass the port.

Related commands: port link-type.

Examples

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

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet2/0/1

[H3C-Ethernet2/0/1] port trunk permit vlan 2 4 50 to 100

Please wait...

Done.

# Remove Ethernet 2/0/1 form VLAN 1.

[H3C-Ethernet2/0/1] undo port trunk permit vlan 1

Please wait...

Done.

1.2.7  port trunk pvid vlan

Syntax

port trunk pvid vlan vlan-id

undo port trunk pvid

View

Ethernet port view

Parameters

vlan-id: VLAN ID defined in IEEE802.1Q, in the range of 1 to 4094. It is 1 by default.

Description

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

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

To guarantee the proper packet transmission, the default VLAN ID of the local trunk port must be identical with that of the trunk port on the peer switch connected with the local trunk port.

Related commands: port link-type.

Examples

# Set the default VLAN ID of the trunk port Ethernet 2/0/1 to 100.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet2/0/1

[H3C-Ethernet2/0/1] port trunk pvid vlan 100

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

Parameters

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-based VLAN information, including VLAN ID, protocol index and protocol type.

Related commands: display interface.

Examples

# Display protocol information and protocol index configured for Ethernet 2/0/1 and Ethernet 2/0/2.

<H3C> display protocol-vlan interface Ethernet 2/0/1 to Ethernet 2/0/2

Interface: Ethernet2/0/1

VLAN ID  Protocol-Index     Protocol-type

  50           1                ip 192.168.10.1 255.255.255.0

  80           2                ip 101.120.34.0 255.255.0.0

  100              1                ip 104.232.43.0 255.255.255.0

  100              2                ipx ethernetii

Interface: Ethernet2/0/2

VLAN ID  Protocol-Index     Protocol-type

  50           5                ipx raw

  80           1                at

  100              3                snap etype 0x0abc

  100              5                llc dsap 0xac ssap 0xbd

1.3.2  display protocol-vlan slot

Syntax

display protocol-vlan slot { slot-number | all }

View

Any view

Parameters

slot-number: Specifies card resident slot number.

all: Specifies all cards.

Description

Use the display protocol-vlan slot command to display information about the protocol-based VLAN on the specified card, including VLAN ID, protocol index and protocol type.

Examples

# Display information about protocol-based VLANs on all cards.

<H3C> display protocol-vlan slot all

 Slot: 0

     VLAN ID        Protocol-Index     Protocol-Type

         4              0                 ip 10.1.1.1 255.255.255.0

         4              1                 ip 192.168.1.1 255.0.0.0

         4              2                 ip 10.1.0.4 255.0.0.0

         4              3                 ip 172.168.0.1 255.255.0.0

         4              4                 ip 172.168.1.1 255.255.255.0

1.3.3  display protocol-vlan vlan

Syntax

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

View

Any view

Parameters

vlan-id: VLAN ID, ranging from 1 to 4,094.

to: Specifies the range of VLAN IDs.

all: Specifies all VLANs.

Description

Use the display protocol-vlan vlan command to display the protocol information and protocol index configured for specified or all VLANs.

Related commands: display vlan.

Examples

# Display the protocol information and protocol indexes configured for VLAN 2 through VLAN 20.

<H3C> display protocol-vlan vlan 2 to 20

VLAN ID: 2

VLAN Type: Protocol-based VLAN

  Protocol Index        Protocol Type

             0                  ip 1.1.1.0 255.255.255.0

 

 VLAN ID: 20

 VLAN Type: Protocol-based VLAN

      Protocol Index        Protocol Type

             0                  ip 192.168.0.0 255.255.255.0

             1                  ipx ethernetii

             2                  snap etype 0x0abc

             3                  llc dsap 0xac ssap 0xbd

1.3.4  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

Parameters

vlan-id: VLAN ID, ranging from 1 to 4,094.

to: Specifies the range for VLAN IDs.

protocol-index: Beginning protocol index, ranging from 0 to 6. Its value must be smaller than or equal to the value of the protocol-end argument.

protocol-end: End protocol index, ranging from 0 to 6. Its value must be greater than or equal to the value of the protocol-index argument.

all: Specifies all protocol indexes.

Description

Use the port hybrid protocol-vlan vlan command to associate the current port with the protocol template(s) of the protocol-based VLAN.

Use the undo port hybrid protocol-vlan vlan command to remove the association between the specified protocol template(s) of the protocol-based VLAN and the port.

Related commands: protocol-vlan vlan slot, display protocol-vlan interface.

Examples

# Associate port Ethernet 2/0/1 with protocol-based VLAN 3, whose protocol index is from 0 to 6.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] interface Ethernet2/0/1

[H3C-Ethernet2/0/1] port hybrid protocol-vlan vlan 3 0 to 6

1.3.5  protocol-vlan vlan slot

Syntax

protocol-vlan vlan vlan-id { protocol-index [ to protocol-end ] | all } { slot slot-number | mainboard }

undo protocol-vlan vlan vlan-id { protocol-index [ to protocol-end ] | all } { slot slot-number | mainboard }

View

System view

Parameters

vlan-id: VLAN ID, ranging from 1 to 4094.

protocol-index: Beginning protocol index, ranging from 0 to 6. Its value must be smaller than or equal to the value of the protocol-end argument.

protocol-end: End protocol index, ranging from 0 to 6. Its value must be greater than or equal to the value of the protocol-index argument.

all: Specifies all protocol indexes.

slot slot-number: Specify to associate a card with a protocol-based VLAN. The slot-number argument specifies card slot number.

mainboard: SRPU.

Description

Use the protocol-vlan vlan slot command to associate a card with protocol-based VLAN.

Use the undo protocol-vlan vlan slot command to cancel the association.

Note that it is necessary to add those ports that require protocol on the card to the protocol-based VLAN. Currently, only cards other than type A, including LPUs and SRPU, support this command.

Table 1-4 shows the supported protocol-based VLAN creation commands on different cards.

Table 1-4 Protocol-based VLAN creation commands on different cards

Command description

Type A card

Non-type-A card

Create protocol-based VLAN on specific card in system view.

Not supported

Supported (for all IP protocols and subnet IP protocols)

Create protocol-based VLAN on specific port in Ethernet port view.

Supported

Supported (exclude all IP protocols and subnet IP protocols)

 

&  Note:

Type A cards include LS81FT48A, LS81FM24A, LS81FS24A, LS81GB8UA, LS81GT8UA, iSalience I, Salience I and Salience II.

 

Related commands: port hybrid protocol-vlan vlan, display protocol-vlan interface.

Examples

# Associate protocols 0 to 6 in VLAN 3 with card 5.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] protocol-vlan vlan 3 0 to 6 slot 5

1.3.6  protocol-vlan

Syntax

protocol-vlan [ protocol-index ] { at | ip [ ip-address [ net-mask ] ] | ipx { ethernetii | llc | raw | snap } | mode { ethernetii [ etype etype-id ] | llc [ dsap dsap-id [ ssap ssap-id ] | ssap ssap-id ] | snap [ etype etype-id ] } }

undo protocol-vlan { protocol-index [ to protocol-end ] | all }

View

VLAN view

Parameters

at: Specifies an AppleTalk (AT)-based VLAN.

ip [ ip-address [ net-mask ] ]: Specifies an IP-based VLAN. The ip-address argument specifies IP address and the net-mask argument specifies subnet mask. The default subnet mask is the mask of the network where ip-address belongs.

ipx { ethernetii | llc | raw I snap }: Specifies IPX protocol-based VLAN. The ethernetii, llc, raw and snap keywords indicate four encapsulation types.

mode: Specifies VLAN based on other protocol type and encapsulation format.

ethernetii [ etype etype-id ]: Specifies EthernetII encapsulation-based VLAN. The etype-id argument indicates the Ethernet type of the incoming packets, and its value ranges from 600 to FFFF.

llc [ dsap dsap-id [ ssap ssap-id ] | ssap ssap-id ]: Specifies VLAN based on logical link control encapsulation format. The dsap-id argument indicates the destination service access point and its value ranges from 0 to FF. The ssap-id argument indicates the source service access point and its value ranges from 0 to FF.

snap [ etype etype-id ]: Specifies VLAN based on sub-network access protocol (SNAP) encapsulation format. The etype-id argument indicates the Ethernet type of incoming packets and its value ranges from 600 to FFFF.

protocol-index: Beginning protocol index, ranging from 0 to 6. Its value must be smaller than or equal to the value of the protocol-end argument. If this argument is not specified, the system will assign an index automatically.

protocol-end: End protocol index, ranging from 0 to 6. Its value must be greater than or equal to the value of the protocol-index argument.

all: Specifies all protocol indexes.

Description

Use the protocol-vlan command to configure the protocol template used for classifying protocol-based VLANs.

Use the undo protocol-vlan command to cancel the configuration.

 

  Caution:

In a VLAN, it is not allowed to configure two templates with the same protocol type and encapsulation format. The encapsulation defined by a user-defined template is the same as that defined by a standard template if the parameters of the user-defined template adopt some special values. In this scenario, the user-defined template and the standard template cannot be configured in the same VLAN.

Pay attention to the following notices about the template configuration:

l      It is not allowed to configure both ipx llc standard template and LLC user-defined template in the same VLAN.

l      It is not allowed to configure both ipx raw standard template and LLC user-defined template whose dsap and ssap are both ff in the same VLAN.

l      It is not allowed to configure both ipx ethernetii standard template and EthernetII user-defined template whose etype is 8137 in the same VLAN.

l      It is not allowed to configure both ipx snap standard template and SNAP user-defined template whose etype is 8137 in the same VLAN.

l      When the values of the dsap-id and ssap-id arguments are AA, the packet encapsulation type is not llc but snap. To avoid template conflict, the system disables the value AA for the dsap-id and ssap-id arguments when you configure LLC user-defined template.

In addition, pay attention to the following notices about IP template:

l      If a packet can match both IPv4-based VLAN and the VLAN based on other protocol, IPv4-based VLAN takes higher priority.

l      ip [ ip-address [ net-mask ] ] defines IPv4-based VLAN. If you want to define the VLANs based on IP or other encapsulation formats, use mode { ethernetii [ etype etype-id ] } and snap [ etype etype-id ], in which, etype-id is 0x0800.

 

Related commands: display protocol-vlan vlan.

Examples

# Configure VLAN 3 as a VLAN based on all IP packets.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] vlan 3

[H3C-vlan3] protocol-vlan ip

# Configure VLAN 5 as a VLAN based on network segment 123.34.56.0.

[H3C-vlan3] vlan 5

[H3C-vlan5] protocol-vlan ip 123.34.56.0

# Cancel protocols 0 to 5 in VLAN 5.

[H3C-vlan5] undo protocol-vlan 0 to 5

 

  • 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
新华三官网