拓扑
命令
LSW1
[LSW1]vlan batch 2 3 4
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]interface g0/0/1
[LSW1-GigabitEthernet0/0/1]port link-type hybrid
[LSW1-GigabitEthernet0/0/1]port hybrid untagged vlan 2 3
[LSW1-GigabitEthernet0/0/1]qinq vlan-translation enable
[LSW1-GigabitEthernet0/0/1]port vlan-stacking vlan 10 stack-vlan 2
[LSW1-GigabitEthernet0/0/1]port vlan-stacking vlan 20 stack-vlan 3
[LSW1]int g0/0/2
[LSW1-GigabitEthernet0/0/2]port link-type trunk
[LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 3
[LSW1-GigabitEthernet0/0/2]q
[LSW1-GigabitEthernet0/0/1]int g0/0/3
[LSW1-GigabitEthernet0/0/3]port link-type dot1q-tunnel #设定接口类型
[LSW1-GigabitEthernet0/0/3]port default vlan 4
LSW2
[LSW2-vlan4]int g0/0/1
[LSW2-GigabitEthernet0/0/1]port link-type hybrid
[LSW2-GigabitEthernet0/0/1]port hybrid untagged vlan 2 3
[LSW2-GigabitEthernet0/0/1]qinq vlan-translation enable
[LSW2-GigabitEthernet0/0/1]port vlan-stacking vlan 10 stack-vlan 2
[LSW2-GigabitEthernet0/0/1]port vlan-stacking vlan 20 stack-vlan 3
[LSW2]int g0/0/3
[LSW2-GigabitEthernet0/0/3]port link-type dot1q-tunnel
[LSW2-GigabitEthernet0/0/3]port default vlan 4
[LSW2-GigabitEthernet0/0/3]q
[LSW2]q
[LSW2-GigabitEthernet0/0/1]int g0/0/3
[LSW2-GigabitEthernet0/0/3]port link-type dot1q-tunnel
[LSW2-GigabitEthernet0/0/3]port default vlan 4
[LSW2-GigabitEthernet0/0/3]q
[LSW2]q
LSW3
[LSW3]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW3]int g0/0/2
[LSW3-GigabitEthernet0/0/2]port link-type access
[LSW3-GigabitEthernet0/0/2]port default vlan 10
[LSW3-GigabitEthernet0/0/2]int g0/0/3
[LSW3-GigabitEthernet0/0/3]port link-type access
[LSW3-GigabitEthernet0/0/3]port default vlan 20
[LSW3-GigabitEthernet0/0/3]int g0/0/1
[LSW3-GigabitEthernet0/0/1]port link-type trunk
[LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[LSW3-GigabitEthernet0/0/1]q
[LSW3]q
LSW4
[LSW4]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW4]int g0/0/1
[LSW4-GigabitEthernet0/0/1]port link-type trunk
[LSW4-GigabitEthernet0/0/1]port trunk allow-pass vlan 10 20
[LSW4-GigabitEthernet0/0/1]int g0/0/2
[LSW4-GigabitEthernet0/0/2]port link-type access
[LSW4-GigabitEthernet0/0/2]port default vlan 10
[LSW4-GigabitEthernet0/0/2]int g0/0/3
[LSW4-GigabitEthernet0/0/3]port link-type access
[LSW4-GigabitEthernet0/0/3]port default vlan 20
[LSW4-GigabitEthernet0/0/3]q
LSW5
[LSW5-vlan10]int g0/0/3
[LSW5-GigabitEthernet0/0/3]port link-type access
[LSW5-GigabitEthernet0/0/3]port default vlan 10
[LSW5-GigabitEthernet0/0/3]int g0/0/1
[LSW5-GigabitEthernet0/0/1]port link-type trunk
[LSW5-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[LSW5-GigabitEthernet0/0/1]q
LSW6
[LSW6]vlan 10
[LSW6-vlan10]int g0/0/1
[LSW6-GigabitEthernet0/0/1]port link-type trunk
[LSW6-GigabitEthernet0/0/1]port trunk allow-pass vlan 10
[LSW5/6-GigabitEthernet0/0/2]port link-type dot1q-tunnel
[LSW5/6-GigabitEthernet0/0/2]port default vlan 4
[LSW5/6-GigabitEthernet0/0/2]q
[LSW6-GigabitEthernet0/0/1]int g0/0/3
[LSW6-GigabitEthernet0/0/3]port link-type access
[LSW6-GigabitEthernet0/0/3]port default vlan 10
[LSW6-GigabitEthernet0/0/3]q
[LSW6]q