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

AR500, AR510, and AR530 V200R007 CLI-based Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring transparent bridge, MAC table, link aggregation, VLANs, STP/RSTP/MSTP, and so on.The document provides the configuration procedures and configuration examples to illustrate the service configuration methods and application scenario.
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 VLANIF Interfaces to Implement Intra-VLAN Communication

Example for Configuring VLANIF Interfaces to Implement Intra-VLAN Communication

Networking Requirements

As shown in Figure 3-21, Router_1 and Router_2 are connected to Layer 2 networks that VLAN 10 belongs to. Router_1 communicates with Router_2 through a Layer 3 network where OSPF is enabled.

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

Figure 3-21  Configuring VLANIF interfaces to implement intra-VLAN communication

Configuration Roadmap

The configuration roadmap is as follows:

  1. Add interfaces to VLANs and configure the interfaces to allow the VLANs.

  2. Configure IP addresses for VLANIF interfaces to implement Layer 3 connectivity.

  3. Configure basic OSPF functions to implement interworking.

Procedure

  1. Configure Router_1.

    # Create VLAN 10 and VLAN 30.

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

    # Add Eth2/0/1 to VLAN 10 and Eth2/0/2 to VLAN 30.

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

    # Configure IP addresses of 10.10.10.1/24 and 10.10.30.1/24 for VLANIF 10 and VLANIF 30 respectively.

    [Router_1] interface vlanif 10
    [Router_1-Vlanif10] ip address 10.10.10.1 24
    [Router_1-Vlanif10] quit
    [Router_1] interface vlanif 30
    [Router_1-Vlanif30] ip address 10.10.30.1 24
    [Router_1-Vlanif30] quit
    

    # Configure basic OSPF functions.

    [Router_1] router id 1.1.1.1
    [Router_1] ospf
    [Router_1-ospf-1] area 0
    [Router_1-ospf-1-area-0.0.0.0] network 10.10.10.0 0.0.0.255
    [Router_1-ospf-1-area-0.0.0.0] network 10.10.30.0 0.0.0.255
    [Router_1-ospf-1-area-0.0.0.0] quit
    

  2. Configure Router_2.

    # Create VLAN 10 and VLAN 30.

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

    # Add Eth2/0/1 to VLAN 10 and Eth2/0/2 to VLAN 30.

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

    # Configure IP addresses of 10.10.20.1/24 and 10.10.30.2/24 for VLANIF 10 and VLANIF 30 respectively.

    [Router_2] interface vlanif 10
    [Router_2-Vlanif10] ip address 10.10.20.1 24
    [Router_2-Vlanif10] quit
    [Router_2] interface vlanif 30
    [Router_2-Vlanif30] ip address 10.10.30.2 24
    [Router_2-Vlanif30] quit
    

    # Configure basic OSPF functions.

    [Router_2] router id 2.2.2.2
    [Router_2] ospf
    [Router_2-ospf-1] area 0
    [Router_2-ospf-1-area-0.0.0.0] network 10.10.20.0 0.0.0.255
    [Router_2-ospf-1-area-0.0.0.0] network 10.10.30.0 0.0.0.255
    [Router_2-ospf-1-area-0.0.0.0] quit
    

  3. Configure Router_3.

    # Create VLAN 10, add Eth2/0/1 to VLAN 10 in untagged mode and Eth2/0/2 to VLAN 10 in tagged mode. The configuration of Router_4 is similar to that of Router_3, and is not mentioned here.

    <Huawei> system-view
    [Huawei] sysname Router_3
    [Router_3] vlan batch 10
    [Router_3] interface ethernet 2/0/1
    [Router_3-Ethernet2/0/1] port link-type access
    [Router_3-Ethernet2/0/1] port default vlan 10
    [Router_3-Ethernet2/0/1] quit
    [Router_3] interface ethernet 2/0/2
    [Router_3-Ethernet2/0/2] port link-type trunk
    [Router_3-Ethernet2/0/2] port trunk allow-pass vlan 10
    [Router_3-Ethernet2/0/2] quit
    

  4. Verify the configuration.

    # On the PC of the Layer 2 network connected to Router_1, set the default gateway address to the IP address of VLANIF10, that is, 10.10.10.1/24.

    # On the PC of the Layer 2 network connected to Router_2, set the default gateway address to the IP address of VLANIF10, that is, 10.10.20.1/24.

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

Configuration Files

  • Router_1 configuration file

    #
     sysname Router_1
    # 
    router id 1.1.1.1
    #
    vlan batch 10 30
    #
    interface Vlanif10
     ip address 10.10.10.1 255.255.255.0
    #
    interface Vlanif30
     ip address 10.10.30.1 255.255.255.0
    #
    interface Ethernet2/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    # 
    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
    
  • Router_2 configuration file

    #
    sysname Router_2
    # 
    router id 2.2.2.2
    #
    vlan batch 10 30
    #
    interface Vlanif10
     ip address 10.10.20.1 255.255.255.0
    #
    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 10
    # 
    interface Ethernet2/0/2
     port link-type trunk
     port trunk allow-pass vlan 30
    #
    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
    
  • Router_3 configuration file

    #
    sysname Router_3
    #
    vlan batch 10
    #
    interface Ethernet2/0/1
     port link-type access
     port default vlan 10
    # 
    interface Ethernet2/0/2
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
    
  • Router_4 configuration file

    #
    sysname Router_4
    #
    vlan batch 10
    #
    interface Ethernet2/0/1
     port link-type access
     port default vlan 10
    # 
    interface Ethernet2/0/2
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
    
Translation
Download
Updated: 2019-05-25

Document ID: EDOC1000097279

Views: 9443

Downloads: 62

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