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

S9300, S9300E, and S9300X V200R012C00 Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, VLAN aggregation, MUX VLAN, VLAN termination, Voice VLAN, VLAN mapping, QinQ, GVRP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, HVRP, and Layer 2 protocol transparent transmission.
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

In Figure 4-29, Switch_1 and Switch_2 are connected to Layer 2 networks that VLAN 10 belongs to. Switch_1 communicates with Switch_2 through a Layer 3 network with OSPF enabled.

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

Figure 4-29  Configuring VLANIF interfaces to implement intra-VLAN communication

Configuration Roadmap

  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 Layer 3 interworking.

Procedure

  1. Configure Switch_1.

    # Create VLAN 10 and VLAN 30.

    <Quidway> system-view
    [Quidway] sysname Switch_1
    [Switch_1] vlan batch 10 30
    

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

    [Switch_1] interface gigabitethernet 1/0/1
    [Switch_1-GigabitEthernet1/0/1] port link-type trunk
    [Switch_1-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [Switch_1-GigabitEthernet1/0/1] quit
    [Switch_1] interface gigabitethernet 1/0/2
    [Switch_1-GigabitEthernet1/0/2] port link-type trunk
    [Switch_1-GigabitEthernet1/0/2] port trunk allow-pass vlan 30
    [Switch_1-GigabitEthernet1/0/2] quit
    

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

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

    # Configure basic OSPF functions.

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

  2. Configure Switch_2.

    # Create VLAN 10 and VLAN 30.

    <Quidway> system-view
    [Quidway] sysname Switch_2
    [Switch_2] vlan batch 10 30
    

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

    [Switch_2] interface gigabitethernet 1/0/1
    [Switch_2-GigabitEthernet1/0/1] port link-type trunk
    [Switch_2-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [Switch_2-GigabitEthernet1/0/1] quit
    [Switch_2] interface gigabitethernet 1/0/2
    [Switch_2-GigabitEthernet1/0/2] port link-type trunk
    [Switch_2-GigabitEthernet1/0/2] port trunk allow-pass vlan 30
    [Switch_2-GigabitEthernet1/0/2] quit
    

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

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

    # Configure basic OSPF functions.

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

  3. Configure Switch_3.

    # Create VLAN 10, add GE1/0/1 to VLAN 10 in untagged mode and GE1/0/2 to VLAN 10 in tagged mode. The configuration of Switch_4 is the same as that of Switch_3.

    <Quidway> system-view
    [Quidway] sysname Switch_3
    [Switch_3] vlan batch 10
    [Switch_3] interface gigabitethernet 1/0/1
    [Switch_3-GigabitEthernet1/0/1] port link-type access
    [Switch_3-GigabitEthernet1/0/1] port default vlan 10
    [Switch_3-GigabitEthernet1/0/1] quit
    [Switch_3] interface gigabitethernet 1/0/2
    [Switch_3-GigabitEthernet1/0/2] port link-type trunk
    [Switch_3-GigabitEthernet1/0/2] port trunk allow-pass vlan 10
    [Switch_3-GigabitEthernet1/0/2] quit
    

  4. Verify the configuration.

    On the PC of the Layer 2 network connected to Switch_1, set the default gateway address to 10.10.10.1/24 (the IP address of VLANIF10).

    On the PC of the Layer 2 network connected to Switch_2, set the default gateway address to 10.10.20.1/24 (the IP address of VLANIF10).

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

Configuration Files

  • Switch_1 configuration file

    #
    sysname Switch_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 GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    # 
    interface GigabitEthernet1/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
    
  • Switch_2 configuration file

    #
    sysname Switch_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 GigabitEthernet1/0/1
     port link-type trunk
     port trunk allow-pass vlan 10
    # 
    interface GigabitEthernet1/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
    
  • Switch_3 configuration file

    #
    sysname Switch_3
    #
    vlan batch 10
    #
    interface GigabitEthernet1/0/1
     port link-type access
     port default vlan 10
    # 
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
    
  • Switch_4 configuration file

    #
    sysname Switch_4
    #
    vlan batch 10
    #
    interface GigabitEthernet1/0/1
     port link-type access
     port default vlan 10
    # 
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 10
    #
    return
    
Translation
Download
Updated: 2019-01-18

Document ID: EDOC1100038290

Views: 110682

Downloads: 24

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