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 VLANIF Interfaces to Implement Inter-VLAN Communication

Example for Configuring VLANIF Interfaces to Implement Inter-VLAN Communication

Networking Requirements

Different user hosts of a company transmit the same service, and are located on different network segments. User hosts transmitting the same service belong to different VLANs and need to communicate.

As shown in Figure 3-20, User1 and User2 use the same service but belong to different VLANs and are located on different network segments. User1 and User2 need to communicate.

Figure 3-20  Configuring VLANIF interfaces to implement inter-VLAN communication

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLANs and determine VLANs that users belong to.
  2. Add interfaces to VLANs and configure the interfaces to allow the VLANs.
  3. Create VLANIF interfaces and configure IP addresses for the VLANIF interfaces to implement Layer 3 connectivity.
NOTE:

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

Procedure

  1. Configure the router.

    # Create VLANs.

    <Huawei> system-view
    [Huawei] sysname Router
    [Router] vlan batch 10 20
    

    # Add interfaces to VLANs.

    [Router] interface ethernet 0/0/1
    [Router-Ethernet0/0/1] port link-type access
    [Router-Ethernet0/0/1] port default vlan 10
    [Router-Ethernet0/0/1] quit
    [Router] interface ethernet 2/0/1
    [Router-Ethernet2/0/1] port link-type access
    [Router-Ethernet2/0/1] port default vlan 20
    [Router-Ethernet2/0/1] quit
    

    # Assign IP addresses to VLANIF interfaces.

    [Router] interface vlanif 10
    [Router-Vlanif10] ip address 10.10.10.2 24
    [Router-Vlanif10] quit
    [Router] interface vlanif 20
    [Router-Vlanif20] ip address 10.10.20.2 24
    [Router-Vlanif20] quit
    

  2. Verify the configuration.

    # Configure the IP address of 10.10.10.3/24 and default gateway address as 10.10.10.2/24 (VLANIF 10's IP address) for User1 in VLAN 10.

    # Configure the IP address of 10.10.20.3/24 and default gateway address as 10.10.20.2/24 (VLANIF 20's IP address) for User2 in VLAN 20.

    # After the configuration is complete, User1 in VLAN 10 and User2 in VLAN 20 can communicate.

Configuration Files

Router configuration file

#
sysname Router
#
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 Ethernet0/0/1
 port link-type access
 port default vlan 10
#
interface Ethernet2/0/1
 port link-type access
 port default vlan 20
#
return
Download
Updated: 2019-04-12

Document ID: EDOC1100041791

Views: 59293

Downloads: 40

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