Use trunk to connect to multiple switch VLANs (VLAN + trunk)

Source: Internet
Author: User

Note: The router is used for simulation.
PC Host

Step 1: Configure PC Of IP Address.
Step 2: PC1 Upper Ping All other hosts are accessible.
Step 3: Set Switch1 And Switch2 Of Fa0/12 The direct connection interface

SW1 (config) # inte fa0/12
SW1 (config-If )#Switchport trunk encapsulation dot1q
SW1 (config-If )#Switchport mode trunk
SW1 (config-If) # exit

Sw2 (config) # inte fa0/12
Sw2 (config-If) # switchport trunk encapsulation dot1q
Sw2 (config-If) # switchport mode trunk
Sw2 (config-If) # exit

Step 4: UseShow interface trunkOrShow interface fa0/12 switchportCommand to view and confirm

SW1 # Show interfaces trunk

Port mode encapsulation status Native VLAN
Fa0/12 on 802.1Q Trunking 1

Port VLANs allowed on trunk
Fa0/12 none

Port VLANs allowed and active in management domain
Fa0/12 none

Port VLANs in Spanning Tree forwarding state and not pruned
Fa0/12 none


Sw2 # Show interfaces fastethernet0/12 switchport

Name: fa0/12
Switchport: Enabled
Administrative Mode: Trunk
Operational Mode: Trunk
Administrative trunking encapsulation: dot1q
Negotiation of trunking: On
Access Mode VLAN: 1 (default)
Trunking native mode VLAN: 1 (default)
Trunking VLANs enabled: All
Pruning VLANs enabled: 2-1001

Protected: false

Voice VLAN: none (inactive)
Appliance trust: None

Step 3:Switch1AndSwitch2Create onVLAN 10AndVLAN 20And add the port to the correspondingVLAN
Step 4: UsePingConfirm

PC1 PC2 Pc5 PC6Mutual supportPingConnect

Mutually unavailablePingConnect



PC3 pc4 pc7 pc8Mutual supportPingConnect


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.