00:01:07: %SYS-5-CONFIG_I: Configured from console by consolSwitch#show vlan briefVLAN Name Status Ports—— ———————————————— ————- ———————————————-1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/10, Fa0/11, Fa0/12Fa0/13, Fa0/14, Fa0/15, Fa0/16Fa0/17, Fa0/18, Fa0/19, Fa0/20Fa0/21, Fa0/22, Gi0/1, Gi0/210 VLAN0010 active20 VLAN0020 active1002 fddi-default act/unsup1003 token-ring-default act/unsup1004 fddinet-default act/unsup1005 trnet-default act/unsup
The next step is to assign ports to a VLAN.
Assigning Ports to a VLAN
After you have created the VLANs you plan to use, you need to manually assign them to a
port and place the port in access mode. To do this, use the switchport access and
switchport mode commands, as seen in Table 9-3.
Table 9-3 Port Assignment Commands
Key TopicCommand Action
switchport mode access Defines the VLAN membership mode for the port
switchport access vlan vlan-id Assigns the port to a VLAN
The steps to assign a port to a VLAN are as follows:
Step 1. Access global configuration mode using the configure terminal command.
Step 2. Access the interface using the interface command.
Step 3. Set the membership mode to access using the switchport mode access com-
mand.
Step 4. Assign a VLAN to the port using the switchport access vlan vlan-id com-
Step 5. Exit to privileged EXEC mode using the end command.
Step 6. You can verify your work using the show interface status and show interface
interface switchoprt commands.
In Figure 9-11, no ports will be made access ports, but if you needed to do this, your con-
figuration would resemble Example 9-2. Notice that you can use the show interface sta-
tus command to verify the VLAN assignment.
Example 9-2 Assigning a Port to a VLAN
Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#int f0/5Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 10Switch(config-if)#Switch#show interface status
Bạn đang xem 00: - CCNA WIRELESS OFFICIAL EXAM CERTIFICATION GUIDE PART 19 POTX