[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.
4、验证
[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
Api 接口也就是所谓的应用程序接口,api 接口的全称是 Application Program Interface,通过 API 接口可以实现计算机软件之间的相互通信,开发人员可以通过 API 接口程序开发应用程序,可以减少编写无用程序,减轻编程任务…