howtonetwork.net

Cisco Certification Training

  • Products
  • CCNA
    • CCNA Videos
    • CCNA Lectures
    • CCNA Practice Exams
    • Challenge Labs
      • Challenge Video Solutions
    • Cisco Commands
  • CCNP ROUTE
    • ROUTE Exams
  • CCNP SWITCH
    • SWITCH Exams
  • CCNP TSHOOT
  • Home
  • Join
  • Downloads
  • About Us
  • Whitepapers
  • Feature Articles
  • Helpdesk
  • FAQ
  • Free Training
You are here: Home / switchport access vlan

switchport access vlan

Command

Switchport Access Vlan

Use

Sets the VLAN that the interface belongs to.

Syntax

Switch(config-if)#switchport access vlan <vlan # >

Example

In this example, port fa0/2 on SW3 is set to VLAN 10. Here is the VLAN information on SW3 before the changes. Notice that all interfaces belong
to VLAN 1.

SW3#show vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/23
Fa0/24, Gi0/1, Gi0/2
10 VLAN0010 active
11 VLAN0011 active
12 VLAN0012 active
13 VLAN0013 active
14 VLAN0014 active
15 VLAN0015 active
16 VLAN0016 active
17 VLAN0017 active
18 VLAN0018 active
19 VLAN0019 active
20 VLAN0020 active
99 VLAN0099 active
555 VLAN0555 active
1002 fddi-default act/unsup

Next, int fa0/2 is configured for VLAN 10.

SW3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
SW3(config)#int fa0/2
SW3(config-if)#switchport access vlan 10

Finally, the VLAN information for SW3 is displayed with fa0/2 assigned to VLAN 10.

SW3(config-if)#do show vlan brief

VLAN Name Status Ports
—- ——————————– ——— ——————————-
1 default active Fa0/1, Fa0/3, Fa0/4, Fa0/5
Fa0/6, Fa0/7, Fa0/8, Fa0/9
Fa0/10, Fa0/11, Fa0/12, Fa0/13
Fa0/14, Fa0/15, Fa0/16, Fa0/17
Fa0/18, Fa0/19, Fa0/20, Fa0/23
Fa0/24, Gi0/1, Gi0/2
10 VLAN0010 active Fa0/2
11 VLAN0011 active
12 VLAN0012 active
13 VLAN0013 active
14 VLAN0014 active
15 VLAN0015 active
16 VLAN0016 active
17 VLAN0017 active
18 VLAN0018 active
19 VLAN0019 active
20 VLAN0020 active
99 VLAN0099 active
555 VLAN0555 active
1002 fddi-default act/unsup

Get access to over 5 hours of IT webinar videos as well as regular study tips and ideas when you
join our mailing list

About This Site

We replaced this site some time ago with an upgraded version. Please feel free to enjoy the content and if you like what you see check out our brilliant new site:

howtonetwork.com

Keep In Touch

About Us

This is a free access website which has now been replaced by howtonetwork.com.

Navigation

  • Home
  • Join
  • Downloads
  • About Us
  • Whitepapers
  • Feature Articles
  • Helpdesk
  • FAQ
  • Free Training

Copyright

All content is protected by international copyright laws. Copyright Reality Press Ltd.

Copyright © 2023 · Dynamik Website Builder on Genesis Framework · WordPress · Log in