赞
踩
[LSW1]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2]vlan batch 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]interface Ethernet 0/0/1
[LSW1-Ethernet0/0/1]port link-type trunk # 将该接口设置为trunk链路类型,可以传输多个VLAN的数据。
[LSW1-Ethernet0/0/1]port trunk pvid vlan 1 # 将该接口的Native VLAN设置为VLAN 1,该接口上接收到的未打上VLAN标签的数据将被认为属于VLAN 1。
[LSW1-Ethernet0/0/1]port trunk allow-pass vlan 10 20 # 允许该接口通过的VLAN列表为VLAN 10和VLAN 20,只有这两个VLAN的数据可以通过该接口传输。
[LSW2]interface Ethernet 0/0/1
[LSW2-Ethernet0/0/1]port link-type trunk
[LSW2-Ethernet0/0/1]port trunk pvid vlan 1
[LSW2-Ethernet0/0/1]port trunk allow-pass vlan 10 20
[LSW1-Ethernet0/0/1]interface Ethernet 0/0/2
[LSW1-Ethernet0/0/2]port link-type access # 将该接口设置为access链路类型,只能传输单个VLAN的数据。
[LSW1-Ethernet0/0/2]port default vlan 10 # 将该接口的默认VLAN设置为VLAN 10,该接口上接收到的未打上VLAN标签的数据将被认为属于VLAN 10。
[LSW1-Ethernet0/0/2]interface Ethernet 0/0/3
[LSW1-Ethernet0/0/3]port link-type access
[LSW1-Ethernet0/0/3]port default vlan 20
[LSW2-Ethernet0/0/1]interface Ethernet 0/0/2
[LSW2-Ethernet0/0/2]port link-type access
[LSW2-Ethernet0/0/2]port default vlan 20
[LSW2-Ethernet0/0/2]interface Ethernet 0/0/3
[LSW2-Ethernet0/0/3]port link-type access
[LSW2-Ethernet0/0/3]port default vlan 10
[LSW1]vlan batch 10 20 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW2]vlan batch 10 20 100
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]interface Ethernet 0/0/2
[LSW1-Ethernet0/0/2]port link-type hybrid # 将该接口设置为hybrid链路类型,可以同时传输 tagged 和 untagged 的数据。
[LSW1-Ethernet0/0/2]port hybrid pvid vlan 10 # 将该接口的Native VLAN设置为VLAN 10,即该接口上接收到的未打上VLAN标签的数据将被认为属于VLAN 10。
[LSW1-Ethernet0/0/2]port hybrid untagged vlan 10 100 # 将该接口设置为untagged模式,该接口上接收到的数据将被自动打上VLAN 10和VLAN 100的标签。
[LSW1-Ethernet0/0/2]interface Ethernet 0/0/3
[LSW1-Ethernet0/0/3]port link-type hybrid
[LSW1-Ethernet0/0/3]port hybrid pvid vlan 20
[LSW1-Ethernet0/0/3]port hybrid untagged vlan 20 100
[LSW1-Ethernet0/0/3]interface Ethernet 0/0/1
[LSW1-Ethernet0/0/1]port link-type hybrid
[LSW1-Ethernet0/0/1]port hybrid tagged vlan 10 20 100 # 接口的标记VLAN为VLAN 10、VLAN 20和VLAN 100。
[LSW2]interface Ethernet 0/0/1
[LSW2-Ethernet0/0/1]port link-type hybrid
[LSW2-Ethernet0/0/1]port hybrid tagged vlan 10 20 100
[LSW2-Ethernet0/0/1]interface Ethernet 0/0/2
[LSW2-Ethernet0/0/2]port link-type hybrid
[LSW2-Ethernet0/0/2]port hybrid pvid vlan 100
[LSW2-Ethernet0/0/2]port hybrid untagged vlan 10 20 100
[LSW1]display vlan
The total number of vlans is : 4
--------------------------------------------------------------------------------
U: Up; D: Down; TG: Tagged; UT: Untagged;
MP: Vlan-mapping; ST: Vlan-stacking;
#: ProtocolTransparent-vlan; *: Management-vlan;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/2(U) Eth0/0/3(U) Eth0/0/4(D)
Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D)
Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D)
Eth0/0/13(D) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
Eth0/0/21(D) Eth0/0/22(D) GE0/0/1(D) GE0/0/2(D)
10 common UT:Eth0/0/2(U)
TG:Eth0/0/1(U)
20 common UT:Eth0/0/3(U)
TG:Eth0/0/1(U)
100 common UT:Eth0/0/2(U) Eth0/0/3(U)
TG:Eth0/0/1(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
100 enable default enable disable VLAN 0100
[LSW1]
[LSW1]vlan 10
[LSW1-vlan10]
[LSW1-vlan10]mac-vlan mac-address 5489-9867-42FE # 将MAC地址5489-9867-42FE添加到VLAN 10中。
[LSW1-vlan10]mac-vlan mac-address 5489-9861-0375
[LSW1-vlan10]q
[LSW1]vlan 20
[LSW1-vlan20]mac-vlan mac-address 5489-9810-68BE
[LSW1]interface Ethernet 0/0/1
[LSW1-Ethernet0/0/1]port link-type hybrid
[LSW1-Ethernet0/0/1]port hybrid untagged vlan 10
[LSW1-Ethernet0/0/1]interface Ethernet 0/0/2
[LSW1-Ethernet0/0/2]port hybrid untagged vlan 10
[LSW1-Ethernet0/0/2]q
[LSW1]interface Ethernet 0/0/3
[LSW1-Ethernet0/0/3]port link-type hybrid
[LSW1-Ethernet0/0/3]port hybrid untagged vlan 20
[LSW1]interface Ethernet 0/0/1
[LSW1-Ethernet0/0/1]mac-vlan enable
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1-Ethernet0/0/1]interface Ethernet 0/0/2
[LSW1-Ethernet0/0/2]mac-vlan enable
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1-Ethernet0/0/2]interface Ethernet 0/0/3
[LSW1-Ethernet0/0/3]mac-vlan enable
Info: This operation may take a few seconds. Please wait for a moment...done.
[LSW1]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;
--------------------------------------------------------------------------------
VID Type Ports
--------------------------------------------------------------------------------
1 common UT:Eth0/0/1(U) Eth0/0/2(U) Eth0/0/3(U) Eth0/0/4(D)
Eth0/0/5(D) Eth0/0/6(D) Eth0/0/7(D) Eth0/0/8(D)
Eth0/0/9(D) Eth0/0/10(D) Eth0/0/11(D) Eth0/0/12(D)
Eth0/0/13(D) Eth0/0/14(D) Eth0/0/15(D) Eth0/0/16(D)
Eth0/0/17(D) Eth0/0/18(D) Eth0/0/19(D) Eth0/0/20(D)
Eth0/0/21(D) Eth0/0/22(D) GE0/0/1(D) GE0/0/2(D)
10 common UT:Eth0/0/1(U) Eth0/0/2(U)
20 common UT:Eth0/0/3(U)
VID Status Property MAC-LRN Statistics Description
--------------------------------------------------------------------------------
1 enable default enable disable VLAN 0001
10 enable default enable disable VLAN 0010
20 enable default enable disable VLAN 0020
[LSW1]display mac-vlan mac-address all
---------------------------------------------------
MAC Address MASK VLAN Priority
---------------------------------------------------
5489-9861-0375 ffff-ffff-ffff 10 0
5489-9810-68be ffff-ffff-ffff 20 0
5489-9867-42fe ffff-ffff-ffff 10 0
Total MAC VLAN address count: 3
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。