Table of Contents

Huawei - VLAN hybrid v2

Cenário

SWA

<HUAWEI>system-view 
[~HUAWEI]sysname SWA
[~HUAWEI]vlan batch 10 20
TRUNK
[*HUAWEI]interface GE 1/0/1              
[*HUAWEI-GE1/0/1]port link-type trunk            
[*HUAWEI-GE1/0/1]port trunk allow-pass vlan 10 20
ACCESS VLAN 10
[~SWA]interface GE 1/0/10
[~SWA-GE1/0/10]port link-type hybrid 
[*SWA-GE1/0/10]port hybrid pvid vlan 10
[*SWA-GE1/0/10]port hybrid untagged vlan 10
Outros exemplos de tageamento de VLAN
[~SWA]interface GE 1/0/10
[~SWA-GE1/0/10]port link-type access 
[*SWA-GE1/0/10]port default vlan 10
[~SWA]interface GE 1/0/10
[~SWA-GE1/0/10]port link-type hybrid 
[*SWA-GE1/0/10]port hybrid pvid vlan 10
[*SWA-GE1/0/10]port hybrid untagged vlan 10
[*SWA-GE1/0/10]port hybrid tagged vlan 50
ACCESS VLAN 20
[~SWA]interface GE 1/0/15
[~SWA-GE1/0/15]port link-type hybrid 
[*SWA-GE1/0/15]port hybrid pvid vlan 20
[*SWA-GE1/0/15]port hybrid untagged vlan 20
[*SWA-GE1/0/15]quit
[*SWA]commit
[~SWA]display vlan 
The total number of vlans is : 3
--------------------------------------------------------------------------------
U: Up;         D: Down;         TG: Tagged;         UT: Untagged;
MP: Vlan-mapping;               ST: Vlan-stacking;
#: ProtocolTransparent-vlan;    *: Management-vlan;
MAC-LRN: MAC-address learning;  STAT: Statistic;
BC: Broadcast; MC: Multicast;   UC: Unknown-unicast;
FWD: Forward;  DSD: Discard;
--------------------------------------------------------------------------------
 
VID          Ports                                                          
--------------------------------------------------------------------------------
   1         UT:GE1/0/0(U)      GE1/0/1(U)      GE1/0/2(U)      GE1/0/3(U)      
                GE1/0/4(U)      GE1/0/5(U)      GE1/0/6(U)      GE1/0/7(U)      
                GE1/0/8(U)      GE1/0/9(U)      GE1/0/10(U)     GE1/0/11(U)     
                GE1/0/12(U)     GE1/0/13(U)     GE1/0/14(U)     GE1/0/15(U)     
                GE1/0/16(U)     GE1/0/17(U)     GE1/0/18(U)     GE1/0/19(U)     
                GE1/0/20(D)     GE1/0/21(D)     GE1/0/22(D)     GE1/0/23(D)     
                GE1/0/24(D)     GE1/0/25(D)     GE1/0/26(D)     GE1/0/27(D)     
                GE1/0/28(D)     GE1/0/29(D)     GE1/0/30(D)     GE1/0/31(D)     
                GE1/0/32(D)     GE1/0/33(D)     GE1/0/34(D)     GE1/0/35(D)     
                GE1/0/36(D)     GE1/0/37(D)     GE1/0/38(D)     GE1/0/39(D)     
                GE1/0/40(D)     GE1/0/41(D)     GE1/0/42(D)     GE1/0/43(D)     
                GE1/0/44(D)     GE1/0/45(D)     GE1/0/46(D)     GE1/0/47(D)     
  10         UT:GE1/0/10(U)                                                     
             TG:GE1/0/1(U)                                                      
  20         UT:GE1/0/15(U)                                                     
             TG:GE1/0/1(U)                                                      
 
VID  Type     Status  Property  MAC-LRN STAT    BC  MC  UC  Description
--------------------------------------------------------------------------------
   1 common   enable  default   enable  disable FWD FWD FWD VLAN 0001           
  10 common   enable  default   enable  disable FWD FWD FWD VLAN 0010           
  20 common   enable  default   enable  disable FWD FWD FWD VLAN 0020

SWA

<HUAWEI>system-view 
[~HUAWEI]sysname SWA
[*HUAWEI]commit 
[~SWA]vlan batch 10 20
TRUNK
[~SWA]interface GE 1/0/1
[~SWA-GE1/0/1]port link-type trun	
[~SWA-GE1/0/1]port link-type trunk 
[*SWA-GE1/0/1]port trunk allow-pass vlan 10 20
[*SWA-GE1/0/1]quit
[*SWA]commit
ACCESS VLAN 10
[~SWA]interface GE 1/0/15
[~SWA-GE1/0/15]port link-type hybrid 
[*SWA-GE1/0/15]port hybrid pvid vlan 10
[*SWA-GE1/0/15]port hybrid untagged vlan 10
[*SWA-GE1/0/15]quit
[*SWA]commit 
ACCESS VLAN 20
[~SWA]interface GE 1/0/10
[~SWA-GE1/0/10]port link-type hybrid 
[*SWA-GE1/0/10]port hybrid pvid vlan 20
[*SWA-GE1/0/10]port hybrid untagged vlan 20
[*SWA-GE1/0/10]quit
[*SWA]commit

VPC

VPC10 VLAN 10

VPCS> ip 192.168.10.10/24

VPC20 VLAN 20

VPCS> ip 192.168.10.20/24

VPC30 VLAN 10

VPCS> ip 192.168.20.30/24

VPC40 VLAN 20

VPCS> ip 192.168.20.40/24

Testando o acesso

VPC10 VLAN 10

VPCS> ping 192.168.10.20
 
84 bytes from 192.168.10.20 icmp_seq=1 ttl=64 time=2.540 ms
84 bytes from 192.168.10.20 icmp_seq=2 ttl=64 time=2.283 ms
84 bytes from 192.168.10.20 icmp_seq=3 ttl=64 time=2.688 ms
84 bytes from 192.168.10.20 icmp_seq=4 ttl=64 time=2.639 ms
84 bytes from 192.168.10.20 icmp_seq=5 ttl=64 time=2.241 ms

VPC20 VLAN 20

VPCS> ping 192.168.10.10
 
84 bytes from 192.168.10.10 icmp_seq=1 ttl=64 time=2.356 ms
84 bytes from 192.168.10.10 icmp_seq=2 ttl=64 time=2.744 ms
84 bytes from 192.168.10.10 icmp_seq=3 ttl=64 time=2.864 ms
84 bytes from 192.168.10.10 icmp_seq=4 ttl=64 time=2.632 ms
84 bytes from 192.168.10.10 icmp_seq=5 ttl=64 time=2.754 ms

VPC30 VLAN 10

VPCS> ping 192.168.20.40
 
84 bytes from 192.168.20.40 icmp_seq=1 ttl=64 time=2.667 ms
84 bytes from 192.168.20.40 icmp_seq=2 ttl=64 time=2.631 ms
84 bytes from 192.168.20.40 icmp_seq=3 ttl=64 time=3.021 ms
84 bytes from 192.168.20.40 icmp_seq=4 ttl=64 time=2.170 ms
84 bytes from 192.168.20.40 icmp_seq=5 ttl=64 time=2.053 ms

VPC40 VLAN 20

VPCS> ping 192.168.20.30
 
84 bytes from 192.168.20.30 icmp_seq=1 ttl=64 time=2.765 ms
84 bytes from 192.168.20.30 icmp_seq=2 ttl=64 time=2.598 ms
84 bytes from 192.168.20.30 icmp_seq=3 ttl=64 time=2.600 ms
84 bytes from 192.168.20.30 icmp_seq=4 ttl=64 time=2.840 ms
84 bytes from 192.168.20.30 icmp_seq=5 ttl=64 time=2.231 ms

VLAN de gerência

SWA

[~SWA]vlan 100
[*SWA-vlan100]quit
[*SWA]interface Vlanif 100
[*SWA-Vlanif100]description VLAN-MGMT
[*SWA-Vlanif100]ip address 192.168.100.2 255.255.255.0
[*SWA-Vlanif100]quit
[*SWA]commit 
[~SWA]interface GE 1/0/1
[~SWA-GE1/0/1]port trunk allow-pass vlan 100
[*SWA-GE1/0/1]commit 
[~SWA-GE1/0/1]display this 
#
interface GE1/0/1
 undo shutdown
 port link-type trunk
 port trunk allow-pass vlan 10 20 100
#
return 
[~SWA]return 
<SWA>ping 192.168.100.3
  PING 192.168.100.3: 56  data bytes, press CTRL_C to break
    Reply from 192.168.100.3: bytes=56 Sequence=1 ttl=255 time=15 ms
    Reply from 192.168.100.3: bytes=56 Sequence=2 ttl=255 time=2 ms
    Reply from 192.168.100.3: bytes=56 Sequence=3 ttl=255 time=2 ms
    Reply from 192.168.100.3: bytes=56 Sequence=4 ttl=255 time=2 ms
    Reply from 192.168.100.3: bytes=56 Sequence=5 ttl=255 time=3 ms
 
  --- 192.168.100.3 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 2/4/15 ms
 
<SWA>

SWB

[~SWA]vlan 100
[*SWA-vlan100]quit	
[*SWA]interface Vlanif 100
[*SWA-Vlanif100]description VLAN-MGMT
[*SWA-Vlanif100]ip address 192.168.100.3 24
[*SWA-Vlanif100]quit
[*SWA]commit 
[~SWA]interface GE 1/0/1
[~SWA-GE1/0/1]port trunk allow-pass vlan 100
[*SWA-GE1/0/1]commit 
[~SWA-GE1/0/1]display this
#
interface GE1/0/1
 undo shutdown
 port link-type trunk
 port trunk allow-pass vlan 10 20 100
#
return
[~SWA]return 
<SWA>ping 192.168.100.2
  PING 192.168.100.2: 56  data bytes, press CTRL_C to break
    Reply from 192.168.100.2: bytes=56 Sequence=1 ttl=255 time=3 ms
    Reply from 192.168.100.2: bytes=56 Sequence=2 ttl=255 time=3 ms
    Reply from 192.168.100.2: bytes=56 Sequence=3 ttl=255 time=3 ms
    Reply from 192.168.100.2: bytes=56 Sequence=4 ttl=255 time=2 ms
    Reply from 192.168.100.2: bytes=56 Sequence=5 ttl=255 time=2 ms
 
  --- 192.168.100.2 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 2/2/3 ms
 
<SWA>