What is VLAN
Author: Badcoffee
Email: blog.oliver@gmail.com
BLOG:
http://blog.9cbs.net/yayong
April 2005
VLAN (Virtual Local Area Network), also known as the virtual local area network, refers to the logical network constructed by network management software on the basis of the switching LAN. A VLAN forms a logical subsidiary, which can overwrite multiple network devices, allowing network users in different geographic locations to join a logical subnet.
Related standards
IEEE 802.1Q
802.1Q protocol, the Virtual Bridged Local Area Networks protocol, mainly specified VLAN implementation. Each host supports the 802.1Q protocol, when sending a packet, the source address in the original Ethernet is added after the source address of the Ethernet, and then the length or type field of the original Ethernet. :
---------- ----------- ---------- -------- --------------------------------------------- | | | | | || destination address | source address | 802.1Q tag head | Type / length | Data | Calibration || | | | | 6 Bytes | 6 bytes | 4 bytes | 2 bytes | 46-1500 Bytes | 4 bytes | ------------ ------------- ----------- - -------------------------------------------------
According to the figure above, the maximum length of IEEE 802.1Q is 1522 bytes, and the minimum length is 68 bytes.
Among them, the 802.1Q tag head format is as follows:
------------ ---------------- | | | || TPID | Priority | CFI | VID || | | | || 16 Bit | 3 Bit | 1 Bit | 12 Bit | -------------- --- ----- ---- ------------
Here is a description of the 802.1Q tag head format:
TPID-Tag Protocol Identifier
TPID accounted for 16bit. It is set to value 0x8100 to indicate that this is an IEEE 802.1Q label.
Priority
Priority accounted for 3Bit, the priority of IEEE 802.1p is used, mainly for a maximum of flow rate. The priority of IEEE 802.1p has a total of 8 (0-7).
CFI- Canonical Format Indicator
CFI only 1 bit, when its value is 1, indicating that the MAC address is a non-standard format, and if it is 0, the MAC address is a standard format.
VID- VLAN IDENTIFIER
VID accounts for 12bit, which is a VLAN ID because it is 12-bit binary to represent, which means that there may be a total of 4096 (0-4095 between 0-4095), and the packets sent by the host support 802.1Q protocol will contain This domain is to indicate which VLAN you belong to. In fact, since VID 0 and 4095 are retained by 802.1q protrion, the maximum number of VLANs is 4094 (1-4094).
So how does the switch support VLAN?
Below is a description of a two-layer switch work process:
Receive Module: A switch of a switch comes in a VLAN to enter an Ethernet message. The switch sees that the message does not have an 802.1Q tag head, if not, it will be added to the data packet according to the VLAN group to which the port belongs. A tag of the VLAN and then handed over to the query routing module.
Query Routing: The switch will receive a packet to query routing modules. This module will query the database, and route according to the destination address of the message and the VLAN of the message.
Forwarding Module: After the forwarding module receives the message, if this is a message containing the VLAN tag head, it is handled by the port connected to whether the 802.1Q tag is supported. If you don't support it, you will then remove the VLAN tag head added to the receiving module; if you support it, you will not delete the label head.
2. IEEE 802.1p
The 802.1p protocol defines a series of other protocols, please refer to the protocol documentation.
The 802.1p protocol also defines the priority. For those packets with high real-time requirements, the packet can be indicated in the 3-bit priority of 802.1Q head, so that the exchange opportunity considers priority to forward .
Basic strategy of dividing VLAN
Port-based VLAN division
2. VLAN division based on MAC address
3. Network-based VLAN division
4. VLAN division based on IP multicast
Use VLAN advantages
1, control broadcast storm - isolation broadcast
2, improve network overall security - arbitrary group function
3, network management simple, intuitive - can across physical network segments
Basic connection types supporting the VLAN switch
2 basic connection types:
1.access Links:
It refers to only one VLAN, and only forwards the port of the data frame, also called the Native VLAN. Access-Link device cannot communicate with VLAN unless the packet is routed.
2.Trunk Links:
Trunk is also called aggregation, is a packaging technology, which is a point-to-point link, and both ends of the link can be a switch, a router, or even a host. It is simultaneously transmitted through two or more port parallel to provide higher bandwidth, greater throughput, and greatly provide the entire network capability.
The Trunk Link of the VLAN refers to ports that enable forward communication of multiple different VLANs. Trunk Link makes your individual ports simultaneously a port of several VLANs, so that the layer 3 is required. When you use Trunk Link between the switches, the information of multiple VLANs will pass from this connection.