< Home

Creating a Sub-VLAN

Context

In VLAN aggregation, a sub-VLAN can contain only physical interfaces (it cannot contain VLANIF interfaces). All the interfaces in a sub-VLAN use the same IP address of the VLANIF interface associated with the super-VLAN. VLAN aggregation reduces the number of subnet IDs, subnet default gateway addresses, and directed broadcast IP addresses needed on the network segment and ensures that IP addresses are assigned efficiently.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run vlan vlan-id

    A VLAN is created and the VLAN view is displayed.

    The vlan configuration command completes the VLAN configurations before the VLAN is created. The vlan configuration command only enters the VLAN configuration view. Neither the corresponding VLAN nor configurations in the VLAN take effect. To make configurations in the VLAN take effect, create the VLAN using the vlan command.

  3. Run interface interface-type interface-number

    The interface view is displayed.

  4. Configure the link type of the interface.

    Run either of the following commands as needed:

    • To set the link type of the interface to access:

      1. Run port link-type access

        The link type of the interface is set to access.

      2. Run port default vlan vlan-id

        The interface is added to the sub-VLAN.

    • To set the link type of the interface to trunk:

      1. Run port link-type trunk

        The link type of the interface is set to trunk.

      2. Run port trunk allow-pass vlan vlan-id

        The interface is added to the sub-VLAN.

    • To set the link type of the interface to hybrid:

      1. Run port link-type hybrid

        The link type of the interface is set to hybrid.

      2. Run port hybrid tagged vlan vlan-id or port hybrid untagged vlan vlan-id

        The interface is added to the sub-VLAN.

  5. Run quit

    The system view is displayed.

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