Lab objectives:
Understand the basic principles of Virtual LAN (vlan;
Measure the test taker's knowledge about how to configure a vswitch to divide VLANs by port;
Measure the test taker's knowledge about Tag VLAN configuration.
Technical Principles:
1. Vlan refers to logical division within a non-physical network segment. A VLAN is divided into several virtual local networks. The biggest feature of a VLAN is that it is not restricted by physical locations and can be flexibly divided. A VLAN has all the features of a physical network segment. hosts in the same VLAN can communicate with each other directly, and mutual access between hosts in different VLANs must be forwarded through the router device, broadcast packets can only be broadcast in this VLAN and cannot be transmitted to other VLANs.
2. Port VLAN is one of the ways to implement VLAN. It uses the ports of the switch for VLAN division. A Port can only belong to one VLAN.
3. The Tag VLAN is a type outside the wide port of the switch. It is mainly used for direct access between hosts in the same VLAN of the switch. Colleagues isolate hosts in different VLANs. The Tag VLAN complies with the IEEE 802.1Q protocol. When using the port configured with the Tag vlan for data transmission, you need to add four bytes of 802.1Q Tag Information in the data frame, use rain to identify the VLAN to which the data frame belongs, so that the Peer switch can accurately filter data frames after receiving them.
Tutorial steps:
The topology is as follows:
1. Configure the IP addresses of PC1, PC2, PC3, and PC4 on your computer)
2. Create vlan 2 and vlan 3 on S1 and S2 switches;
3. Divide ports Fa0/1 and Fa0/2 of S1 and S2 into vlan 2 and vlan 3, and add Fa0/24 to the TRUNK mode.
S1 switch Configuration:
S2 switch Configuration:
4. Test the connectivity between PC1 and PC3, PC2 and PC4.
PC1 and PC3:
PC2 and PC4:
PING PC1, PC2, PC3, and PC4 cannot communicate with each other. To achieve mutual communication, a layer-3 switch or router device is required. In chapter 4, we will talk about it.