port hybrid protocol-vlan

Use port hybrid protocol-vlan to associate a port with the specified protocol-based VLAN.

Use undo port hybrid protocol-vlan to disassociate a port from the specified protocol-based VLAN.

Syntax

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

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

Default

A port is not associated with a protocol-based VLAN.

Views

Layer 2 Ethernet interface view

Layer 2 aggregate interface view

Predefined user roles

network-admin

mdc-admin

Parameters

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

protocol-index: Specifies a beginning protocol template index in the range of 0 to 65535.

to protocol-end: Specifies an end protocol template index of a protocol template range, in the range of 0 to 65535. The value for this argument must be greater than or equal to the beginning protocol template index.

all: Specifies all protocol templates.

Usage guidelines

For this command to take effect, perform the following tasks:

  1. Create a VLAN and associate it with the specified protocol templates.

  2. Set the port link type to hybrid.

  3. Configure the port to allow the protocol-based VLAN to pass through.

When you execute the undo port hybrid protocol-vlan command on a port, follow these guidelines:

Examples

# Configure Ten-GigabitEthernet 1/0/1 as a hybrid port, assign it to VLAN 2 as an untagged member, and associated it with protocol template 1 in VLAN 2.

<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] protocol-vlan 1 ipv4
[Sysname-vlan2] quit
[Sysname] interface ten-gigabitethernet 1/0/1
[Sysname-Ten-GigabitEthernet1/0/1] port link-type hybrid
[Sysname-Ten-GigabitEthernet1/0/1] port hybrid vlan 2 untagged
[Sysname-Ten-GigabitEthernet1/0/1] port hybrid protocol-vlan vlan 2 1

# Configure Layer 2 aggregate interface Bridge-Aggregation 1 as a hybrid port, assign it to VLAN 2 as an untagged member, and associated it with protocol template 1 in VLAN 2.

<Sysname> system-view
[Sysname] vlan 2
[Sysname-vlan2] protocol-vlan 1 ipv4
[Sysname-vlan2] quit
[Sysname] interface bridge-aggregation 1
[Sysname-Bridge-Aggregation1] port link-type hybrid
[Sysname-Bridge-Aggregation1] port hybrid vlan 2 untagged
[Sysname-Bridge-Aggregation1] port hybrid protocol-vlan vlan 2 1