< Home

port trunk pvid

Function

The port trunk pvid command sets the default VLAN ID of the trunk port.

The undo port trunk pvid command restores the default VLAN ID of the trunk port.

Format

port trunk pvid vlan vlan-id

undo port trunk pvid vlan

Parameters

Parameter Description Value
vlan vlan-id Specifies the default VLAN ID of the trunk port. The value is an integer ranging from 1 to 4094.

Views

Layer 2 Ethernet interface view

Default Level

2: Configuration level

Usage Guidelines

By default, interfaces are in VLAN 1.

This command can be configured only when link-type of the Layer 2 Ethernet interface is set to trunk.

Before the configuration, ensure that the VLAN already exists; otherwise, the system displays a message indicating that the input VLAN does not exist.

Example

# Set the default VLAN ID of the trunk port, GigabitEthernet 0/0/1, to 2.

<sysname> system-view
[sysname] interface GigabitEthernet 0/0/1
[sysname-GigabitEthernet0/0/1] port trunk pvid vlan 2
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >