< Home

Configuring an Ethernet Sub-interface

Context

Ethernet sub-interfaces are multiple logical interfaces configured on a main interface to allow the main interface to communicate with multiple remote interfaces. Ethernet sub-interfaces can share physical layer parameters of their main interface, or be configured with their respective link layer parameters and network layer parameters. Disabling or activating Ethernet sub-interfaces does not affect the main interface status, but the main interface status change affects the status of Ethernet sub-interfaces. Ethernet sub-interfaces work properly only when their main interface is in Up state. Associating an Ethernet sub-interface with a VLAN implements inter-VLAN communication and applies to Dot1q termination, QinQ termination and VXLAN scenarios.

  • Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support Ethernet sub-interfaces.

  • Only hybrid and trunk interfaces on the preceding switches support Ethernet sub-interface configuration.
  • After you run the undo portswitch command to switch Layer 2 interfaces on the preceding series of switches into Layer 3 interfaces, you can configure Ethernet sub-interfaces on the interfaces.

  • After an interface is added to an Eth-Trunk, sub-interfaces cannot be configured on the interface.

  • VLAN termination sub-interfaces cannot be created on a VCMP client.

Pre-configuration Tasks

Before configuring an Ethernet sub-interface, properly connect the physical interface of the Ethernet sub-interface.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number [ mode l2 ]

    The Ethernet sub-interface view is displayed.

    subinterface-number specifies the number of an Ethernet sub-interface. mode l2 indicates that the sub-interface is configured to work in Layer 2 mode for the VXLAN service. You need to specify this parameter only when configuring the VXLAN service.

  3. Configure an Ethernet sub-interface to transmit services based on the service type.

    • Layer 2 Ethernet sub-interface

      • When configuring a Layer 2 sub-interface, you only need to configure a sub-interface for termination.

        VLAN packets are classified into Dot1q packets (one layer of VLAN tag) and QinQ packets (double layers of tags). Accordingly, there are two VLAN tag termination modes. Dot1q termination terminates Dot1q packets and QinQ termination terminates QinQ packets. Run either of the following commands to configure a sub-interface for termination based on site requirements.

        • Run dot1q termination vid low-pe-vid [ to high-pe-vid ]

          The allowed VLAN is configured on the sub-interface for dot1q VLAN termination.

        • Run qinq termination pe-vid pe-vid ce-vid ce-vid1 [ to ce-vid2 ]

          The allowed VLAN is configured on the sub-interface for qinq VLAN termination.

      • Configure the VXLAN access service on the Layer 2 sub-interface.

        You must configure the sub-interface to work in Layer 2 mode for the VXLAN service.

        1. Run encapsulation { dot1q { vid pe-vid } | default | untag | qinq { vid vlan-vid ce-vid ce-vid } }

          An encapsulation mode is configured for a Layer 2 sub-interface to specify the type of packets that can pass through the sub-interface.

          By default, the encapsulation mode of packets allowed to pass a Layer 2 sub-interface is not configured.

        2. Run bridge-domain bd-id

          A specified Layer 2 sub-interface is associated with a BD so that data packets can be forwarded in the BD.

          By default, a Layer 2 sub-interface is not associated with a BD.

    • Layer 3 Ethernet sub-interface (IPv4)

      1. Run ip address ip-address { mask | mask-length } [ sub ]

        The IP address of the sub-interface is configured.

        Specify the sub parameter when you need to configure a secondary IP address for the sub-interface.

      2. Configure a sub-interface for termination.

        VLAN packets are classified into Dot1q packets (one layer of VLAN tag) and QinQ packets (double layers of tags). Accordingly, there are two VLAN tag termination modes. Dot1q termination terminates Dot1q packets and QinQ termination terminates QinQ packets. Run either of the following commands to configure a sub-interface for termination based on site requirements.

        • Run dot1q termination vid low-pe-vid [ to high-pe-vid ]

          The allowed VLAN is configured on the sub-interface for dot1q VLAN termination.

        • Run qinq termination pe-vid pe-vid ce-vid ce-vid1 [ to ce-vid2 ]

          The allowed VLAN is configured on the sub-interface for qinq VLAN termination.

      3. Run arp broadcast enable

        The ARP broadcast function is enabled on the sub-interface.

        When you enable or disable the ARP broadcast function on a sub-interface, the routing status of the sub-interface becomes Down and then Up. This result in flapping of routes on the entire network, affecting the normal operation of services.

    • Layer 3 Ethernet sub-interface (IPv6)

      1. Configure a sub-interface for termination.

        VLAN packets are classified into Dot1q packets (one layer of VLAN tag) and QinQ packets (double layers of tags). Accordingly, there are two VLAN tag termination modes. Dot1q termination terminates Dot1q packets and QinQ termination terminates QinQ packets. Run either of the following commands to configure a sub-interface for termination based on site requirements.

        • Run dot1q termination vid low-pe-vid [ to high-pe-vid ]

          The allowed VLAN is configured on the sub-interface for dot1q VLAN termination.

        • Run qinq termination pe-vid pe-vid ce-vid ce-vid1 [ to ce-vid2 ]

          The allowed VLAN is configured on the termination sub-interface for qinq VLAN termination.

      2. Run ipv6 enable

        The IPv6 service is enabled on the sub-interface.

      3. Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }

        The global unicast IPv6 address is configured for the termination sub-interface.

      4. Run ipv6 nd ns multicast-enable

        A termination sub-interface is enabled from sending NS multicast packets.

Verifying the Configuration

  • Run the display interface [ interface-type [ interface-number [.subnumber ] ] ] command to check the status of a specified Ethernet sub-interface.
  • Run the display dot1q information termination [ interface interface-type interface-number [.subinterface-number ] ] command to check names of all interfaces configured with dot1q VLAN tag termination and the sub-interface configuration.
  • Run the display qinq information termination [ interface interface-type interface-number [.subinterface-number ] ] command to check names of all interfaces configured with QinQ VLAN tag termination and the sub-interface configuration.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >