Switch Trunk Configuration

Source: Internet
Author: User

Lab requirements:

Hosts connected to two vswitches can access hosts with the same VLAN
 

 

 

 

 

 

 

Experiment Configuration:

Switch (SW1 ):

Switch>
Switch> enable
Switch # configure terminal
Switch (config) # host SW1
SW1 (config) # interface vlan 2 (create vlan2)
SW1 (config-vlan) # exit
SW1 (config) # int f0/2
SW1 (config-if) # switchport access vlan 2 (add Port f0/2 to vlan 2)
SW1 (config-if) # exit
SW1 (config) # int f0/10
SW1 (config-if) # switchport mode trunk (specify port f0/10 as the trunk port)
SW1 (config-if) # switchport trunk encapsulation dot1q (encapsulate port f0/10 as 802.1q. This command is optional. This command is required for some switches and is not applicable to some switches, for example, this command is not required for vswitches of the 2960 type)
SW1 (config-if) # exit
SW1 (config) # exit
SW1 #

 

Switch (SW2 ):

Switch>
Switch> enable
Switch # configure terminal
Switch (config) # host SW2
SW2 (config) # interface vlan 2 (create vlan2)
SW2 (config-vlan) # exit
SW2 (config) # int f0/2
SW2 (config-if) # switchport access vlan 2 (add Port f0/2 to vlan 2)
SW2 (config-if) # exit
SW2 (config) # int f0/10
SW2 (config-if) # switchport mode trunk (specify port f0/10 as the trunk port)
SW2 (config-if) # switchport trunk encapsulation dot1q (encapsulate port f0/10 as 802.1q. This command is optional. This command is required for some switches and is not applicable to some switches, for example, this command is not required for vswitches of the 2960 type)
SW2 (config-if) # exit
SW2 (config) # exit
SW2 #

 

Note: pc0 address 192.168.2.2/24, pc1 address 192.168.2.3/24

Test:

 

 

 

This article is from the blog "do not understand real people-blog"

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.