VLAN and Trunk Experiment

Source: Internet
Author: User

VLAN and Trunk experiment

A basic VLAN test

Experimental topology:

Experimental purpose: Mastering the basic VLAN Configuration

Mastering static interface VLAN Partitioning

Lab requirements: Create two VLANs,vlan2 and vlan3, on switch switch, withVLAN names for HR, ENG

The host PC1andPC2 are divided into two VLANs respectively.

Experimental steps:

Step one: Create VLAN2 and VLAN3

Switch#conf T

Switch (config) #vlan 2

Switch (Config-vlan) #name HR

Switch (Config-vlan) #exit

Switch (config) #vlan 3

Switch (Config-vlan) #name ENG

Step two: The two interfaces connected to two PCs are divided into two VLANs respectively

Switch (config) #int FA0/1

Switch (config-if) #switchport mode access

Setting the interface mode to the Access interface

Switch (config-if) #switchport Access VLAN 2

To delimit an interface into a specified VLAN

Switch (config-if) #exit

Switch (config) #int FA0/2

Switch (config-if) #switchport mode access

Switch (config-if) #switchport Access VLAN 3

Switch (config-if) #end

Step three: Use the show VLAN command to view the experimental results and use the ping command on PC1 and PC2 to view connectivity.

Two Vlan Trunk experiment

Experimental topology:

Experimental purpose: Mastering the basic configuration of trunk

Experimental requirements: Create VLAN2 on the switch SW1 and SW2 and set the link between the two switches as trunk links, enabling VLAN data to span the switch

Experimental steps:

Step one: Create the VLAN2 on the switch SW1, SW2, and place it in the corresponding VLAN with the interface connected to the host

Sw1#conf T

SW1 (config) #vlan 2

SW1 (Config-vlan) #name HR

SW1 (Config-vlan) #exit

SW1 (config) #int FA0/1

SW1 (config-if) #switchport mode access

SW1 (config-if) #switchport Access VLAN 2

Sw2#conf T

SW2 (config) #vlan 2

SW2 (Config-vlan) #name HR

SW2 (Config-vlan) #exit

SW2 (config) #int FA0/2

SW2 (config-if) #switchport mode access

SW2 (config-if) #switchport Access VLAN 2

Step Two: Configure the link between the two switches as a trunk link

SW1 (config) #int fa0/20

SW1 (config-if) #switchport trunk Encapsulation dot1q

If the switch supports multiple trunk encapsulation, you must first specify the encapsulation that is used. such as the 3550 switch. If only one encapsulation is supported, there is no such command, such as 2950.

SW1 (config-if) #switchport mode trunk

SW2 (config) #int fa0/20

SW2 (config-if) #switchport trunk Encapsulation dot1q

SW2 (config-if) #switchport mode trunk

Common View Commands:

Show VLAN

View all VLAN information in the current switch

Show Interfaces Trunk

View all trunk interfaces in the current switch

Show Interfaces Switchport

View Exchange-related information for all interfaces

VLAN and Trunk Experiment

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.