something about the hybrid port on huawei switch part2----reprint Highlighted

865 0 0 1

authorized reprint by author zhushigeng(Vinsoney)


3. Identify VLANs based on IP addresses


Generally, when we create VLANs, the VLANs is based on the interfaces, that is, add interfaces of switches to a specific VLAN through commands. A site encounters a more "special" requirement.

         Case background: In the network shown in the following figure, there are three servers connect to SW2. The interfaces connected to Server1 and Server2 is an Access type interface and is added to the default VLAN1. The interface connected to Server3 is also an Access type interface, but is added to VLAN30. The uplink port of SW2 which connect to SW1 is a trunk type interface, this uplink port passthrough VLAN 1 and VLAN 30, and VLAN 1 is the default VLAN, that is, a VLAN that is not marked.



As a result, SW1 will receive three types of upstream traffic on GE6/0/15, which are untagged frames with source address, untagged frames with source address and the tagged frames from VLAN 30. The requirement is each network segment needs corresponding to the different VLAN on the core switch, and the mutual communication between the servers is required. For some reason, SW2 is not directly manageable, so configuration can only be done on SW1 and Core Switch.


Actually, our goal is to complete the configuration on SW1, so that when it receives the data with the source address of on GE6/0/15, it recognizes it as the data from VLAN10. When the source address is, it is identified as data frames from VLAN 20, and the data of VLAN 30 needs to be tagged. Therefore, IP address-based VLAN division needs to be deployed on SW1. Of course, the interface can not tag the data from VLAN 10 and VLAN 20, but data frames from VLAN30 needs to be tagged.

The configuration of SW1 is as follows:


         [SW1] vlan batch 10 20 30

         [SW1] vlan 10

         [SW1-vlan10] ip-subnet-vlan ip 24        # Configure the mapping between subnets and VLANs:

         [SW1] vlan 20

         [SW1-vlan20] ip-subnet-vlan ip 24        # Configure the mapping between subnets and VLANs:


         [SW1-GigabitEthernet6/0/15] port link-type hybrid

         [SW1-GigabitEthernet6/0/15] port hybrid untagged vlan 10 20        #configure sending vlan10 vlan20 data with untagged

         [SW1-GigabitEthernet6/0/15] port hybrid tagged vlan 30                   #configure sending vlan30 data with tagged

         [SW1-GigabitEthernet6/0/15] ip-subnet-vlan enable                            #Configure VLANs based on IP addresses.


         [SW1] interface GigabitEthernet 6/0/22

         [SW1-GigabitEthernet6/0/22] port link-type trunk

         [SW1-GigabitEthernet6/0/22] port trunk allow-pass vlan 10 20 30



The configuration of the coreswitch is as follows:


         [CoreSwitch] vlan batch 10 20 30

         [CoreSwitch] interface Vlanif 10

         [CoreSwitch-Vlanif10] ip address

         [CoreSwitch] interface Vlanif 20

         [CoreSwitch-Vlanif20] ip address

         [CoreSwitch] interface Vlanif 30

         [CoreSwitch-Vlanif30] ip address

         [CoreSwitch] interface GigabitEthernet 6/0/22

         [CoreSwitch-GigabitEthernet6/0/22] port link-type trunk

         [CoreSwitch-GigabitEthernet6/0/22] port trunk allow-pass vlan 10 20 30



  • x
  • convention:


You need to log in to reply to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

Login and enjoy all the member benefits

Fast reply Scroll to top