< Home

Configuring Vlanif Interfaces to Enable VLANs to Communicate

This section describes how to configure VLANIF interfaces to enable VLANs to communicate.

Context

You can create a VLANIF interface on a configured VLAN. The VLANIF interface functions as a Layer-3 physical interface to implement Layer-3 features, such as IP address settings and data communications among different VLANs.

Inter-VLAN communication through VLANIF interfaces applies only when the hosts in each VLAN are located in different network segments. If the hosts of VLANs are located in the same network segment, inter-VLAN communication can be implemented through Layer-2 interfaces. For details, see Configuring Inter-VLAN Communication Using Layer-2 Subinterfaces.

Procedure

  1. Access the system view.

    system-view

  2. Create a VLANIF interface and access the VLANIF interface view.

    interface vlanif vlan-id

    If a VLANIF interface already exists, the VLANIF interface view is directly displayed after this command is run.

    Before you create a VLANIF interface, the VLAN must exist.

  3. Assign an IP address to the VLANIF interface.

    ip address ip-address { mask | mask-length } [ sub ]

    The IP addresses of different VLANIF interfaces must be on different network segments so that users on different VLANs can communicate.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >