Command Line Interface Reference Guide HP BladeSystem PC Blade Switch
HP PC Blade Switch CLI Reference Guide www.hp.com 28-7
VLAN Commands
switchport access vlan
The switchport access vlan Interface Configuration mode command configures the VLAN ID
when the interface is in access mode. To return to the default configuration, use the no
form of
this command.
Syntax
switchport access vlan {vlan-id | dynamic}
no switchport access vlan
Parameters
n vlan-id — Specifies the ID of the VLAN to which the port is configured.
n dynamic —Indicates that the port is assigned to a VLAN based on the source MAC address
of the host connected to the port.
Default Setting
Odd ports 1-41, 42, 45, and 46 are all in VLAN 1. The remaining ports are in VLAN 2.
Command Mode
Interface configuration (Ethernet, port-channel) mode
Command Usage
The command automatically removes the port from the previous VLAN and adds it to the new
VLAN.
.
When MSTP-to-RSTP is enabled (enabled by default) attempting to put any switch port into
trunk or general mode will cause the following error message: Port <Number>, extension
separated-bridge exist. This feature must be disabled before the switch can support these
modes. Please see spanning-tree mst mstp-rstp for more information.
Example
The following
command
configures Ethernet port e42 in access mode to be member of
VLAN 23.
Console(config)# interface ethernet e42
Console(config-if)# switchport access vlan 23










