Configuring a Port-Based VLAN

Configuring a Port-Based VLAN

Configuration prerequisites

Create a VLAN before configuring a port-based VLAN.

Configuration procedure

Follow these steps to configure a port-based VLAN:

 

 

To do…

 

Use the command…

 

Remarks

 

 

 

Enter system view

 

system-view

 

 

 

 

 

 

 

 

 

 

 

 

Enter VLAN view

 

vlan vlan-id

 

 

 

 

 

 

 

 

 

 

 

 

Add Ethernet ports to the specific

 

 

 

Required

 

 

 

 

port interface-list

 

By default, all the ports belong

 

 

 

VLAN

 

 

 

 

 

 

 

 

to the default VLAN (VLAN 1).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The commands above are effective for access ports only. If you want to add trunk ports or hybrid ports to a VLAN, you need to use the port trunk permit vlan command or the port hybrid vlan command in Ethernet port view. For the configuration procedure, refer to the section of configuring Ethernet ports in the "Port Basic Configuration" part of the manual.

Protocol-Based VLAN Configuration Example

Network requirements

z

z

z

As shown in Figure 2-1, Switch A and Switch B each connect to a server and a workstation (PC). For data security concerns, the two servers are assigned to VLAN 101 with the descriptive string being “DMZ”, and the PCs are assigned to VLAN 201.

The devices within each VLAN can communicate with each other but that in different VLANs cannot communicate with each other directly.

Figure 2-1Network diagram for VLAN configuration

VLAN 101

 

 

VLAN 201

 

 

 

 

 

 

Switch A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

GEth1/0/1

 

GEth1/0/2

 

 

 

Server

 

GEth1/0/3

 

PC

 

 

 

 

 

 

 

 

GEth1/0/10

 

 

 

 

 

 

 

 

 

 

 

GEth1/0/11

 

GEth1/0/12

 

 

 

Server

Switch B

 

PC

 

 

 

 

 

 

 

 

2-3

Page 72
Image 72
3Com WX3000 operation manual Configuring a Port-Based Vlan, Protocol-Based Vlan Configuration Example, Port interface-list