Experimental environment configuration
1. 1 DCS-3926S switch
2, 2 PCs
3, 1 console cable
4, 2 straight-through network cables
equipment | IP address |
---|---|
switch | 192.168.1.11 |
PC1 | 192.168.1.101 |
PC2 | 192.168.1.102 |
Experimental procedure
-
Create a new topology
Reminder: use one switch and two PCs, use PC1 as the console terminal, and use the console port configuration method; use two network cables to connect PC1 and PC2 to the switch ports respectively.
2. First reset the switch to factory settings
//擦除启动配置文件
switch#erase startup-config
//擦除确认
[confirm]Y
//重启
switch#reload
//重启确认
Proceed with reload? [confirm]Y
Result presentation:
3. Create vlan100 and vlan200, add ports 1-8 to vlan100, and add ports 9-16 to vlan200.
//进入全局配置模式
switch#conf t
//创建vlan 100
switch(config)#vlan 100
//退回到全局配置模式
switch(config-vlan)#exit
//创建vlan 200
switch(config)#vlan 200
//退回到全局配置模式
switch(config-vlan)#exit
//给vlan分配端口
switch(config)#int range f0/1-8
switch(config-if-range)#switchport access vlan 100
switch(config-if-range)#exit
//vlan200 分配方式同上
Result presentation:
verify
PC1 port location | PC2 port location | operate | expected results |
---|---|---|---|
1-8 | PC1 ping 192.168.1.11 | No way | |
9-16 | PC1 ping 192.168.1.11 | No way | |
17-24 | PC1 ping 192.168.1.11 | Pass | |
1-8 | PC1 ping PC2 | Pass | |
9-16 | PC1 ping PC2 | No way | |
17-24 | PC1 ping PC2 | No way |
Reminder: Only show 3 and 4 rows of results