Why does vlan exist
Vlan, what is it
How does vlan work
If we're gonna figure this out, we're gonna have to figure out the radio field

You must know what radio is
And what is the connection between radio and vlan
01, why vlan
On the basis of the above dialogue, we know that all users in the broadcasting field will listen to the radio packages。
It is assumed that there are many sectors in a company: technology, research and development, markets, etc。
However, computers in all sectors are more involved within the sector and less so across sectors. There is then a need to isolate the different sectors, i. E. To reduce the broadcasting domain。
We use three switches to represent the three sectors, forming a network of small numbers of computers。

Suppose at this point, a needs to communicate with b。
What would happen if different sectors were not isolated
1. A the "arp request information" must be broadcast first to attempt to obtain the mac address of b. In ethernet-based communications, the target mac address must be specified in the data frame for normal communications。

Upon receipt of the “arp request information” from a, the “arp request information” will be forwarded to all equipment connected to it except a (b and r & d switches)。

3. The r & d switch is broadcasted to c, d and the market exchange。

Exchanges at the ministry of markets are broadcast to e and f, and eventually “arp request information” is transmitted to all computers in the network。

Computers other than b will be discarded as soon as the information is received。

Only b responds by sending its mac address information to the technology exchange, which then sends it to a。

Note:
This was originally to get the mac address of computer b. As long as computer b gets it。

It's actually a data frame that's spread all over the network, and all computers have received arp requests for information..
As a result, the consequences are as bad as:
1. The overall bandwidth of the network is occupied。
2. Potential information security risks。
Use of cpu resources。
So vlan should be born
What's vlan?
Vlan (virtual local area network, virtual local area network) was developed on the basis of lan (local area network, local area network)。
Lan: is a computer network within a region that is interconnected by multiple computers to achieve data transmission and resource sharing. By geographical location, it is generally within a few thousand metres。
Vlan: refers to the logical division of the lan into a smaller lan, where vlan is isolated from the data chain layer, thus realizing the data exchange technology of the virtual working group。
So in the above example, we need to divide computers a and b into the same vlan。
As the following figure shows, computers a and b are divided into vlan1 and separated from the other computers, so computers a send only computers b can receive

In addition to this, the same is true for the cross switchboard split vlan。
Assuming that the technology exchange and the r & d exchange are located in two office buildings, vlan can be logically divided so that those located in the same sector in both buildings can form the same vlan。

All right, let's see, how did vlan do it
How does this happen? [vlan based on port classification]
Vlan is classified on the basis of port classification, i. E. The port of the ethernet switch。

The port corresponds to vlan as follows:
Gei-1/1/0/1
Vlan 10
Get-1/1/0/3
Gei-1/1/0/2
Vlan 20
Gei-1/1/0/4
So, a computer connected to a vlan can communicate with each other。
Give me a chestnut:
Computers 192. 168. 0. 1 and 192. 16. 8. 3 communicate with each other。
Computers 192. 168. 0. 1 and 192. 168. 0. 2 cannot communicate。
This is the port-based vlan, the most common vlan realization method。
The characteristics of the port-based vlan-based method are as follows:
Strengths
Defines the vlan operation so simple that you can specify the port。
Disadvantages
If vlan 10 users leave their original port and reach a new switch port, they need to be redefined。
Vlan based on mac address
The switch determines in which vlan the message should be forwarded according to the mac address of the message, so the switch needs to know the map relationship between mac and vlan。

Mac addresses correspond to vlan as follows:
00-00-00-00-00-01
Vlan 10
00-00-00-00-00-03
00-00-00-00-00-02
Vlan 20
00-00-00-00-00-04
It is difficult to configure vlan based on mac addresses and to record all mac addresses. However, this division remains unchanged when the user port changes。
The following are the characteristics of the method for dividing vlan based on mac addresses:
Strengths
Reconfiguration is not required when a computer-connected switch is changed。
Disadvantages
Vlan based on network layer
Vlan is divided on the basis of a network layer, i. E. A network layer or protocol address for each computer (if multiple protocols are supported)。

Network protocols and vlan correspond as follows:
192. 168. 0. 1
Icmp protocol
Vlan 10
192. 168. 0. 3
192. 168. 0. 2
Ip protocol
Vlan 20
192. 168. 0. 4
Icmp protocol: internet coNtrol message protocol, internet controls the message protocol。
Vlan based on network layering has the following features:
Strengths
The physical position change does not require the reconfiguration of vlan, which is divided according to the type of protocol。
Disadvantages
Inefficiency requires time to check each network layer。
Vlan




