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 |
switch(config)#vlan <1-4094> switch(config-vlan)#name WORD |
Delete a VLAN |
switch(config)#no vlan <1-4094> |
Assign ports to the VLAN |
switch(config-if)#switchport access vlan <1-4094> |
Show a list of VLANs on the system |
switch#show vlan |
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
Credit: Testout 640-802 CCNA Notes
ไม่มีความเห็น