Steps
Create Vlan2 Vlan3
Add Port 0/0/1 to VLAN2
Port 0/0/2 Join VLAN2
Add Port 0/0/3 to VLAN3
Port 0/0/4 Join VLAN3
[Sw1]vlan Batch 2 3
[Sw1]interface E0/0/1
[Sw1-ethernet0/0/1]port link-type Access
[Sw1-ethernet0/0/1]port Default VLAN 2
[Sw1-ethernet0/0/2]port lin1k-type Access
[Sw1-ethernet0/0/2]port Default VLAN 2
[Sw1-ethernet0/0/3]port link-type Access
[Sw1-ethernet0/0/3]port default VLAN 3
[Sw1-ethernet0/0/4]port link-type Access
[Sw1-ethernet0/0/4]port Default VLAN 4
Experimental results:
PC 1 can ping pc 2
PC 2 can also ping pc 1
PC 3 can ping pc 4
PC 4 can ping pc 3
The experimental results realized that the VLAN could not be ping through
The same VLAN can ping through
Complete the isolation of the company's network of different departments
There is also a way to add ports to the VLAN in bulk
First to create Group 1
Add 0/0/1 0/0/2 to group 1
and a VLAN 2 for group 1.
Add 0/0/3 0/0/4 to Group 2
and give Grop 2 a VLAN 3.
Here's how:
[Sw1]vlan Batch 2 3
[Sw1]port-group 1
[Sw1-group-1]group-member E0/0/1 E0/0/2
[SW1-ETHERNET0/0/1] Port Link-type Access
[SW1-ETHERNET0/0/2] Port Link-type Access
[Sw1-ethernet0/0/1]port Default VLAN 2
[Sw1-ethernet0/0/2]port Default VLAN 2
[Sw1]port-group 2
[Sw1-group-2]group-member E0/0/3 E0/0/4
[Sw1-ethernet0/0/3]port default VLAN 3
[Sw1-ethernet0/0/4]port default VLAN 3
Ok
The results are the same as the experiments above.
Experimental results:
PC 1 can ping pc 2
PC 2 can also ping pc 1
PC 3 can ping pc 4
PC 4 can ping pc 3
The experimental results realized that the VLAN could not be ping through
The same VLAN can ping through
Complete the isolation of the company's network of different departments
VLAN acess Port Settings