97
Parameters
vlan-id-list
: Specifies a list of VLANs that the trunk ports will be assigned to, 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
: Permits all VLANs to pass through the trunk ports. On GVRP-enabled trunk ports, you must configure
the
port trunk permit vlan all
command to make sure that the traffic of all dynamically registered VLANs
can pass through. To prevent unauthorized VLAN users from accessing restricted resources through a
GVRP-disabled port, do not use the
port trunk permit vlan all
command on the port.
Description
Use
port trunk permit vlan
to assign the trunk ports to the specified VLANs.
Use
undo port trunk permit vlan
to remove the trunk ports from the specified VLANs.
By default, a trunk port allows only packets from VLAN 1 to pass through.
A trunk port can carry multiple VLANs. If you execute the
port trunk permit vlan
command multiple times,
the trunk port carries the set of VLANs specified by
vlan-id-list
in each execution.
On a trunk port, only traffic of the PVID can pass through untagged.
Related commands:
port link-type
.
Examples
# Assign the trunk port GigabitEthernet 1/0/1 to VLAN 2, VLAN 4, and VLAN 50 through VLAN 100.
<Sysname> system-view
[Sysname] interface gigabitethernet 1/0/1
[Sysname-GigabitEthernet1/0/1] port link-type trunk
[Sysname-GigabitEthernet1/0/1] port trunk permit vlan 2 4 50 to 100
Please wait........... Done.
port trunk pvid
Syntax
port trunk pvid vlan
vlan-id
undo port trunk pvid
View
Ethernet interface view
Default level
2: System level
Parameters
vlan-id
: Specifies a VLAN ID, ranging from 1 to 4094.
Description
Use
port trunk pvid
to configure the PVID for the trunk port.
Use
undo port trunk pvid
to restore the default.
By default, the PVID of a trunk port is VLAN 1.