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

CLI-based Configuration Guide - Ethernet Switching

AR650, AR1600, and AR6100 V300R003

This document describes how to configure the components for LAN services, including link aggregation groups, VLANs, voice VLANs, MAC address tables, transparent bridging, as well as GVRP, STP/RSTP, and MSTP protocols.
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).
Example for Configuring Dot1q Termination Sub-interfaces to Implement Inter-VLAN Communication Across Different Networks

Example for Configuring Dot1q Termination Sub-interfaces to Implement Inter-VLAN Communication Across Different Networks

Networking Requirements

In the networking example shown in Figure 5-4, RouterA and RouterB are connected to Layer 2 networks to which VLAN 10 and VLAN 20 belong. RouterA communicates with RouterB through a Layer 3 network where OSPF is run.

PCs of the two Layer 2 networks need to be isolated at Layer 2 and interwork at Layer 3.

Figure 5-4  Networking for configuring Dot1q termination sub-interfaces to implement inter-VLAN communication across a network

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure VLANs that interfaces belong to.

  2. Assign IP addresses to VLANIF interfaces.

  3. Set the encapsulation mode of sub-interfaces.

  4. Configure VLANs allowed by sub-interfaces.

  5. Assign IP addresses to the sub-interfaces.

  6. Configure basic OSPF functions.

NOTE:

The VLANs allowed by a sub-interface cannot be created in the system view.

Procedure

  1. Configure RouterA.

    # Create a VLAN.

    <Huawei> system-view
    [Huawei] sysname RouterA
    [RouterA] vlan batch 30
    

    # Add an interface to the VLAN.

    [RouterA] interface ethernet 2/0/2
    [RouterA-Ethernet2/0/2] port link-type trunk
    [RouterA-Ethernet2/0/2] port trunk allow-pass vlan 30
    [RouterA-Ethernet2/0/2] quit
    

    # Assign an IP address to a VLANIF interface.

    [RouterA] interface vlanif 30
    [RouterA-Vlanif30] ip address 10.10.30.1 24
    [RouterA-Vlanif30] quit

    # Create and configure GE1/0/1.1.

    [RouterA] interface gigabitethernet 1/0/0.1
    [RouterA-GigabitEthernet1/0/0.1] dot1q termination vid 10
    [RouterA-GigabitEthernet1/0/0.1] ip address 10.10.10.1 24
    [RouterA-GigabitEthernet1/0/0.1] arp broadcast enable
    [RouterA-GigabitEthernet1/0/0.1] quit
    

    # Configure basic OSPF functions.

    [RouterA] router id 1.1.1.1
    [RouterA] ospf
    [RouterA-ospf-1] area 0
    [RouterA-ospf-1-area-0.0.0.0] network 10.10.10.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] network 10.10.30.0 0.0.0.255
    [RouterA-ospf-1-area-0.0.0.0] return
    

  2. Configure RouterB.

    # Create a VLAN.

    <Huawei> system-view
    [Huawei] sysname RouterB
    [RouterB] vlan batch 30
    

    # Add an interface to the VLAN.

    [RouterB] interface ethernet 2/0/1
    [RouterB-Ethernet2/0/1] port link-type trunk
    [RouterB-Ethernet2/0/1] port trunk allow-pass vlan 30
    [RouterB-Ethernet2/0/1] quit
    

    # Assign an IP address to a VLANIF interface.

    [RouterB] interface vlanif 30
    [RouterB-Vlanif30] ip address 10.10.30.2 24
    [RouterB-Vlanif30] quit
    

    # Create and configure GE1/0/2.1.

    [RouterB] interface gigabitethernet 2/0/0.1
    [RouterB-GigabitEthernet2/0/0.1] dot1q termination vid 20
    [RouterB-GigabitEthernet2/0/0.1] ip address 10.10.20.1 24
    [RouterB-GigabitEthernet2/0/0.1] arp broadcast enable
    [RouterB-GigabitEthernet2/0/0.1] quit
    

    # Configure basic OSPF functions.

    [RouterB] router id 2.2.2.2
    [RouterB] ospf
    [RouterB-ospf-1] area 0
    [RouterB-ospf-1-area-0.0.0.0] network 10.10.20.0 0.0.0.255
    [RouterB-ospf-1-area-0.0.0.0] network 10.10.30.0 0.0.0.255
    [RouterB-ospf-1-area-0.0.0.0] return
    

  3. Verify the configuration.

    # On the PCs residing on the Layer 2 network connected to RouterA, set the default gateway address to 10.10.10.1/24, which is the IP address of GE1/0/0.1. The switch connected to RouterA allows VLAN 10.

    # On the PCs residing on the Layer 2 network connected to RouterB, set the default gateway address to 10.10.20.1/24, which is the IP address of GE2/0/0.1. The switch connected to RouterB allows VLAN 20.

    After the configuration is complete, PCs on the two Layer 2 networks are isolated at Layer 2 and interwork at Layer 3.

Configuration Files

  • Configuration file of RouterA
    #
    sysname RouterA
    # 
    router id 1.1.1.1
    #
    vlan batch 30
    #
    interface Vlanif30
     ip address 10.10.30.1 255.255.255.0
    #
    interface GigabitEthernet1/0/0.1
     dot1q termination vid 10
     ip address 10.10.10.1 255.255.255.0
     arp broadcast enable
    #
    interface Ethernet2/0/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    ospf 1
     area 0.0.0.0
      network 10.10.10.0 0.0.0.255 
      network 10.10.30.0 0.0.0.255
    #
    return
    
  • Configuration file of RouterB
    #
    sysname RouterB
    # 
    router id 2.2.2.2
    #
    vlan batch 30
    #
    interface Vlanif30
     ip address 10.10.30.2 255.255.255.0
    #
    interface Ethernet2/0/1
     port link-type trunk
     port trunk allow-pass vlan 30
    # 
    interface GigabitEthernet2/0/0.1
     dot1q termination vid 20
     ip address 10.10.20.1 255.255.255.0
     arp broadcast enable 
    #
    ospf 1
     area 0.0.0.0
      network 10.10.20.0 0.0.0.255
      network 10.10.30.0 0.0.0.255
    #
    return
    
Download
Updated: 2019-04-12

Document ID: EDOC1100041791

Views: 57869

Downloads: 40

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