port hybrid protocol-vlan
Use port hybrid protocol-vlan to associate a hybrid port with the specified protocols in a VLAN.
Use undo port hybrid protocol-vlan to remove the association.
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 any protocol-based VLANs.
Views
Layer 2 Ethernet interface view, Layer 2 aggregate interface view,
Predefined user roles
network-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 the protocol-end argument must be greater than or equal to the beginning protocol template index.
all: Specifies all protocol templates.
Usage guidelines
Before you use this command, perform the following tasks:
Create a VLAN and associate it with specified protocols.
Configure the port link type as hybrid.
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:
If you specify both the vlan-id argument and the all keyword, this command disassociates the port from all protocol templates of the specified VLAN.
If you specify only the all keyword, this command disassociates the port from all protocol templates of all VLANs.
Examples
# Associate the hybrid port Ten-GigabitEthernet 1/0/1 with protocol template 1 (IPv4) 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
# Associate the hybrid Layer 2 aggregate interface Bridge-Aggregation 1 with protocol template 1 (IPv4) 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