2011-12-06

VLAN Command List

VLAN Command List

To configure a simple VLAN, first create the VLAN, and then assign ports to that VLAN. The following table shows common VLAN configuration commands.

Task

Command(s)

Define a VLAN
Giving the VLAN a name is optional. VLAN names must be unique.

switch(config)#vlan <1-4094>

switch(config-vlan)#name WORD

Delete a VLAN
When you delete a VLAN, all ports assigned to the VLAN remain associated with the deleted VLAN, and are therefore inactive. You must reassign the ports to the appropriate VLAN.

switch(config)#no vlan <1-4094>

Assign ports to the VLAN
Note: If you assign a port to a VLAN that does not exist, the VLAN will be created automatically.

switch(config-if)#switchport access vlan <1-4094>

Show a list of VLANs on the system

switch#show vlan
switch#show vlan brief

Show information for a specific VLAN

switch#show vlan id <1-4064>

Example
The following commands create VLAN 12 named IS_VLAN, identifies port 0/12 as having only workstations attached to it, and assigns the port to VLAN 12.

switch#config t

switch(config)#vlan 12

switch(config-vlan)#name IS_VLAN

switch(config-vlan)#interface fast 0/12

switch(config-if)#switchport access vlan 12

Tidak ada komentar: