分配一个VLAN ID to an access interface
Prerequisites
至少有一个定义的VLAN。
Procedure
- Switch to configuration context with the command
config
. - Switch to the interface that you want to define as an access interface with the command
interface
. - Configure the access interface and assign a VLAN ID with the command
vlan的访问
.
Examples
On the 6400 Switch Series, interface identification differs.
This example configures interface1/1/2as an access interface with VLAN ID set to20.
switch#configswitch(config)#vlan 20switch(config-vlan-20)#exitswitch(config)#interface 1/1/2switch(config-if)#vlan的访问20
This example configures LAG1as an access interface with VLAN ID set to30.
switch#configswitch(config)#vlan 30switch(config-vlan-30)#exitswitch(config)#interface lag 1switch(config-lag-if)#no shutdownswitch(config-lag-if)#vlan的访问30