Preface:
This article covers the following content: Inside the switch, the meaning of VLAN and the frame format; what are the meanings of the three modes of port access trunk hybrid? What is the difference between vswitch cascade and stack? How to configure a vswitch?
Www.2cto.com
Vswitch
Let's take a look at the physical diagram of a vswitch:
Next, the purpose of this example is only to describe the port input and output:
Www.2cto.com
P = Port; 1-48 represents 1-48 ports.
Vlan meaning and frame format
VLAN-Virtual LAN
Definition of VLAN (Virtual Local Area Network) on Wiki:
In computer networking, a single layer-2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them via one or more routers; such a domain is referred to as a Virtual Local Area Network, Virtual LAN or VLAN.
VLAN is used to divide independent broadcast domains at the link layer of the OSI model to isolate networks. It is used to ensure network security and flexibly build virtual working groups.
VLAN is defined in rfc ieee 802.1Q. Cisco proprietary protocol ISL is also defined, but not the same as the former.
Link layer frame format with VLAN
IEEE 802.1Q adds a 4-byte VLAN label to the DA-Type of the original Ethernet protocol.
Glossary:
SA, source MAC address;
DA, target MAC address;
TPID (Tag Protocol Identifier) indicates that this is a frame with the 802.1Q label added. TPID contains a fixed value of 0x8100;
TCI (Tag Control Information) contains three fields used to indicate VLAN Information;
CFI (Canonical Format Indicator). If the CFI value is 0, it indicates the standard Format. 1 indicates the non-standard Format. It is used to indicate the bit order information of the addresses contained in the encapsulated frames in the entry-level ring/source route FDDI media access method;
PCP (Priority Code Point), used as a reference for IEEE 802.1p Priority, from 0 (minimum) to 7 (highest), for data streams (sound, image, archives, etc) the transmission priority;
VID (vlan id). A total of 4096 vids indicate which VLAN the data frame belongs;
Note: whether the data frame contains this VLAN label is the tagged/untagged mentioned later.
Native VLAN
By default, all interfaces on the vswitch are under VLAN1 (Native VLAN;
The difference between 802.1Q and ISL is whether Native VLAN is tagged. All ISL are tagged, and all VLANs except VLAN 1 are tagged by IEEE 802.1Q protocol. The functions are the same, so TRUNK can recognize different VLANs.
Access trunk hybrid three working modes
When configuring a vswitch, you can configure the three working modes for no port. The difference between these modes is how to treat data frames with VLAN tags (tagged frame ).
Through different tagged frame processing, the network of switches in different modes can be achieved.
Each port of a vswitch has two important attributes:
1. There is a pvid (Port vlan id) that identifies the VLAN to which the Port belongs.
2. There is a list of permitted VIDS (which is not available in access mode) to determine whether the tagged frames are permitted to pass this interface.
The following are the differences between the three modes in tagged/untagged frame processing:
For the frame transmission direction in the figure, refer to the top switch.
Source http://blog.csdn.net/pirateleo/article/details/8615854