## 3 The Virtual LAN Segmentation in Static and Dynamic Networks
Tagged VLANs can also be implemented directly on network cards (Linux, for example, supports the standard by default). The frame structure follows the IEEE 802.1Q standard [27], which is the most used (other solutions also exist, as the Cisco Inter-Switch Link Protocol (ISL) [28], able to encapsulate the full data frame to enable multiple VLANs). The advantage of a tagged VLAN compared to a port-assigned VLAN, is the connection between different switches. For port-based VLANs, at least two cables must be placed between the switches, as each Virtual LAN needs its own connection. On the other hand, for trunking in tagged VLANs, only one cable is required, as data is distributed through the information of the frame. The switch recognizes the exact VLAN and forwards it to the destination switch, where the tag is dropped and the frame is forwarded to the correct destination node. Mainly, there are two protocols for managing VLANs:  
1. Tagged VLANs protocol: IEEE802.1Q is the standard reference for VLANs [29], in particular for the tagged ones. It is a Layer-2 encapsulation protocol, which allows for logical separation of different traffic flows, as if they follow distinct physical paths. The IEEE802.1Q does not encapsulate the original frame, but adds 4 bytes to the header (Figure 3). The first 2 bytes regard the TPID protocol identifier tag (it is set to 0 \(\times\) 8100, which indicates that the frame is in IEEE 802.1Q format). The next 2 bytes regard the Tag for Control Information TCI (also called VLAN Tag). The TCI is divided as follows: 3 bits for the Priority Code Point (PCP), used to indicate a priority level for the frame, 1 bit for the Drop Eligible Indicator (DEI), indicating the ability to skip the frame in case of congestion, 12 bits for the VLAN ID (VID), indicating the ID of the VLANs (up to 4096, but only 4094 are really available, because the IDs 0 and 4095 are reserved). The rest of the Ethernet frame remains as the original. Obviously, since the header is changed (hence the frame is changed), the 802.1Q encapsulation mechanism requires the recalculation of the FCS field in the Ethernet trailer. 2 Trunked VLANs protocol: The VLAN Trunking Protocol (VTP) [30,31] is a Cisco proprietary Layer-2 protocol, which allows management of VLAN information, making it available to all switches on the network. The protocol requires the existence of a VTP server: when a VLAN is created or modified, the information is distributed to all the switches of the VTP domain, starting from the server, using the VTP announcements. The VTP advertising operation consists of invitation update messages on the management VLAN (default VLAN1). This is the reason why all trunk connections between switches must be configured to allow traffic to VLAN1. To find out which is the most recent configuration, the VTP information is presented with a revision number, the VTP Configuration Revision Number (CRN), increased by one with each modification of the VLANs. There are, basically, three types of message:Summary announcements: the switches send them every 5 min or as soon as there is a change in the VLAN database; these messages contain the VTP domain name and the VTP CRN. If a VLAN is added, deleted, or modified, the server increments the revision number and sends a summary update. If a switch receives an update containing a different VTP domain name than its own, the VTP information is simply ignored. If the name matches, then the revision number is checked--if this is higher than the one in possession, an advertisement request is sent; * Advertising requests: VTP clients use these messages to request information about VLANs. The update requests immediately after a switch reboot, a change of the VTP domain name, or new revision numbers; * Sub-advertisements: as soon as a server, following changes on the VLANs, increases the revision number and sends an update summary, it follows up some \"subset\" messages containing information on the individual VLANs.