WHAT IS VLAN?
The method of grouping ports on a network switch so that each group is disconnected from each other is called VLAN. By grouping ports, a network switch behaves as if there are multiple network switches on it. As the network grows and traffic increases, VLANs are needed more and more. VLAN reduces traffic by limiting multicasting (broadcast), which means that devices on different VLANs cannot send and receive data to and from each other. This is why devices in different VLAN groups can have the same IP. Since they do not communicate with each other, they do not affect their operation. A port can be in two different VLANs. Thus it receives traffic from both VLANs. But it distributes the data from one VLAN only to the VLAN group from which it received the data. The other VLAN group cannot receive that data even though it is in it.
WHAT IS TRUNKING (LINK MERGING)?
If there is more than one network switch in a network and these switches are required to connect to each other, a line called VLAN trunk should be created on the line that provides the connection from the switch to the switch. The network switch that wants to send data over the VLAN trunk transmits the data to the other network switch by tagging the data. The network switch receiving the tagged frame knows which VLAN the data belongs to by looking at the tag. Trunking allows VLANs to have members on more than one line. If the data is not tagged, it will not know which VLAN group the data belongs to and will not forward the data.