您的位置:首页 > 其它

2618交换机VLAN配置

2013-09-27 20:12 204 查看
交换机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信息。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: