background image
Configuring VLANs
621
Now that we can see the three VLANs created, we can assign switch ports
to a single VLAN. Each port can only be part of one VLAN. Trunking, which
I will cover in a minute, makes a port available to more than one VLAN
at a time.
Assigning Switch Ports to VLANs
You can configure each port to be in a VLAN by using the vlan-membership
command. You can only configure VLANs one port at a time. There is no com-
mand to assign more than one port to a VLAN at a time with the 1900 switch.
Remember that you can configure either static memberships or dynamic
memberships on a port. In this book, I only cover the static VLAN mem-
berships.
In the following example, I configure interface 2 to VLAN 2, interface 4
to VLAN 3, and interface 5 to VLAN 4.
1900EN#config t
Enter configuration commands, one per line. End with CNTL/Z
1900EN(config)#int e0/2
1900EN(config-if)#vlan-membership ?
dynamic Set VLAN membership type as dynamic
static Set VLAN membership type as static
1900EN(config-if)#vlan-membership static ?
<1-1005> ISL VLAN index
1900EN(config-if)#vlan-membership static 2
1900EN(config-if)#int e0/4
1900EN(config-if)#vlan-membership static 3
1900EN(config-if)#int e0/5
1900EN(config-if)#vlan-membership static 4
1900EN(config-if)#exit
1900EN(config)#exit
Now, type show vlan again to see the ports assigned to each VLAN.
1900EN#sh vlan
VLAN Name Status Ports
--------------------------------------
1 default Enabled 1, 3, 6-12, AUI, A, B
2 sales Enabled 2
Copyright ©2002 SYBEX, Inc., Alameda, CA
www.sybex.com