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

Common Operation Guide

CloudEngine 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

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

Configuring IP Subnet-based VLAN Assignment

Networking Requirements

A data center has multiple services, including office, production, and disaster recovery services. Each service uses a different IP subnet. To facilitate management, the data center requires that packets of the same service be transmitted in the same VLAN and packets of different services in different VLANs.

In Figure 18-4, the switch is connected to the office server, production server, and disaster recovery server, and IP subnets of different services are different. Different services need to be allocated to different VLANs and distributed to different remote networks based on VLAN IDs.

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

Configuration Roadmap

The configuration roadmap is as follows:

  1. Create VLANs and determine VLANs where services are transmitted.
  2. Associate subnets with VLANs so that VLANs are determined based on source IP addresses of packets or IP subnets.

  3. Add interfaces to VLANs so that the interfaces allow the IP subnet-based VLANs.
  4. Enable IP subnet-based VLAN assignment.

Procedure

  1. Create VLANs.

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

    <HUAWEI> system-view
    [~HUAWEI] sysname Switch
    [*HUAWEI] commit
    [~Switch] vlan batch 100 200 300
    [*Switch] commit
    
  2. Configure interfaces.

    # On the switch, configure 10GE1/0/5, 10GE1/0/6, and 10GE1/0/7 as hybrid interfaces and add them to VLAN 100, VLAN 200, and VLAN 300 respectively in untagged mode. Enable IP subnet-based VLAN assignment.

    [~Switch] interface 10ge 1/0/5
    [~Switch-10GE1/0/5] port link-type hybrid
    [*Switch-10GE1/0/5] port hybrid untagged vlan 100
    [*Switch-10GE1/0/5] port hybrid pvid vlan 100
    [*Switch-10GE1/0/5] ip-subnet-vlan enable
    [*Switch-10GE1/0/5] quit
    [*Switch] interface 10ge 1/0/6
    [*Switch-10GE1/0/6] port link-type hybrid
    [*Switch-10GE1/0/6] port hybrid untagged vlan 200
    [*Switch-10GE1/0/6] port hybrid pvid vlan 200
    [*Switch-10GE1/0/6] ip-subnet-vlan enable
    [*Switch-10GE1/0/6] quit
    [*Switch] interface 10ge 1/0/7
    [*Switch-10GE1/0/7] port link-type hybrid
    [*Switch-10GE1/0/7] port hybrid untagged vlan 300
    [*Switch-10GE1/0/7] port hybrid pvid vlan 300
    [*Switch-10GE1/0/7] ip-subnet-vlan enable
    [*Switch-10GE1/0/7] quit
    [*Switch] commit

    # Add 10GE1/0/2 on the switch to VLAN 100.

    [~Switch] interface 10ge 1/0/2
    [~Switch-10GE1/0/2] port link-type trunk
    [*Switch-10GE1/0/2] port trunk allow-pass vlan 100
    [*Switch-10GE1/0/2] quit
    [*Switch] commit
    

    # Add 10GE1/0/3 on the switch to VLAN 200.

    [~Switch] interface 10ge 1/0/3
    [~Switch-10GE1/0/3] port link-type trunk
    [*Switch-10GE1/0/3] port trunk allow-pass vlan 200
    [*Switch-10GE1/0/3] quit
    [*Switch] commit

    # Add 10GE1/0/4 on the Switch to VLAN 300.

    [~Switch] interface 10ge 1/0/4
    [~Switch-10GE1/0/4] port link-type trunk
    [*Switch-10GE1/0/4] port trunk allow-pass vlan 300
    [*Switch-10GE1/0/4] quit
    [*Switch] commit
  3. Configure IP subnet-based VLAN assignment.

    # Associate VLAN 100 with IP subnet 192.168.1.2/24 on the switch.

    [~Switch] vlan 100
    [~Switch-vlan100] ip-subnet-vlan 1 ip 192.168.1.2 24
    [*Switch-vlan100] quit

    # Associate VLAN 200 with IP subnet 192.168.2.2/24 on the Switch.

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

    # Associate VLAN 300 with IP subnet 192.168.3.2/24 on the switch.

    [*Switch] vlan 300
    [*Switch-vlan300] ip-subnet-vlan 1 ip 192.168.3.2 24
    [*Switch-vlan300] quit
    [*Switch] commit
    
  4. Verify the configuration.

    Run the following command on the switch.

    [~Switch] display ip-subnet-vlan vlan all
     IP-subnet-VLAN count: 3                  total count: 3
     ----------------------------------------------------------------
     VLAN    Index  IpAddress            SubnetMask          Priority
     ----------------------------------------------------------------
     100         1  192.168.1.2          255.255.255.0              0
     200         1  192.168.2.2          255.255.255.0              0
     300         1  192.168.3.2          255.255.255.0              0
     ----------------------------------------------------------------

    The production service, office service, and disaster recovery service can only be transmitted in the production center, campus office network, and disaster recovery data center respectively.

Translation
Download
Updated: 2018-10-08

Document ID: EDOC1000102369

Views: 194303

Downloads: 3212

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