No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NE20E-S2 V800R010C10SPC500 Configuration Guide - LAN Access and MAN Access 01

This is NE20E-S2 V800R010C10SPC500 Configuration Guide - LAN Access and MAN Access
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring Ethernet Sub-interfaces to Support Communication Between VLANs

Configuring Ethernet Sub-interfaces to Support Communication Between VLANs

To implement communication between hosts in a VLAN and hosts in another VLAN, create sub-interfaces on the Ethernet interface of a Layer 3 device that connects to a Layer 2 device and encapsulate 802.1q on the sub-interfaces.

Usage Scenario

When a Layer 2 switch belongs to different VLANs, create sub-interfaces on the Ethernet interface of a Layer 3 device that connects to the Layer 2 switch and add each sub-interface to a VLAN to ensure communication between hosts from different VLANs. In addition, configure 802.1q encapsulation and an IP address on each sub-interface.

As shown in Figure 3-1, the PE uses an Ethernet interface to connect to CE, and CE is connected to hosts in VLAN 10 and VLAN 20.

Figure 3-1 Networking for Ethernet sub-interfaces supporting communication between VLANs

To allow hosts in VLAN 10 to communicate with hosts in VLAN 20, perform the following steps on the PE:

  • Create Ethernet sub-interfaces.

  • Configure 802.1q encapsulation on the sub-interfaces and associate the sub-interfaces with VLANs.

  • Assign IP addresses to the sub-interfaces.

Pre-configuration Tasks

Before configuring Ethernet sub-interfaces to support communication between VLANs, power on the device and ensure a successful self-check.

Configuration Procedures

Figure 3-2 Flowchart of configuring an Eth-Trunk sub-interface

Creating a Sub-interface

To ensure communication between VLANs, create Ethernet sub-interfaces on a Layer 3 device.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number

    An Ethernet sub-interface is created. If an Ethernet sub-interface exists, the Ethernet sub-interface view is displayed.

    NOTE:

    Sub-interfaces cannot be created on an Eth-Trunk member interface.

  3. Run commit

    The configuration is committed.

    NOTE:

    In the scenario where an interface has a large number of sub-interfaces, if you run the shutdown command in the sub-interface view to shut down the sub-interfaces one after another, the work load is huge. To shut down the sub-interface in batch, run the shutdown interface command in the system view.

Configuring an IP address

To implement communication between VLANs, establish IP routes.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number

    The view of the Ethernet sub-interface that needs to be configured with an IP address is displayed.

  3. Run ip address ip-address ip-mask [ sub ]

    An IP address is assigned to the Ethernet sub-interface.

    When two or more IP addresses are configured for an Ethernet sub-interface, the keyword sub can be used to indicate secondary IP addresses.

    For the detailed configuration of an IP address, see the NE20E Configuration Guide - IP Service.

  4. Run commit

    The configuration is committed.

    NOTE:

    In the scenario where an interface has a large number of sub-interfaces, if you run the shutdown command in the sub-interface view to shut down the sub-interfaces one after another, the work load is huge. To shut down the sub-interface in batch, run the shutdown interface command in the system view.

Configuring 802.1Q Encapsulation

When a Layer 3 device uses an Ethernet interface to connect to a Layer 2 device and the Layer 2 device's interfaces are added to VLANs, configure 802.1q encapsulation on the sub-interfaces of the Ethernet interface to ensure communication between the Layer 3 and Layer 2 devices.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run interface interface-type interface-number.subinterface-number

    The view of the Ethernet sub-interface that needs to be configured with 802.1Q encapsulation is displayed.

  3. Run either of the following commands as required.

    • To configure a dot1q sub-interface, run the vlan-type dot1q vlan-id command.

      NOTE:
      Each Ethernet sub-interface can be associated with only one VLAN. Sub-interfaces of different interfaces can be bound to the same VLAN; sub-interfaces of the same interface cannot be bound to the same VLAN.
    • To configure a dot1q sub-interface and a matching policy for the sub-interface, run the vlan-type dot1q vlanid { 8021p { 8021p-value1 [ to 8021p-value2 ] } &<1-7> | dscp { dscp-value1 [ to dscp-value2 ] } &<1-10> | default | eth-type eth-type-value } command.

    NOTE:
    • If you do not configure a matching policy, the dot1q sub-interface matches packets carrying the specified VLAN ID. If you configure a matching policy, the dot1q sub-interface matches packets carrying the specified VLAN ID+802.1p value/DSCP value/EthType.

    • After the vlan-type dot1q vlan-id command is run in the Ethernet sub-interface view, the VLAN range belongs to the sub-interface, and any VLAN within the VLAN range cannot be configured with the 802.1p value/DSCP value/EthType on other sub-interfaces.

  4. Run commit

    The configuration is committed.

    NOTE:

    In the scenario where an interface has a large number of sub-interfaces, if you run the shutdown command in the sub-interface view to shut down the sub-interfaces one after another, the work load is huge. To shut down the sub-interface in batch, run the shutdown interface command in the system view.

Verifying the Ethernet Sub-interface Configuration

After Ethernet sub-interfaces are configured to support communication between VLANs, you can view information about the sub-interface, including the MTU, IP address, and VLAN encapsulation.

Prerequisites

The Ethernet sub-interfaces have been configured to support communication between VLANs.

Procedure

  • Run the display interface gigabitethernet [ interface-number [ .subnumber ] ] command to check the status of an Ethernet sub-interface.

Example

Run the display interface gigabitethernet command. The command output shows information about an Ethernet sub-interface, including the physical status, protocol status, MTU, IP address, and VLAN encapsulation.

<HUAWEI> display interface gigabitethernet 0/1/1.1
GigabitEthernet0/1/1.1 current state : UP (ifindex: 6)
Line protocol current state : UP
Last line protocol up time :  2013-07-29 15:39:29
Description: HUAWEI, GigabitEthernet0/1/1.1 Interface
Route Port,The Maximum Transmit Unit is 9600
Internet Address is 10.0.1.1/24
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 0afc-0229-1000
Last physical up time   :  2013-07-29 15:39:23
Last physical down time : 2013-07-29 15:38:41
Current system time: 2013-07-30 09:15:33
Statistics last cleared:never
      Last 300 seconds input rate: 23513 bits/sec, 2 packets/sec
      Last 300 seconds output rate: 64319 bits/sec, 3 packets/sec
      Input peak rate 26099 bits/sec, Record time: 2013-07-29 15:40:58
      Output peak rate 64809 bits/sec, Record time: 2013-07-30 03:59:41
      Input: 183126871 bytes, 182525 packets 
      Output: 509287017 bytes, 244628 packets
    Input:
      Unicast: 55 packets, Multicast: 160762 packets
      Broadcast: 21708 packets, JumboOctets: 31031 packets
      CRC: 0 packets, Symbol: 0 packets
      Overrun: 0 packets, InRangeLength: 0 packets
      LongPacket: 0 packets, Jabber: 0 packets, Alignment: 0 packets
      Fragment: 0 packets, Undersized Frame: 0 packets
      RxPause: 0 packets
    Output:
      Unicast: 53 packets, Multicast: 243990 packets
      Broadcast: 585 packets, JumboOctets: 0 packets
      Lost: 0 packets, Overflow: 0 packets, Underrun: 0 packets
      System: 0 packets, Overruns: 0 packets
      TxPause: 0 packets
Translation
Download
Updated: 2019-01-02

Document ID: EDOC1100055378

Views: 16708

Downloads: 35

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next