Vlan Mapping

Vlan Mapping:vlan标签转换、vlan翻译

网络拓扑图:

需求:在SW2将客户端发来的vlan30~33数据全部转换成vlan 100从G0/0/1口往上发出

SW1配置:

<Huawei>system-view       
[Huawei]undo info-center enable
[Huawei]sysname sw1
[sw1]vlan batch 30 31
[sw1]interface Ethernet0/0/2
[sw1-Ethernet0/0/2]port default vlan 30

[sw1-Ethernet0/0/2]inter eth0/0/3
[sw1-Ethernet0/0/3]port link-type access 
[sw1-Ethernet0/0/3]port default vlan 31

[sw1-Ethernet0/0/3]inter eth0/0/1
[sw1-Ethernet0/0/1]port link-type trunk 
[sw1-Ethernet0/0/1]port trunk allow-pass vlan 30 31

 

SW2:

<Huawei>system-view       
[Huawei]undo info-center enable
[Huawei]sysname sw1
[sw2]vlan batch 32 33
[sw2]interface Ethernet0/0/2
[sw2-Ethernet0/0/2]port default vlan 32

[sw2-Ethernet0/0/2]inter eth0/0/3
[sw2-Ethernet0/0/3]port link-type access 
[sw2-Ethernet0/0/3]port default vlan 33

[sw2-Ethernet0/0/3]inter eth0/0/1
[sw2-Ethernet0/0/1]port link-type trunk 
[sw2-Ethernet0/0/1]port trunk allow-pass vlan 32 33

 

SW4:

<Huawei>system-view
[Huawei]undo info-center enable
[Huawei]sysname sw4
[sw4]vlan 100
[sw4-vlan100]quit 
[sw4]interface GigabitEthernet 0/0/1
[sw4-GigabitEthernet0/0/1]port link-type trunk 
[sw4-GigabitEthernet0/0/1]port trunk allow-pass vlan 100

 

SW3配置:

<Huawei>system-view 
[Huawei]undo info-center enable
[Huawei]sysname sw3
[sw3]vlan batch 30 to 33 100
[sw3]interface GigabitEthernet 0/0/2
[sw3-GigabitEthernet0/0/2]port link-type trunk
[sw3-GigabitEthernet0/0/2]port trunk allow-pass vlan 30 31

[sw3-GigabitEthernet0/0/2]inter gig0/0/3
[sw3-GigabitEthernet0/0/3]port link-type trunk 
[sw3-GigabitEthernet0/0/3]port trunk allow-pass vlan 32 33

[sw3-GigabitEthernet0/0/3]inter gig0/0/1
[sw3-GigabitEthernet0/0/1]port link-type trunk
[sw3-GigabitEthernet0/0/1]port trunk allow-pass vlan 100
[sw3-GigabitEthernet0/0/1]qinq vlan-translation enable         #开启vlan标签转换
[sw3-GigabitEthernet0/0/1]port vlan-mapping vlan 30 to 33 map-vlan 100         #将vlan30~33的标签转换成vlan 100

注:因模拟器bug,实验无法验证

posted @ 2021-06-24 20:30  凡是過往;皆為序章  阅读(621)  评论(0编辑  收藏  举报