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

S12700 V200R010C00 Configuration Guide - Ethernet Switching

This document describes the configuration of Ethernet services, including configuring link aggregation, VLANs, Voice VLAN, VLAN mapping, QinQ, GVRP, MAC table, STP/RSTP/MSTP, SEP, and so on.
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

On the network shown in Figure 8-8, SwitchA and SwitchB are connected to Layer 2 networks that VLAN 10 and VLAN 20 belong to. SwitchA communicates with SwitchB 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 8-8  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.
  • VLAN termination sub-interfaces cannot be created on a VCMP client.

Procedure

  1. Configure SwitchA.

    # Create a VLAN.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchA
    [SwitchA] vlan batch 30
    

    # Add an interface to the VLAN.

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

    # Assign an IP address to a VLANIF interface.

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

    # Create and configure GE1/0/1.1.

    [SwitchA] vcmp role silent
    [SwitchA] interface gigabitethernet1/0/1
    [SwitchA-GigabitEthernet1/0/1] port link-type hybrid
    [SwitchA-GigabitEthernet1/0/1] quit
    [SwitchA] interface gigabitethernet 1/0/1.1
    [SwitchA-GigabitEthernet1/0/1.1] dot1q termination vid 10
    [SwitchA-GigabitEthernet1/0/1.1] ip address 10.10.10.1 24
    [SwitchA-GigabitEthernet1/0/1.1] arp broadcast enable
    [SwitchA-GigabitEthernet1/0/1.1] quit
    

    # Configure basic OSPF functions.

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

  2. Configure SwitchB.

    # Create a VLAN.

    <HUAWEI> system-view
    [HUAWEI] sysname SwitchB
    [SwitchB] vlan batch 30
    

    # Add an interface to the VLAN.

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

    # Assign an IP address to a VLANIF interface.

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

    # Create and configure GE1/0/2.1.

    [SwitchB] vcmp role silent
    [SwitchB] interface gigabitethernet1/0/2
    [SwitchB-GigabitEthernet1/0/2] port link-type hybrid
    [SwitchB-GigabitEthernet1/0/2] quit
    [SwitchB] interface gigabitethernet 1/0/2.1
    [SwitchB-GigabitEthernet1/0/2.1] dot1q termination vid 20
    [SwitchB-GigabitEthernet1/0/2.1] ip address 10.10.20.1 24
    [SwitchB-GigabitEthernet1/0/2.1] arp broadcast enable
    [SwitchB-GigabitEthernet1/0/2.1] quit
    

    # Configure basic OSPF functions.

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

  3. Verify the configuration.

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

    On the PCs residing on the Layer 2 network connected to SwitchB, set the default gateway address to 10.10.20.1/24, which is the IP address of GE1/0/2.1. The switch connected to SwitchA 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

SwitchA configuration file

#
sysname SwitchA
# 
router id 1.1.1.1
#
vcmp role silent                                                                
#
vlan batch 30
#
interface Vlanif30
 ip address 10.10.30.1 255.255.255.0
#
interface GigabitEthernet1/0/1
 port link-type hybrid
#
interface GigabitEthernet1/0/1.1
 dot1q termination vid 10
 ip address 10.10.10.1 255.255.255.0
 arp broadcast enable
#
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

SwitchB configuration file

#
sysname SwitchB
# 
router id 2.2.2.2
#
vcmp role silent                                                                
#
vlan batch 30
#
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 30
# 
interface GigabitEthernet1/0/2
 port link-type hybrid
#
interface GigabitEthernet1/0/2.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
Translation
Download
Updated: 2019-08-21

Document ID: EDOC1000142081

Views: 257703

Downloads: 408

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