Assigning a VLAN ID to an access interface
Prerequisites
At least one defined 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
. -
Disable routing with the command
no routing
. -
Configure the access interface and assign a VLAN ID with the command
vlan access
.
Examples
This example configures interface
1/1/2 as an access interface with VLAN ID set to
20.
switch# config
switch(config)# vlan 20
switch(config-vlan-20)# exit
switch(config)# interface 1/1/2
switch(config-lag-if)# no routing
switch(config-if)# vlan access 20
This example configures LAG
1 as an access interface with VLAN ID set to
30.
switch# config
switch(config)# vlan 30
switch(config-vlan-30)# exit
switch(config)# interface lag 1
switch(config-lag-if)# no shutdown
switch(config-lag-if)# no routing
switch(config-lag-if)# vlan access 30