Assign Interfaces to a VLAN
A port may either be an untagged member of a single VLAN, or a tagged
member of perhaps multiple VLANs.
•
Untagged Ports — ports that do not append an 802.1Q VLAN tag to frames
on egress, and do not accept tagged frames on ingress (tagged frames are
dropped). Untagged ports must be connected to VLAN-unaware devices.
•
Tagged Ports — ports that append an 802.1Q tag to frames on egress, and
accept only tagged frames on ingress (untagged frames are dropped). Tagged
ports must be connected to VLAN-aware devices.
When you configure an enabled port as a switchport, the port is placed in the
default VLAN. To remove a switchport from the default VLAN, remove the
switchport configuration. To move the port to another VLAN, add it to the
desired VLAN as either a tagged or untagged member.
To view just the interfaces that are in Layer 2 mode, enter the show interfaces
switchport command in the EXEC mode.
Step Task
Assign a switchport to
1
a VLAN.
Display all
2
switchports and the
VLANs of which they
are members.
Assign an IP address to a VLAN
NOTE: An IP address cannot be assigned to the Default VLAN, which, by default,
is VLAN 1. To assign another VLAN ID to the Default VLAN, use the default
vlan-id vlan-id command.
Task
Configure an IP address and mask on
the interface.
Command Syntax
[tagged | untagged] interface
show vlan
Command Syntax
ip address ip-address
mask [secondary]
Installing the Software
Command Mode
INTERFACE VLAN
EXEC Privilege
Command Mode
INTERFACE
21