< Home

assign vlan

Function

The assign vlan command allocates a VLAN to the virtual system.

The undo assign vlan command cancels the allocation.

Format

assign vlan vlan-id

undo assign vlan vlan-id

Parameters

Parameter Description Value
vlan-id Specifies a VLAN ID. It must be the ID of an existing VLAN. VLAN 1 cannot be assigned to any virtual system.

Views

Management view of the virtual system

Default Level

2: Configuration level

Usage Guidelines

By default, no VLAN is assigned to the virtual system.

Prerequisites

A VLAN must be created in the public system before being assigned to a virtual system.

VLANs cannot be assigned in the following conditions. You need to delete the configurations or dissociate the features.

  • The vlan has been assigned to a virtual system.
  • The VLANIF interface corresponding to the VLAN has been referenced in a policy, such as the Source NAT policy of easy IP.

Configuration Impact

VLANs assigned to one virtual system cannot be assigned to other virtual systems.

After a VLAN is assigned to a virtual system, the corresponding VLANIF interface is also automatically assigned to the virtual system.

Precautions

When a VLAN is assigned to a virtual system or is disassociated from a virtual system, the VLANIF interface configurations (such as IP address and IPSec policy configurations) corresponding to the VLAN will be deleted. Exercise caution when assigning a VLAN to a virtual system to prevent service interruption.

Example

# Allocate VLAN 10 to virtual system vsys1.

<sysname> system-view
[sysname] vsys name vsys1
[sysname-vsys-vsys1] assign vlan 10 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >