< Home

Configuring a Layer-2 Ethernet Subinterface

This section describes how to configure a Layer-2 Ethernet subinterface.

Context

Subinterfaces are logical or virtual interfaces created on a physical interface. Subinterfaces share the physical parameters of the physical interface on which they are created. However, subinterfaces have their own data link layer and network layer parameters. A subinterface status change does not affect the main interface status, whereas a main interface status change affects the subinterface status. Subinterfaces work properly only when their main interface is in the Up state.

The device supports creating subinterfaces on Layer-2 Ethernet and Layer-2 Eth-Trunk interfaces. Using a subinterface to terminate a VLAN allows for inter-VLAN forwarding.

Procedure

  1. Access the system view.

    system-view

  2. Access the interface view.

    interface interface-type interface-number

  3. Configure a Layer-3 Ethernet interface to work in Layer-2 mode.

    portswitch

  4. Return to the system view.

    quit

  5. Create a subinterface and access the subinterface view.

    interface interface-type interface-number.subinterface-number

  6. Configure the encapsulation type for the subinterface and associate a VLAN ID with the subinterface.

    vlan-type dot1q vlan-id

  7. Configure the subinterface as a Layer-2 subinterface.

    portswitch

  8. Add the Layer-2 subinterface to a specific VLAN. You are not advised to add the subinterface to the same VLAN as the interface, which may cause loops in symmetric networking.

    port default vlan vlan-id

  9. Optional: Set the maximum bandwidth for upstream traffic on the interface.

    bandwidth ingress bandwidth-number

  10. Optional: Set the maximum bandwidth for downstream traffic on the interface.

    bandwidth egress bandwidth-number

  11. Optional: Enable the bypass detection function on the interface.

    detect-mode tap

    After bypass detection is enabled, the device detects packets received on this interface and then discards them.

  12. Optional: Configure the automatic interface disabling function based on the session usage.

  13. Optional: Configure the automatic interface disabling function based on the CPU usage.

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