show vlan
vlan-id
Assigning Interfaces to a VLAN
You can only assign interfaces in Layer 2 mode to a VLAN using the
tagged
and
untagged
commands.
To place an interface in Layer 2 mode, use the
switchport
command. A port can be an untagged
member of a single VLAN or a tagged member of multiple VLANs. When you place an interface in Layer 2
mode using the
switchport
command, the interface is automatically configured as untagged and
placed in the default VLAN.
• Tagged ports append an 802.1Q tag to frames on egress and accept only tagged frames on ingress
(untagged frames are dropped). You must connect tagged ports to VLAN-aware devices.
• Untagged ports do not append an 802.1Q VLAN tag to frames on egress and do not accept tagged
frames on ingress (tagged frames are dropped). You must connect untagged ports to VLAN-unaware
devices. To remove an untagged from the default VLAN, remove the switchport configuration.
To assign an interface to a VLAN:
1.
Enter INTERFACE VLAN mode of the VLAN to which you want to assign the interface.
CONFIGURATION mode
interface vlan
vlan-id
2.
Assign a switchport interface to a VLAN as a tagged or untagged member.
VLAN INTERFACE mode
[tagged | untagged]
slot
/
port
3.
Display all switchport interfaces and the VLANs to which they belong.
EXEC Privilege mode
show vlan
To view only the interfaces that are in Layer 2 mode, enter the
show interfaces switchport
command in EXEC Privilege mode or EXEC mode.
To move a port interface to another VLAN, add it to the desired VLAN as either a tagged or untagged
member.
Assigning an IP Address to a VLAN
Because VLANs are a Layer 2 feature, you must assign an IP address to a VLAN interface in order for
physical interfaces on different VLANs to communicate and route traffic.
You cannot assign an IP address to the default VLAN, which, is
VLAN 1
.
The
shutdown
command in INTERFACE mode does not affect Layer 2 traffic on a VLAN interface.
• Configure an IP address and mask on a VLAN interface.
VLAN INTERFACE mode
ip address
ip-address mask
[
secondary
]
Connecting the Switch to the Network
After you complete the hardware installation and CLI-based software configuration for a C9010 switch,
you can connect to a network through the 10/100/1000Base-T RJ-45 management port. If you are using
48
Configuring the Software
REGULATORY
DRAFT
11-4-14