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 IP Subnet-based VLAN Assignment

Example for Configuring IP Subnet-based VLAN Assignment

Networking Requirements

A company uses multiple services, including IPTV, VoIP, and Internet access. Each service uses a different IP subnet. To facilitate management, the company requires that packets of the same service be transmitted in the same VLAN and packets of different services be transmitted in different VLANs.

In Figure 4-28, the Switch receives packets of multiple services such as data, IPTV, and voice services. User devices of these services use IP addresses on different IP subnets. The Switch needs to assign VLANs to packets of different services so that the router can transmit packets with different VLAN IDs to different servers.

Figure 4-28  Networking of IP subnet-based VLAN assignment

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLANs and add interfaces to VLANs so that the interfaces allow the IP subnet-based VLANs.
  2. Enable IP subnet-based VLAN assignment and associate IP subnets with VLANs so that the Switch determines VLANs according to IP addresses or network segments of packets.

NOTE:

You do not need to perform any configuration on a simplified Layer 2 switch. To enable the router to transmit packets with different VLAN IDs to different servers, perform the following operations:

  • Add the router interface connected to the Switch to all service VLANs in tagged mode.
  • Add each interface of each service network to a service VLAN and configure a VLANIF interface.

For details, see the router configuration guide.

Procedure

  1. Create VLANs.

    # Create VLAN 100, VLAN 200, and VLAN 300 on the Switch.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 100 200 300

  2. Configure interfaces.

    # On the Switch, configure GE1/0/1 as the hybrid interface, add GE1/0/1 to VLAN 100, VLAN 200, and VLAN 300 in untagged mode, and enable IP subnet-based VLAN assignment.

    [Switch] interface gigabitethernet 1/0/1
    [Switch-GigabitEthernet1/0/1] port link-type hybrid
    [Switch-GigabitEthernet1/0/1] port hybrid untagged vlan 100 200 300
    [Switch-GigabitEthernet1/0/1] ip-subnet-vlan enable
    [Switch-GigabitEthernet1/0/1] quit

    # On the Switch, configure GE1/0/2 as the trunk interface, add GE1/0/2 to VLAN 100, VLAN 200, and VLAN 300 in tagged mode,

    [Switch] interface gigabitethernet 1/0/2
    [Switch-GigabitEthernet1/0/2] port link-type trunk
    [Switch-GigabitEthernet1/0/2] port trunk allow-pass vlan 100 200 300
    [Switch-GigabitEthernet1/0/2] quit

  3. Configure IP subnet-based VLAN assignment.

    # On the Switch, associate IP subnet 192.168.1.2/24 with VLAN 100 and set the 802.1p priority of VLAN 100 to 2.

    [Switch] vlan 100
    [Switch-vlan100] ip-subnet-vlan 1 ip 192.168.1.2 24 priority 2
    [Switch-vlan100] quit

    # On the Switch, associate IP subnet 192.168.2.2/24 with VLAN 200 and set the 802.1p priority of VLAN 200 to 3.

    [Switch] vlan 200
    [Switch-vlan200] ip-subnet-vlan 1 ip 192.168.2.2 24 priority 3
    [Switch-vlan200] quit

    # On the Switch, associate IP subnet 192.168.3.2/24 with VLAN 300 and set the 802.1p priority of VLAN 300 to 4.

    [Switch] vlan 300
    [Switch-vlan300] ip-subnet-vlan 1 ip 192.168.3.2 24 priority 4
    [Switch-vlan300] quit

  4. Verify the configuration.

    Run the display ip-subnet-vlan vlan all command on the Switch. The following information is displayed:

    [Switch] display ip-subnet-vlan vlan all
    ----------------------------------------------------------------
     Vlan    Index   IpAddress           SubnetMask          Priority
     ----------------------------------------------------------------
     100     1       192.168.1.2         255.255.255.0       2
     200     1       192.168.2.2         255.255.255.0       3
     300     1       192.168.3.2         255.255.255.0       4
     ----------------------------------------------------------------
     ip-subnet-vlan count: 3                  total count: 3 

Configuration Files

  • Switch configuration file

    #
    sysname Switch
    #
    vlan batch 100 200 300
    #
    vlan 100
     ip-subnet-vlan 1 ip 192.168.1.2 255.255.255.0 priority 2
    vlan 200
     ip-subnet-vlan 1 ip 192.168.2.2 255.255.255.0 priority 3
    vlan 300
     ip-subnet-vlan 1 ip 192.168.3.2 255.255.255.0 priority 4
    #
    interface GigabitEthernet1/0/1
     port link-type hybrid
     port hybrid untagged vlan 100 200 300
     ip-subnet-vlan enable
    #
    interface GigabitEthernet1/0/2
     port link-type trunk
     port trunk allow-pass vlan 100 200 300
    #
    return
Translation
Download
Updated: 2019-08-21

Document ID: EDOC1000142081

Views: 275100

Downloads: 421

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