在交换机上创建vlan并将端口划分到vlan中

来源:百度知道 编辑:UC知道 时间:2024/05/25 17:41:52
switch# configure terminal
switch(config)# vlan 10
switch(config-vlan)# name sales
switch(config-vlan)# exit
switch(config)# intrface /interface-id/
switch(config-if)# switchport access vlan /vlan-id/
请高手帮忙解释上面的每句指令是什么意思?

1、进入全局配置模式
2、创建VLAN 10 并进入VLAN-CONFIG 模式
3、将VLAN10 命名为 sales
4、退出VLAN-CONFIG 模式到全局配置模式
5、intrface interface-id 进入端口
6、在端口模式下,将此端口划分到某VLAN 中
5 和6之间应该还少一个步骤哦!! switchport mode access

把接口分别划分到不同的VLAN中。
在全局模式下使用指令的关键字:5interface interface
在接口模式下使用指令的关键字:6switchport mode access 将此端口设置为access模式
7switchport access vlan vlan-id

这样才对!!!!!!嘿嘿

switch# configure terminal //进入全局配置模式
switch(config)# vlan 10 //创建VLAN 10
switch(config-vlan)# name sales //命名为sales
switch(config-vlan)# exit //退出VLAN 配置模式
switch(config)# intrface /interface-id/ //开始配置某个端口
switch(config-if)# switchport access vlan /vlan-id/ //把某个端口划分到某个VLAN中

欢迎继续探讨,我也在学习中