List 4 - VLAN co to je, k čemu to slouží nakreslit switch, která má několik oddělených sítí - lze udělat pomocí několika switchů a spojit několik takovýchto switců ve škole: učitelská síť, žákovská, pro studio, ...... The EtherType field is two octets long and it can be used for two different purposes. Values of 1500 and below mean that it is used to indicate the size of the payload in octets, while values of 1536 and above indicate that it is used as an EtherType, to indicate which protocol is encapsulated in the payload of the frame. When used as EtherType, the length of the frame is determined by the location of the interpacket gap and valid frame check sequence (FCS). 1500 dec je HEX 1536 dec 0600 vidíme, že nahoře je spousta 0 . Takže to pole len se dá použít i k něčemu jinému než k udání délky pokud neznamená délku, tak se konec frame pozná podle interframe gap https://en.wikipedia.org/wiki/IEEE_802.1Q Tag protocol identifier (TPID) A 16-bit field set to a value of 0x8100 in order to identify the frame as an IEEE 802.1Q-tagged frame. This field is located at the same position as the EtherType field in untagged frames, and is thus used to distinguish the frame from untagged frames. a máme k dispozici mnoho dalších čísel pro leccos jiného Tag control information (TCI) A 16-bit field containing the following sub-fields: Priority code point (PCP) A 3-bit field which refers to the IEEE 802.1p class of service (CoS) and maps to the frame priority level. Different PCP values can be used to prioritize different classes of traffic. Drop eligible indicator (DEI) A 1-bit field. (formerly CFI[c]) May be used separately or in conjunction with PCP to indicate frames eligible to be dropped in the presence of congestion. VLAN identifier (VID) A 12-bit field specifying the VLAN to which the frame belongs. The values of 0 and 4095 (0x000 and 0xFFF in hexadecimal) are reserved. All other values may be used as VLAN identifiers, allowing up to 4,094 VLANs. The reserved value 0x000 indicates that the frame does not carry a VLAN ID; in this case, the 802.1Q tag specifies only a priority (in PCP and DEI fields) and is referred to as a priority tag. On bridges, VID 0x001 (the default VLAN ID) is often reserved for a network management VLAN; this is vendor-specific. The VID value 0xFFF is reserved for implementation use; it must not be configured or transmitted. 0xFFF can be used to indicate a wildcard match in management operations or filtering database entries. na konci je 12 bitů VLAN ID - jaké je maximální číslo VLAN ? TAGGED frame UNTAGGED jak to dělá SWITCH a jak se to dělá na Linuxu - TAGGED frame mohou vycházet z jené síťové karty bonding na Linuxu ------------------------------------------------------ Double Tagged VLAN Rekapitulace: za MAC - SRC a DST následují 2Byte pokud čáslo v těchto dvou byte je menší nebo rovno 1500 , pak to číslo znamená délku rámce pokud číslo je 0x8100 , máme rámec VLAN s jedním TAGGEM pokud číslo je 0x88A8 , máme rámec double-tagged VLAN CETIN používá označení outer VLAN a inner VLAN https://en.wikipedia.org/wiki/IEEE_802.1Q https://info.support.huawei.com/info-finder/encyclopedia/en/QinQ.html 802.1Q-in-802.1Q (QinQ) tahle věc - double tagged VLAN, se také jmenuje: QinQ VLAN stacking double VLAN Na Linuxu https://serverfault.com/questions/506488/linux-how-can-i-configure-dot1addouble-tag-on-a-interface https://events.static.linuxfound.org/sites/events/files/slides/LinuxConJapan2015_makita_0_0.pdf # ip link add link eth0 name eth0.10 type vlan id 10 protocol 802.1ad # ip link add link eth0.10 name eth0.10.20 type vlan id 20 802.1ad vlan device can be used since kernel 3