whycx2013 发表于 2013-12-29 11:15:03

2618交换机VLAN配置

交换机A和交换机B通过端口16相连,交换机A的端口1与交换机B的端口2是VLAN2的成员,交换机A的端口2与交换机B的端口4是VLAN3的成员。
  1.15 配置步骤
  交换机A的具体配置如下:
  zte(cfg)#set vlan 2 add port 16 tag            //在VLAN 2中加入端口16,并打tag
  zte(cfg)#set vlan 2 add port 1 untag          //在VLAN 2中加入端口1,不打tag
  zte(cfg)#set vlan 3 add port 16 tag            //在VLAN 3中加入端口16,并打tag
  zte(cfg)#set vlan 3 add port 2 untag         //在VLAN 3中加入端口2,不打tag
  zte(cfg)#set port 1 pvid 2                   //设置端口1的PVID为2
  zte(cfg)#set port 2 pvid 3                   //设置端口2的PVID为3
  zte(cfg)#set vlan 2-3 enable               //使能VLAN 2和3
  交换机B的具体配置如下:
  zte(cfg)#set vlan 2 add port 16 tag         //在VLAN 2中加入端口16,并打tag
  zte(cfg)#set vlan 2 add port 2 untag         //在VLAN 2中加入端口2,不打tag
  zte(cfg)#set vlan 3 add port 16 tag         //在VLAN 3中加入端口16,并打tag
  zte(cfg)#set vlan 3 add port 4 untag          //在VLAN 3中加入端口4,不打tag
  zte(cfg)#set port 2 pvid 2                  //设置端口2的PVID为2
  zte(cfg)#set port 4 pvid 3                  //设置端口4的PVID为3
  zte(cfg)#set vlan 2-3 enable                  //使能VLAN 2和3
  1.16 验证方法
  PC-1和PC-3能互通
  PC-2和PC-4能能互通
  PC-1和PC-4不能互通,PC-2和PC-3不能互通
  1.17 实验结论
  同一vlan下的设备可以互通,不同vlan下的设备不能互通;通过端口打TAG可以传递多个vlan信息。

18241026776 发表于 2020-7-24 22:17:05

好文章,后面会需要用到,先顶一下,感谢分享!!!
页: [1]
查看完整版本: 2618交换机VLAN配置