模式 lin img images acc 实验 ces water type
一, 实验目的
在交换机内创建 VLAN,并将所需端口加入到各 VLAN 中.
1-3 端口:VLAN10;
4-6 端口:VLAN20;
7-9 端口:VLAN30.
二, 实验环境
软件
eNSP 1.2.00.500
虚拟设备:
PC:PC1 - PC3
S3700 交换机:SW1
三, 实验拓扑
四, 实验步骤
SW1:
sys #进入视图模式
[Huawei]sys SW1 #修改交换机名称为 SW1
[SW1]vl ba 10 20 30 #批量创建 VLAN10,VLAN20,VLAN30
[SW1]disp vl #查看 VLAN 是否创建成功
[SW1]port-group 1 #创建端口 1 组
[SW1-port-group-1]gr eth 0/0/1 to eth 0/0/3 #将 1 - 3 端口加入该组
[SW1-port-group-1]port link-t acc #将该组端口配置为 access 端口模式
[SW1-port-group-1]po de vl 10 #将该组端口加入 VLAN10
[SW1-port-group-1]quit #返回视图模式
[SW1]port-group 2 #创建端口 2 组
[SW1-port-group-2]gr eth 0/0/4 to eth 0/0/6 #将 4 - 6 端口加入该组
[SW1-port-group-2]port link-t acc #将该组端口配置为 access 端口模式
[SW1-port-group-2]po de vl 20 #将该组端口加入 VLAN20
[SW1-port-group-2]quit #返回视图模式
[SW1]port-group 3 #创建端口 3 组
[SW1-port-group-3]gr eth 0/0/7 to eth 0/0/9 #将 7 - 9 端口加入该组
[SW1-port-group-3]port link-t acc #将该组端口配置为 access 端口模式
[SW1-port-group-3]po de vl 30 #将该组端口加入 VLAN30
[SW1-port-group-3]quit #范湖视图模式
五, 结果验证
[SW1]disp vl #查看 VLAN 信息,确认端口配置
小型企业交换机批量配置 VLAN
来源: http://www.bubuko.com/infodetail-2465677.html