< Home

interface vlanif

Function

The interface vlanif command creates a VLANIF interface and displays the VLANIF interface view.

The undo interface vlanif command deletes a VLANIF interface.

By default, VLANIF interfaces are not created.

Format

interface vlanif vlan-id

undo interface vlanif vlan-id

Parameters

Parameter

Description

Value

vlan-id

Specifies the ID of the VLAN that a VLANIF interface belongs to.

The value is an integer that ranges from 1 to 4094.

The number of VLANIF interfaces varies according to the product type.

  • S5735-L, S5735S-L, S5735S-L-M, S5735-S, S5735-S-I, S5735S-S: 1019
  • S5720-HI, S5730-HI, S5731-H, S5731S-H, S5732-H, S6720-HI, S6730-H, and S6730S-H: 4096
  • other models: 1024

Views

System view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

When a device needs to communicate with devices at the network layer, you can create a logical interface based on a VLAN on the device, namely, a VLANIF interface. A VLANIF interface is a network layer interface and can be configured with an IP address. The device then users the VLANIF interface to communicate with devices at the network layer.

Follow-up Procedure

Run the ip address to assign an IP address to the VLANIF interface.

Precautions

  • A VLANIF interface goes Up only after the following conditions are met:
    • The corresponding VLAN must have been created.
    • A physical interface or Eth-Trunk in Up state has been added to the corresponding VLAN.
  • After a VLANIF interface is configured, the corresponding VLAN cannot be configured as a VLAN for Dot1q termination sub-interfaces or an outer VLAN for QinQ termination sub-interfaces.

  • If the specified VLANIF interface exists, the interface vlanif command displays the VLANIF interface view directly.
  • When a VLANIF interface is used as a management VLANIF interface where you can telnet to the device, the user VLAN ID cannot be the same as the management VLAN ID; otherwise, you will fail to telnet to the device.

Example

# Create VLANIF 2 and enter the VLANIF interface view.

<HUAWEI> system-view
[HUAWEI] vlan 2
[HUAWEI-vlan2] quit 
[HUAWEI] interface vlanif 2
[HUAWEI-Vlanif2]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >