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

Configuration Guide - Ethernet Switching

CloudEngine 8800, 7800, 6800, and 5800 V200R003C00

This document describes the configuration of Ethernet services, including configuring MAC address table, link aggregation, VLANs, MUX VLAN, Voice VLAN, VLAN mapping, QinQ, GVRP, VCMP, STP/RSTP/MSTP, VBST, SEP, RRPP, ERPS, LBDT, 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 Implementing Inter-VLAN Communication Using VLANIF Interfaces

Example for Implementing Inter-VLAN Communication Using VLANIF Interfaces

Networking Requirements

Users in a company use different services and locate at different network segments. Users who use the same service belong to different VLANs and they want to communicate with each other.

In Figure 5-25, User 1 and User 2 use the same service and need to communicate, but belong to different VLANs and are located on different network segments.

Figure 5-25 Networking diagram for implementing inter-VLAN communication using VLANIF interfaces

Configuration Roadmap

  1. Create VLANs on the switches for different users.
  2. Add interfaces to VLANs so that packets of the VLANs can pass through the interfaces.
  3. Create VLANIF interfaces and configure IP addresses for the VLANIF interfaces to implement Layer 3 communication.
NOTE:

To implement communication between VLANs, hosts in each VLAN must use the IP address of the corresponding VLANIF interface as the gateway address.

Procedure

  1. Configure the Switch.

    # Create VLANs.

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*HUAWEI] commit
    [~Switch] vlan batch 10 20
    [*Switch] commit
    

    # Add interfaces to VLANs.

    [~Switch] interface 10ge 1/0/1
    [~Switch-10GE1/0/1] port default vlan 10
    [*Switch-10GE1/0/1] quit
    [*Switch] interface 10ge 1/0/2
    [*Switch-10GE1/0/2] port default vlan 20
    [*Switch-10GE1/0/2] quit
    [*Switch] commit
    

    # Assign IP addresses to the VLANIF interfaces.

    [~Switch] interface vlanif 10
    [*Switch-Vlanif10] ip address 10.10.10.2 24
    [*Switch-Vlanif10] quit
    [*Switch] interface vlanif 20
    [*Switch-Vlanif20] ip address 10.10.20.2 24
    [*Switch-Vlanif20] quit
    [*Switch] commit
    

  2. Verify the configuration.

    Configure the IP address 10.10.10.3/24 on user 1's host, configure the VLANIF 10 interface IP address 10.10.10.2/24 as the gateway address.

    Configure the IP address 10.10.20.3/24 on user 1's host, configure the VLANIF 10 interface IP address 10.10.20.2/24 as the gateway address.

    After the preceding configurations are complete, User 1 in VLAN 10 and User 2 in VLAN 20 can communicate.

Configuration Files

Configuration file of the Switch

#
sysname Switch
#
vlan batch 10 20
#
interface Vlanif10
 ip address 10.10.10.2 255.255.255.0
#
interface Vlanif20
 ip address 10.10.20.2 255.255.255.0
#
interface 10GE1/0/1
 port default vlan 10
#
interface 10GE1/0/2
 port default vlan 20
#
return
Translation
Download
Updated: 2019-05-08

Document ID: EDOC1100004351

Views: 125583

Downloads: 295

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