# Decodificatore di tag 802.1Q e calcolatore delle VLAN sui trunk

> Decodifica un tag 802.1Q o l’inizio di un frame: TPID, PCP con il suo tipo di traffico, DEI e VID con i bit in evidenza, tag 802.1ad sovrapposti e l’EtherType che segue, con il nome dell’elenco IANA. Oppure incolla le righe trunk di entrambe le estremità, in sintassi Cisco IOS XE, Junos, AOS-CX, RouterOS, Switch Engine, Fabric Engine, Arista EOS o Huawei VRP, e scopri quali VLAN passano, quali scarta una delle due estremità e dove le VLAN native non coincidono.

- Tool: https://ronutz.com/it/tools/vlan-tag-and-trunk-calculator
- Family: Reti

---

## Cosa fa

Una VLAN (Virtual Local Area Network, rete locale virtuale) tiene i propri frame separati da quelli di ogni altra VLAN, e su un link che ne trasporta diverse ogni frame indica a quale VLAN appartiene con un tag IEEE 802.1Q di quattro ottetti. Questo strumento risponde, in due modalità, alle due domande che emergono più spesso quando un trunk non si comporta come previsto:

- **Tag 802.1Q.** Incolla in esadecimale gli ottetti di un tag, o dell’inizio di un frame (MAC di destinazione, MAC di origine, poi i tag). La pagina mostra TPID, PCP, DEI e VID di ogni tag con i suoi 32 bit disegnati ottetto per ottetto, il tipo di traffico del PCP e come viene decodificato con le quattro selezioni PCP, i tag impilati (Q-in-Q, 802.1ad) e ciò che segue (un EtherType, una lunghezza o nessuno dei due), con il nome tratto dall’elenco IANA.
- **VLAN sui trunk.** Incolla le righe della porta trunk delle due estremità di un link, ciascuna nella sintassi del proprio vendor: Cisco IOS XE, Juniper Junos, HPE Aruba AOS-CX, MikroTik RouterOS, Extreme Switch Engine, Extreme Fabric Engine, Arista EOS o Huawei VRP, gli otto vendor del corso sugli switch. La pagina mostra cosa trasporta ogni estremità, cosa invia con tag e senza tag e, VLAN per VLAN e in entrambe le direzioni, se un frame arriva nella stessa VLAN, finisce in un’altra, viene scartato o dipende da un comportamento che le pagine lette del vendor non indicano.

Tutto viene calcolato nel tuo browser.

## Il tag: cosa legge

Il formato del tag è nella clausola 9 di [IEEE P802.1ad/D2.4](https://www.ieee802.org/1/files/public/docs2004/802-1-ad-D2-4.pdf), la bozza pubblica IEEE 802.1 del 2004 che contiene il testo di 802.1Q con i relativi emendamenti. È una bozza non approvata, e l’edizione attuale, 802.1Q-2022, risulta «Active Standard» presso la [IEEE Standards Association](https://standards.ieee.org/ieee/802.1Q/10323/) ma non è pubblica; lo strumento legge la bozza per la struttura e per le tabelle che 802.1Q ha mantenuto e, accanto a essa, l’attuale [modulo YANG dei tipi](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-types.yang) dell’IEEE (revisione 2023-10-26).

- **TPID**, due ottetti: 0x8100 è il C-TAG, «An 802.1Q Customer VLAN, using the 81-00 EtherType», e 0x88A8 l’S-TAG, «An 802.1Q Service VLAN, using the 88-A8 EtherType originally introduced in 802.1ad, and incorporated into 802.1Q (2011)» (tipi YANG). Anche 0x9100 viene letto come tag, solo perché la [pagina di Juniper sul bridging](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html) afferma «Junos OS switches support the TPID value 0x9100 for Q-in-Q»; non è un tipo di tag 802.1Q, l’elenco IANA non lo nomina, e la pagina avverte che ne legge il TCI con la struttura 802.1Q basandosi solo su quanto dice quella pagina. Nessun altro valore viene letto come tag.
- **TCI**, due ottetti: il PCP nei primi tre bit, poi un bit, poi il VID a 12 bit (P802.1ad/D2.4, figura 9-1). Il PCP si trova nel primo ottetto, quindi ogni campo di due ottetti viene letto con il primo ottetto come quello di ordine più alto: è l’ordine big-endian, l’ordine dei byte di rete, che spiega l’articolo [Big-endian and little-endian: byte order explained](https://ronutz.com/it/learn/big-endian-and-little-endian).
- **PCP**, da 0 a 7. Con la selezione predefinita, 8P0D, il PCP *n* è la priorità *n*; una porta impostata su 7P1D, 6P2D o 5P3D legge alcuni valori come un’altra priorità o come idonei allo scarto (tabella 6-5), e la pagina mostra tutte e quattro le selezioni. Il tipo di traffico è quello che la tabella G-2 assegna alla priorità: 1 Background (BK), 0 Best Effort (BE), 2 Excellent Effort (EE), 3 Critical Applications (CA), 4 Video (VI), 5 Voce (VO), 6 Internetwork Control (IC), 7 Network Control (NC). Background si trova a 1 di proposito: «the value 1 effectively communicates a lower priority than 0» (allegato G.4). La [guida QoS di AOS-CX](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.14/HTML/qos_4100i-6000-6100/Content/Chp_Overview/end-to-end-qos-beh.htm) di HPE Aruba riporta ancora oggi gli stessi otto.
- **DEI**, un bit. L’attuale [modello del bridge](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-bridge.yang) dell’IEEE lo chiama Drop Eligible Indicator: con use-dei True una porta contrassegna il frame come idoneo allo scarto; altrimenti «the DEI shall be transmitted as zero and ignored on receipt». Nel C-TAG del 2004 lo stesso bit era il CFI, il Canonical Format Indicator (sezione 9.6); nell’S-TAG era sempre DE (sezione 9.7).
- **VID**, da 0 a 4095. La tabella 9-2 dà un significato a tre valori: 0 è «The null VLAN ID», un tag che «contains only priority information»; 1 è «The default PVID value used for classifying frames on ingress»; FFF (4095) è «Reserved for implementation use» e non va trasmesso in un’intestazione di tag («transmitted in a tag header»). L’intervallo vlanid di YANG va da 1 a 4094, e anche Juniper riserva 0 e 4095 («VLAN ID 0 is reserved for tagging the priority of frames», [802.1Q VLAN IDs](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/concept/ethernet-802-1q-vlan-id-by-interface-type.html)). Un frame con tag di priorità finisce nel PVID della porta che lo riceve, «the VLAN-ID assigned to untagged frames or Priority-tagged frames received on this port» ([IEEE8021-Q-BRIDGE-MIB](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-Q-BRIDGE-MIB-202211080000Z.mib)).

**Tag impilati.** I tag si ripetono finché non arriva un tipo che non è un TPID (al massimo otto). Il provider bridging mette l’S-TAG all’esterno e il C-TAG del cliente all’interno («the MSDU of the associated frame can contain a Customer VLAN tag», sezione 9.7), quindi la pagina avverte in caso di S-TAG dentro un C-TAG e di due C-TAG consecutivi, che non sono un impilamento 802.1ad e hanno anche la forma del caso di doppio tag (double tagging) descritto nell’[articolo sulle VLAN](https://ronutz.com/it/learn/vlans-and-8021q-trunking).

**Dopo i tag.** [RFC 9542](https://www.rfc-editor.org/rfc/rfc9542.txt) (BCP 141, che rende obsoleta la RFC 7042), sezione 3: gli EtherType «are equal to or larger than 0x0600», una lunghezza «must ... be less than 0x5DD, or it could be mistaken as an EtherType», e «the LLC encapsulation EtherType 0x8870» può fare le veci di una lunghezza. Quindi da 0x0000 a 0x05DC si legge una lunghezza (un frame IEEE 802.3 seguito da LLC), da 0x05DD a 0x05FF nessuno dei due, e il resto come EtherType, con il nome con cui lo descrive l’[elenco IANA](https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xml) (aggiornato il 3 novembre 2024; dove due righe si sovrappongono vale la più stretta). L’IANA osserva che l’elenco «is contributed unverified information» e che l’elenco pubblico è tenuto dalla IEEE Registration Authority; un valore che l’IANA non elenca viene mostrato come non elencato, mai indovinato.

**Indirizzi.** Quando gli ottetti iniziano con un MAC di destinazione, la pagina mostra entrambi gli indirizzi con il bit M della RFC 9542 («If it is a one, the address is groupcast (multicast or broadcast)») e il bit X (locale), sezione 2.1.1, segnala gli indirizzi per la documentazione della RFC 9542 (da 00-00-5E-00-53-00 a -FF, da 01-00-5E-90-10-00 a -FF, sezione 2.1.4) e avverte quando un indirizzo di origine ha il bit M impostato.

**Dove iniziano gli ottetti.** Automatico legge come tag gli ottetti che iniziano con 0x8100, 0x88A8 o 0x9100, e come inizio di un frame qualsiasi altra sequenza di 14 ottetti o più, e indica quale lettura ha scelto; le altre due scelte impongono l’una o l’altra (un MAC di destinazione può iniziare con 81-00).

## Trunk: cosa significano le righe di ogni vendor

Incolla le righe della porta trunk così come le mostra lo switch; le righe che non riguardano le VLAN del trunk vengono elencate come non lette. Funziona anche un semplice elenco come `10,20,30-40`. Le regole di ogni vendor provengono dalla sua documentazione, consultata l’8 novembre 2026:

- **Cisco IOS XE** (Catalyst 9300; [VLAN trunks, 17.18](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlan_trunks.html) e la [guida di riferimento dei comandi 17.18](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/command_reference/b_1718_9300_cr/vlan_commands.html), consultate in un browser perché il sito di Cisco rifiuta le letture automatiche; la [guida di riferimento dei comandi 17.17](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-17/command_reference/b_1717_9300_cr/vlan_commands.html), consultata tramite WebFetch). `switchport trunk allowed vlan` accetta «all | none | [add | remove | except]vlan-atom [,vlan-atom...]»; all «specifies all VLANs from 1 to 4094. This is the default»; «Do not enter any spaces between comma-separated VLAN parameters or in hyphen-specified ranges»; la forma no «resets the list to the default list». `switchport trunk native vlan` imposta la VLAN nativa «for sending and receiving untagged traffic», «VLAN 1 is the default native VLAN ID on the port», e «If a packet has a VLAN ID that is the same as the sending-port native VLAN ID, the packet is sent without a tag»; l’elenco delle VLAN consentite è formato dalle VLAN che «receive and send traffic on this interface in tagged format». Le VLAN da 1002 a 1005 sono «reserved for Token Ring and FDDI VLANs» e il dispositivo «does not forward FDDI, FDDI-Net, TrCRF, or TrBRF traffic» ([VLANs, 17.18](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlans.html)); la pagina le segnala quando l’elenco le contiene.
- **Juniper Junos con ELS** ([bridging e VLAN](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html); [Ethernet Switching User Guide](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/multicast-l2.pdf), 23 settembre 2026). `vlan members` accetta una VLAN o più VLAN tra `[` e `]`, per ID, per intervallo (`members 120-130`) o per nome; righe `set` successive si aggiungono ai membri (l’esempio della guida stessa termina con `members [ 1 sales support ]`), e i nomi vengono risolti tramite le righe `set vlans NAME vlan-id N` incollate insieme. `native-vlan-id` imposta la VLAN nativa. Senza di essa un trunk «recognizes untagged control packets, but it does not recognize untagged data packets», e l’interfaccia logica «must be configured with the same VLAN ID as the native VLAN ID», quindi una VLAN nativa che non è un membro non riceve nulla senza tag. `members all` viene rifiutato: le pagine lette non dicono quali VLAN rappresenti su ELS.
- **HPE Aruba AOS-CX** (10.16 Layer 2 Bridging Guide: [vlan trunk allowed](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-all.htm), consultata tramite WebFetch e in un browser, [vlan trunk native](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat.htm) e [vlan trunk native tag](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat-tag.htm), consultate in un browser perché il sito rifiuta le letture automatiche; gli indirizzi della guida di riferimento dei comandi citati in precedenza per le due pagine sulla VLAN nativa ora rispondono 404 Not Found). L’elenco è «a single ID, or a series of IDs separated by commas (2, 3, 4), dashes (2-4), or both (2-4,6)»; all indica «all the VLANs currently configured on the switch and any new VLANs that are configured in the future», che lo strumento conta come da 1 a 4094, e lo dichiara. «By default, VLAN ID 1 is assigned as the native VLAN ID», e impostare una VLAN nativa fa eseguire allo switch `vlan trunk allowed all`, quindi dopo di essa vale «To only allow specific VLANs on the trunk, issue the vlan trunk allowed command specifying only specific VLANs». Un elenco dopo all lo sostituisce; un elenco dopo un elenco si aggiunge («Multiple VLAN IDs can be assigned»), ed è la lettura che lo strumento dà delle due pagine. `no vlan trunk allowed` rimuove VLAN, e quando se ne va l’ultima il trunk «will trunk all the VLANs currently defined on the switch». Con `vlan trunk native ... tag`, «Incoming packets that are untagged are dropped except for BPDUs» e «Egress packets are tagged». Una VLAN nativa esclusa dall’elenco delle VLAN consentite non viene trasportata: l’esempio della pagina sulla VLAN nativa stessa è «Assigning native VLAN ID 20 to trunk interface 1/1/2 and then removing it from the list of allowed VLANs. (Only allow VLAN 10 on the trunk.)»
- **MikroTik RouterOS** ([manuale 7.24, bridge VLAN filtering](https://manual.mikrotik.com/docs/7.24/bridging-and-switching/)). Il `vlan-ids` di ogni voce VLAN del bridge («vlan-ids=100-115,120,122,128-130») con `tagged=` o `untagged=` rende la porta un membro con tag o senza tag; `pvid` (predefinito 1) «specifies which VLAN the untagged ingress traffic is assigned to»; con frame-types al suo valore predefinito, admit-all, la porta viene «automatically added as untagged» per il suo PVID; `frame-types=admit-only-vlan-tagged` sulla porta ammette solo frame con tag. Lo strumento legge ogni voce incollata come una voce che elenca la porta trunk, e avverte quando la porta esce senza tag in più VLAN, cosa da cui RouterOS mette in guardia.
- **Extreme Switch Engine** ([guida di riferimento dei comandi 33.7.1](https://documentation.extremenetworks.com/Switch%20Engine%20v33.7.1%20Command%20References/downloads/Switch_Engine_33_7_1_Command_References.pdf)). `configure vlan NAME|ID add ports ... tagged|untagged` («Default: Untagged.»), `delete ports`, e i nomi da `create vlan NAME tag N` (tag da 2 a 4094: «tag 1 is assigned to the default VLAN, and tag 4095 is assigned to the management VLAN»). La Default VLAN «initially contains all ports» e «is untagged on all ports». «Untagged ports can only be a member of a single VLAN», e con `configure vlan untagged-ports auto-move` al suo valore predefinito, inform, un’aggiunta senza tag sposta la porta dalla sua vecchia VLAN senza tag con un avviso; con auto-move disattivato lo strumento rifiuta la riga, come farebbe lo switch.
- **Extreme Fabric Engine** ([guida utente 9.4](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20User%20Guide/fe_9.4_ug_revacdev/content/documents/Switch_Operating_Systems/VOSS_and_Fabric_Engine/fabric_engine_user_guide/adding_or_removing_ports_in_a_vlan.shtml), [guida di riferimento dei comandi 9.4](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20Command%20References/downloads/Fabric_Engine_9_4_Command_References.pdf)). `vlan members add|remove` accetta un solo ID VLAN, da 1 a 4059: «the system reserves VLAN IDs 4060 to 4094 for internal use», e anche quelli da 3500 a 3998 con i flag di boot vrf-scaling e spbm-config-mode. `default-vlan-id` e `untag-port-default-vlan` («Untags the default VLAN for the port», disattivato per impostazione predefinita) definiscono la VLAN nativa.

- **Arista EOS** ([EOS 4.37.0F User Manual, Virtual LANs](https://www.arista.com/en/um-eos/eos-virtual-lans-vlans), consultato in un browser perché il sito rifiuta le letture automatiche). In modalità trunk «The interface may be a member of multiple VLANs, as configured by the switchport trunk allowed vlan command» e «Untagged traffic is associated with the interface's native VLAN»; la modalità predefinita è access, e lo strumento legge le righe incollate come quelle di una porta trunk e lo segnala quando manca `switchport mode trunk`. `switchport trunk allowed vlan` accetta un elenco («Valid v_range formats include number, range, or comma-delimited list of numbers and ranges»), `add`, `remove`, `except`, `all` o `none`; «By default, interfaces handle tagged traffic for all VLANs», e le forme no e default ripristinano all. `switchport trunk native vlan` accetta una VLAN («The default native VLAN for all interfaces is VLAN 1»), i cui frame escono senza tag a meno che il priority tagging in uscita non invii «priority tagged Ethernet frames in place of untagged frames»; le sue forme no e default ripristinano la VLAN nativa predefinita del trunk («restore vlan 1 as the trunk mode native VLAN»). Con `tag` l’interfaccia scarta tutti i frame senza tag («interface drops all untagged frames»); il manuale non dice se a quel punto i frame della VLAN nativa stessa escano con tag, quindi una VLAN nativa presente nell’elenco delle VLAN consentite viene segnata come non confermata in quella direzione. Una VLAN nativa esclusa dall’elenco delle VLAN consentite viene letta come non trasportata, e la pagina dice su cosa si basa: non su una frase del manuale, ma sull’esempio di Arista stessa, il cui elenco consentito 6-10 stampa «Trunking Native Mode VLAN: 1 (inactive)» dove altri esempi stampano «1 (default)».
- **Huawei VRP** (S5700 e S6700 V200R025C00: la [command reference, VLAN configuration commands](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/834147df/vlan-configuration-commands), e la [guida alla configurazione Ethernet Switching, Adding and Removing VLAN Tags](https://support.huawei.com/enterprise/en/doc/EDOC1100514531/f9b8a34a/adding-and-removing-vlan-tags), entrambe consultate in un browser perché il sito rifiuta le letture automatiche). `port link-type trunk` rende la porta un trunk (il valore predefinito è negotiation-desirable, negotiation-auto sull’S5736-S). `port trunk allow-pass vlan` accetta ID VLAN separati da spazi, `to` per un intervallo, al massimo dieci elementi in un comando, oppure `all` («Adds a trunk interface to all VLANs»); «If you run the port trunk allow-pass vlan command multiple times in the same interface view, the interface is added to all the specified VLANs», e la forma undo le rimuove. «By default, a trunk interface is in VLAN 1.» `port trunk pvid vlan` imposta la VLAN predefinita (predefinita 1; una riga successiva la sostituisce, e la forma undo «restores the default VLAN of a trunk interface to the default setting»), ma «does not add the trunk interface to the default VLAN»: «A trunk interface forwards frames with the default VLAN ID only after it is added to the default VLAN using the port trunk allow-pass vlan command». La tabella 4-2 della guida dà il resto: un frame senza tag assume l’ID della VLAN predefinita e viene trasmesso quando quella VLAN è consentita, scartato quando è negata; un frame con tag viene accettato solo quando la sua VLAN è consentita; in uscita i frame della VLAN predefinita escono senza tag e quelli delle altre VLAN consentite con tag. «If a specified VLAN does not exist, the configuration does not take effect»: lo strumento non può vedere quali VLAN esistano su uno switch, quindi conta ogni VLAN nominata dalle righe e lo dichiara. `port trunk allow-pass only-vlan` viene rifiutato con il motivo: «configures VLANs allowed by the interface that is configured as a trunk interface through LNP negotiation», dopo `port link-type negotiation`, mentre lo strumento legge trunk statici.

## Trunk: come vengono confrontate le due estremità

Per ogni VLAN da 1 a 4094 e per ogni direzione, l’estremità che invia trasmette la VLAN senza tag quando è la VLAN nativa (senza tag) di quell’estremità, con tag quando è nel suo elenco, e non la trasmette affatto negli altri casi. Un frame con tag finisce nella VLAN indicata dal suo tag quando l’estremità che lo riceve trasporta quella VLAN, e viene scartato quando non la trasporta. Un frame senza tag finisce nella VLAN nativa dell’estremità che lo riceve, il suo PVID (la definizione del MIB IEEE vista sopra): nella stessa VLAN quando le due VLAN native coincidono, in un’altra quando non coincidono, e da nessuna parte in un’estremità che scarta i frame di dati senza tag (Junos senza VLAN nativa, AOS-CX con una VLAN nativa con tag, Arista con `native vlan tag`, RouterOS che ammette solo frame con tag) o la cui VLAN nativa non viene trasportata (vedi sotto).

Il risultato elenca le VLAN che arrivano nella stessa VLAN in entrambe le direzioni, quelle che vanno solo da A a B o solo da B ad A, quelle che finiscono in un’altra VLAN e quelle non confermate, poi una tabella di intervalli di VLAN con la stessa sorte e la lettura di ciascuna estremità riga per riga.

**VLAN native diverse.** Quando le due estremità collocano i frame senza tag in VLAN diverse, la pagina lo segnala con l’avvertenza di Cisco: se la VLAN nativa di un’estremità è diversa da quella dell’altra, «spanning-tree loops might result»; «Make sure the native VLAN for an IEEE 802.1Q trunk is the same on both ends».

**Una VLAN nativa esclusa dall’elenco delle VLAN consentite.** È la classica trappola, e i vendor letti non dicono tutti la stessa cosa. Su AOS-CX non viene trasportata (l’esempio della pagina sulla VLAN nativa visto sopra); su Arista EOS lo strumento la legge come non trasportata in base all’output di esempio di Arista; su Huawei VRP i frame della VLAN predefinita vengono inoltrati «only after it is added to the default VLAN»; su Junos l’interfaccia «must be configured with the same VLAN ID as the native VLAN ID». In quelle estremità nulla passa senza tag, e la pagina lo dice in cima oltre che nella lettura dell’estremità.

**Non confermato, mai indovinato.** Su Cisco IOS XE e su Fabric Engine le pagine lette non dicono se una VLAN nativa di questo tipo viene trasportata: la guida di riferimento dei comandi 17.18 e la guida alle VLAN di Cisco, in ogni frase sulla VLAN nativa, dicono solo che l’elenco delle VLAN consentite riguarda il traffico «in tagged format» e che la VLAN nativa serve per inviare e ricevere traffico senza tag («sending and receiving untagged traffic»). La pagina segna quella VLAN come non confermata, spiega perché e suggerisce di aggiungerla all’elenco. Lo stesso vale per gli arrivi senza tag su una porta Switch Engine che non è senza tag in alcuna VLAN, su una porta Fabric Engine con untag-port-default-vlan disattivato, e per il modo in cui una VLAN nativa consentita esce da una porta Arista impostata su `native vlan tag`. Il verdetto è verde solo quando ogni VLAN inviata attraversa il trunk in entrambe le direzioni nella propria VLAN e non c’è alcun avviso.

## Cosa rifiuta, e perché

- **Modalità tag**: testo che non è esadecimale, un numero dispari di cifre, più di 128 ottetti o di 4000 caratteri, più di otto tag, un tag troncato, un inizio di frame sotto i 14 ottetti, ottetti a cui è imposto di iniziare con un TPID che non è tale, e un inizio sconosciuto.
- **Modalità trunk**: la VLAN 0 («The null VLAN ID ... shall not be configured») e la 4095 (riservata, tabella 9-2), ID superiori a 4094 o con zeri iniziali, intervalli al contrario, elementi vuoti di un elenco, spazi all’interno di un elenco Cisco o AOS-CX, ID Fabric Engine da 4060 in su ed elenchi nei suoi comandi a VLAN singola, `default-vlan-id 0` (l’intervallo lo consente ma la guida di riferimento non dice cosa significhi), opzioni di Fabric Engine che le pagine non descrivono, nomi di VLAN non risolti, una VLAN Switch Engine creata senza tag ma aggiunta con tag, tag fuori dall’intervallo da 2 a 4094, una VLAN RouterOS che sulla porta è sia con tag sia senza tag, una porta Arista o Huawei che non è un trunk (`switchport mode access`, `port link-type hybrid` e simili), un elenco Arista con spazi, un elenco Huawei con virgole o trattini, con più di dieci elementi o con un `to` senza la seconda VLAN, il comando Huawei `port trunk allow-pass only-vlan` (un comando per trunk negoziati tramite LNP), un’estremità senza alcuna riga di trunk, un’estremità con più di 64 righe, 256 caratteri per riga o 4000 caratteri, e un vendor sconosciuto.

## Esempi svolti

Gli esempi sono il laboratorio sulle VLAN del capitolo 2.3 del corso aperto [LAN Switch Operations and Maintenance](https://ronutz.com/it/materials/lan-switch-operations-and-maintenance), il suo blocco MODERN CLI B12: VLAN 10 USERS, 20 VOICE e 99 MGMT con tag sul trunk, 999 come VLAN nativa, e i frame usano gli indirizzi per la documentazione della RFC 9542.

- **Tag**: `00 00 5e 00 53 01 00 00 5e 00 53 02 81 00 a0 14 08 00` è un frame da 00-00-5E-00-53-02 a 00-00-5E-00-53-01 con un C-TAG di TCI 0xA014: PCP 5 (101, Voce), DEI 0, VID 20, la VLAN VOICE del laboratorio; poi l’EtherType 0x0800, che l’elenco IANA descrive come «Internet Protocol version 4 (IPv4)». Con 7P1D, 6P2D e 5P3D lo stesso PCP 5 viene decodificato come priorità 4.
- **Altri esempi**: un S-TAG con VID 100 all’esterno di un C-TAG con VID 10, poi IPv6; un tag di priorità (VID 0, PCP 5, poi ARP); il VID 4095; il TPID 0x9100 di Junos; e un frame verso un indirizzo di gruppo per la documentazione il cui campo tipo è 0x002E, una lunghezza di 46 ottetti.
- **Trunk**: l’estremità Cisco del laboratorio (`switchport trunk allowed vlan 10,20,99`, `switchport trunk native vlan 999` e `switchport trunk allowed vlan add 999`) contro la sua estremità Junos (`vlan members [ USERS VOICE MGMT ]` risolto in 10, 20 e 99, `native-vlan-id 999` e `vlan members 999`). Le VLAN 10, 20 e 99 arrivano con tag nella stessa VLAN in entrambe le direzioni, e la 999 senza tag.
- **Il laboratorio su altri due vendor**: le righe Switch Engine (l’aggiunta senza tag di NATIVE999 sposta la porta fuori dalla Default con l’avviso di auto-move) contro le righe RouterOS: 10, 20, 99 e 999 arrivano tutte nella stessa VLAN in entrambe le direzioni. Lo stesso vale per le righe Arista (`switchport trunk native vlan 999`, poi `allowed vlan add 999`) contro le righe Huawei (`port trunk pvid vlan 999`, `port trunk allow-pass vlan 999` e `undo port trunk allow-pass vlan 1`).
- **La trappola, su quattro vendor**: due degli altri esempi mantengono le righe del laboratorio senza la 999 nell’elenco delle VLAN consentite. Cisco contro AOS-CX: 10, 20 e 99 passano, e la 999 non è confermata dal lato Cisco e non viene trasportata dal lato AOS-CX. Arista contro Huawei: 10, 20 e 99 passano, e la 999 non passa in nessuna direzione, perché non viene trasportata dal lato Arista (l’output di esempio di Arista) e non viene inoltrata dal lato Huawei (il PVID non è mai stato aggiunto con allow-pass). Entrambi i verdetti sono ambra.
- **VLAN native diverse**: un’estremità Cisco con VLAN nativa 1 contro un’estremità AOS-CX con VLAN nativa 10, entrambe con 1, 10 e 20 consentite: la VLAN 20 passa; i frame senza tag della VLAN 1 provenienti da Cisco finiscono nella VLAN 10, e i frame senza tag della VLAN 10 provenienti da AOS-CX finiscono nella VLAN 1.

## Cosa non fa

Legge righe di configurazione, non uno switch in funzione: presuppone che ogni VLAN nominata esista su entrambi gli switch, che il link sia attivo e configurato come trunk a entrambe le estremità, e che nient’altro (pruning, spanning tree, registrazione delle VLAN con MVRP) rimuova una VLAN. Non negozia il trunking (DTP), non segue una VLAN attraverso più di un link, non traduce le VLAN e non legge un intero file di cattura: incolla i primi ottetti di un solo frame. Il [laboratorio sui trunk](https://ronutz.com/it/learn/vlans-and-8021q-trunking) dell’articolo sulle VLAN segue passo passo un frame attraverso un trunk.

## Condivisione dei risultati

Sotto il verdetto, **Condividi i risultati** crea un link a questa pagina, solo quando lo premi, che contiene dopo il `#` gli ottetti così come li hai inseriti (`input`, e `start` quando non è automatico) nella modalità tag, oppure `mode=trunk` con il vendor e le righe di entrambe le estremità così come li hai inseriti (`avendor`, `aconfig`, `bvendor`, `bconfig`) nella modalità trunk. I campi dell’altra modalità non sono inclusi. Il riquadro a comparsa aggiunge un’avvertenza: gli ottetti di un frame includono due indirizzi MAC, che identificano dei dispositivi, e le righe di un trunk contengono nomi di interfacce e di VLAN, che descrivono una rete privata.

La [RFC 3986](https://www.rfc-editor.org/rfc/rfc3986) (sezione 3.5, consultata l’08/11/2026) stabilisce che il frammento viene separato dal resto dell’URI prima della dereferenziazione («separated from the rest of the URI prior to a dereference»), quindi questi valori non vengono inviati al server quando si apre il link; restano nella barra degli indirizzi e nella cronologia di chi lo apre, e chiunque abbia il link può leggerli.

- **Lunghezza massima.** Un link contiene al massimo 16.384 caratteri, il limite che il sito applica a ogni valore dopo il `#`.
- **Apertura di un link.** La modalità e i suoi campi vengono impostati come li imposterebbe la digitazione (un inizio assente vale come automatico), l’altra modalità conserva i propri valori, e la pagina esegue il calcolo. Un link con una modalità, un inizio o un vendor sconosciuti (un vendor è uno degli otto ID elencati nella sezione API), un campo dell’altra modalità, un campo vuoto o mancante o un valore oltre i limiti viene ignorato. Accettati o no, i valori lasciano poi subito l’indirizzo della pagina stessa, senza alcuna richiesta.

## Provenienza

Il motore è aritmetica dei bit, una ricerca in tabella e aritmetica degli insiemi, senza orologio, senza rete e senza casualità. Include 176 vettori di test di riferimento (golden vectors, insieme `vlan-tag-and-trunk-calculator-golden-2026-11-08b`): 71 calcolati (33 letture di tag e 38 confronti di trunk, compresi l’Esempio e gli altri esempi), 46 che fissano le frasi che enunciano le regole e gli intervalli della tabella delle sorti, 51 rifiuti e 8 corpi dell’API. Ogni valore atteso calcolato è stato ricavato da un’implementazione Python separata, non eseguendo questo motore: il suo parser esadecimale e la sua aritmetica dei bit, la sua lettura dell’XML dell’IANA, le tabelle 6-5 e G-2 ribattute per PCP, e un suo parser per ogni vendor con gli insiemi Python per l’aritmetica delle VLAN. Un controllo incrociato di ognuno dei suoi 1687 campi rispetto al motore non ha trovato alcuna differenza.

## API

Lo stesso motore risponde a `/api/v1/vlan-tag-and-trunk-calculator` dell’API HTTP del sito; il contratto si trova nella [pagina dell’API](https://ronutz.com/it/api), che indica anche se questo sito offre l’API.

- **Richiesta.** Un oggetto JSON. Tag: `{"mode": "tag", "input": "81 00 a0 14 08 00"}`, con `start` (`auto`, `tpid` o `mac`) facoltativo. Trunk: `{"mode": "trunk", "a": {"vendor": "cisco-ios-xe", "config": "switchport trunk allowed vlan 10,20"}, "b": {"vendor": "aruba-aos-cx", "config": "vlan trunk allowed 10,20"}}`; i vendor sono `cisco-ios-xe`, `juniper-junos`, `aruba-aos-cx`, `mikrotik-routeros`, `extreme-switch-engine`, `extreme-fabric-engine`, `arista-eos` e `huawei-vrp`.
- **Risposta, tag.** `mode`, `start`, `startAuto`, `octets`, `hex`, `destination` e `source` (`hex`, `colon`, `group`, `local`, `documentation`, o null), `tags` (ognuno: `index`, `offset`, `tpid`, `kind`, `name`, `tci`, `bits`, `pcp`, `pcpBits`, `acronym`, `trafficType`, `decodings`, `dei`, `vid`, `vidHex`, `vidBits`, `vidMeaning`, `notes`), `next` (`value`, `number`, `kind`, `name`, `text`, o null), `after`, `verdict`, `warnings` e `notes`.
- **Risposta, trunk.** `mode`, `a` e `b` (ognuno: `end`, `vendor`, `vendorName`, `allowed`, `allowedCount`, `allowedText`, `tagged`, `taggedText`, `untaggedOut`, `untaggedIn`, `untaggedInVlan`, `native`, `nativeConfirmed`, `allConfigured`, `read`, `notRead`, `warnings`, `notes`), `carried`, `carriedCount`, `carriedText`, `aOnly`, `aOnlyText`, `bOnly`, `bOnlyText`, `crossed`, `crossedText`, `unconfirmed`, `unconfirmedText`, `rows` (ognuna: `from`, `to`, `ab` e `ba` con `as`, `outcome` e `into`), `nativeMismatch`, `verdict`, `warnings` e `notes`. Gli elenchi di VLAN sono intervalli `[low, high]` e testo come `10,20,30-40`.
- **Errori.** HTTP 400, `invalid_input`, con il messaggio del motore, per esempio `End B, line 2: port trunk allow-pass only-vlan applies only to an interface negotiated as a trunk: ...`.

## Fonti

- [IEEE P802.1ad/D2.4, Provider Bridges, unapproved draft amendment to IEEE Std 802.1Q, 27 settembre 2004](https://www.ieee802.org/1/files/public/docs2004/802-1-ad-D2-4.pdf) (consultata l’08/11/2026): clausola 9, figura 9-1, tabelle 9-1, 9-2, 6-5 e G-2, allegato G.4
- [IEEE 802.1, modulo YANG ieee802-dot1q-types, revisione 2023-10-26](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-types.yang) (consultato l’08/11/2026): c-vlan, s-vlan, vlanid, vlan-index-type, priority-type, pcp-selection-type
- [IEEE 802.1, modulo YANG ieee802-dot1q-bridge, revisione 2023-10-26](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-bridge.yang) (consultato l’08/11/2026): pvid, use-dei
- [IEEE 802.1, IEEE8021-Q-BRIDGE-MIB, LAST-UPDATED 2022-11-08](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-Q-BRIDGE-MIB-202211080000Z.mib) (consultato l’08/11/2026): ieee8021QBridgePvid
- [IEEE Standards Association, IEEE 802.1Q-2022](https://standards.ieee.org/ieee/802.1Q/10323/) (consultata l’08/11/2026): Active Standard
- [RFC 9542, IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters, aprile 2024](https://www.rfc-editor.org/rfc/rfc9542.txt) (consultata l’08/11/2026): sezioni 2.1.1, 2.1.4 e 3; BCP 141, rende obsoleta la RFC 7042, non è né resa obsoleta né aggiornata ([indice delle RFC](https://www.rfc-editor.org/rfc-index.xml), consultato lo stesso giorno)
- [IANA, IEEE 802 Numbers, Ethertypes, aggiornato il 03/11/2024](https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xml) (consultato l’08/11/2026)
- [HPE Aruba Networking, AOS-CX 10.14 Quality of Service Guide, End-to-end QoS behavior](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.14/HTML/qos_4100i-6000-6100/Content/Chp_Overview/end-to-end-qos-beh.htm) (consultata l’08/11/2026 tramite WebFetch)
- [Juniper Networks, Bridging and VLANs](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html) e [802.1Q VLAN IDs and Ethernet Interface Types](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/concept/ethernet-802-1q-vlan-id-by-interface-type.html) (consultate l’08/11/2026)
- [Juniper Networks, Ethernet Switching User Guide, pubblicata il 23/09/2026](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/multicast-l2.pdf) (consultata l’08/11/2026)
- [Cisco, Catalyst 9300 IOS XE 17.18 VLAN Configuration Guide, Configuring VLAN Trunks](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlan_trunks.html) (consultata l’08/11/2026 tramite WebFetch, e di nuovo in un browser l’08/11/2026: il sito rifiuta le letture automatiche) e [Configuring VLANs](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlans.html) (consultata l’08/11/2026 tramite WebFetch), aggiornate il 31 luglio 2025
- [Cisco, Catalyst 9300 IOS XE 17.18 Command Reference, VLAN Commands: switchport trunk](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/command_reference/b_1718_9300_cr/vlan_commands.html) (consultata in un browser l’08/11/2026: il sito rifiuta le letture automatiche)
- [Cisco, Catalyst 9300 IOS XE 17.17 Command Reference, VLAN Commands](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-17/command_reference/b_1717_9300_cr/vlan_commands.html) (consultata l’08/11/2026 tramite WebFetch)
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide, vlan trunk allowed](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-all.htm) (consultata l’08/11/2026 tramite WebFetch, e di nuovo in un browser l’08/11/2026: il sito rifiuta le letture automatiche)
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide, vlan trunk native](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat.htm) e [vlan trunk native tag](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat-tag.htm) (consultate in un browser l’08/11/2026: il sito rifiuta le letture automatiche)
- [Arista Networks, EOS 4.37.0F User Manual, Virtual LANs (VLANs)](https://www.arista.com/en/um-eos/eos-virtual-lans-vlans) (consultato in un browser l’08/11/2026: il sito rifiuta le letture automatiche)
- [Huawei, S5700 and S6700 V200R025C00 Command Reference, VLAN Configuration Commands](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/834147df/vlan-configuration-commands) (consultata in un browser l’08/11/2026: il sito rifiuta le letture automatiche)
- [Huawei, S5700 and S6700 V200R025C00 Configuration Guide - Ethernet Switching, Adding and Removing VLAN Tags](https://support.huawei.com/enterprise/en/doc/EDOC1100514531/f9b8a34a/adding-and-removing-vlan-tags) (consultata in un browser l’08/11/2026: il sito rifiuta le letture automatiche): tabella 4-2
- [MikroTik, RouterOS Manual 7.24, Bridging and Switching](https://manual.mikrotik.com/docs/7.24/bridging-and-switching/) (consultato l’08/11/2026)
- [Extreme Networks, Switch Engine v33.7.1 Command References](https://documentation.extremenetworks.com/Switch%20Engine%20v33.7.1%20Command%20References/downloads/Switch_Engine_33_7_1_Command_References.pdf) (consultata l’08/11/2026): pagine 1569, 1605, 1608 e 1782
- [Extreme Networks, Fabric Engine v9.4 User Guide, Add or Remove Ports in a VLAN](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20User%20Guide/fe_9.4_ug_revacdev/content/documents/Switch_Operating_Systems/VOSS_and_Fabric_Engine/fabric_engine_user_guide/adding_or_removing_ports_in_a_vlan.shtml) e [Command References](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20Command%20References/downloads/Fabric_Engine_9_4_Command_References.pdf) (consultate l’08/11/2026)
- [RFC 3986, Uniform Resource Identifier (URI): Generic Syntax](https://www.rfc-editor.org/rfc/rfc3986) (consultata l’08/11/2026): sezione 3.5, il frammento, che contiene i valori di un link creato con Condividi i risultati

## Standards and references

- [IEEE P802.1ad/D2.4, Provider Bridges (unapproved draft amendment to IEEE Std 802.1Q, 27 September 2004): clause 9 and Tables 9-1, 9-2, 6-5 and G-2](https://www.ieee802.org/1/files/public/docs2004/802-1-ad-D2-4.pdf) - the tag: TPID then TCI (PCP bits 8 to 6, then CFI in a C-TAG or DE in an S-TAG, then the 12-bit VID); C-TAG 81-00; VID 0 the null VLAN ID, 1 the default PVID, FFF reserved and never transmitted; the PCP decoding under 8P0D, 7P1D, 6P2D and 5P3D; the traffic type of each priority; the S-TAG outside the C-TAG
- [IEEE 802.1, ieee802-dot1q-types YANG module, revision 2023-10-26: c-vlan (81-00), s-vlan (88-A8), vlanid 1..4094, vlan-index-type, priority-type, pcp-selection-type](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-types.yang) - the two tag types and their EtherTypes as 802.1Q has them today; the VLAN ID range; values 0 and 4095 not permitted as VLAN indices; the four PCP selections
- [IEEE 802.1, ieee802-dot1q-bridge YANG module, revision 2023-10-26: pvid (default 1) and use-dei](https://raw.githubusercontent.com/YangModels/yang/main/standard/ieee/published/802.1/ieee802-dot1q-bridge.yang) - the Drop Eligible Indicator in the VLAN tag, used only when use-dei is True and otherwise transmitted as zero and ignored on receipt; the PVID, "the primary (default) VID assigned to a specific Bridge Port", default 1
- [IEEE 802.1, IEEE8021-Q-BRIDGE-MIB (LAST-UPDATED 2022-11-08): ieee8021QBridgePvid](https://www.ieee802.org/1/files/public/MIBs/IEEE8021-Q-BRIDGE-MIB-202211080000Z.mib) - the PVID is "the VLAN-ID assigned to untagged frames or Priority-tagged frames received on this port": the rule by which an untagged frame lands in the receiver's native VLAN
- [IEEE Standards Association, IEEE 802.1Q-2022, Bridges and Bridged Networks: Active Standard](https://standards.ieee.org/ieee/802.1Q/10323/) - 802.1Q-2022 is the current, active edition; its full text is not public, which is why the public draft, YANG and MIB are read
- [RFC 9542, IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters, April 2024 (BCP 141; obsoletes RFC 7042): sections 2.1.1, 2.1.4 and 3](https://www.rfc-editor.org/rfc/rfc9542.txt) - the M (group) and X (local) bits; the documentation MAC addresses; EtherTypes 0x0600 and above, lengths below 0x05DD, 0x8870 for LLC encapsulation; tags followed by another tag, an EtherType or an LSAP
- [IANA, IEEE 802 Numbers: Ethertypes (last updated 2024-11-03)](https://www.iana.org/assignments/ieee-802-numbers/ieee-802-numbers.xml) - the 216 rows packed in ethertypes.ts, shown as IANA publishes them; IANA's caveat that the list is contributed and unverified and that the IEEE Registration Authority keeps the public list
- [HPE Aruba Networking, AOS-CX 10.14 Quality of Service Guide (4100i, 6000, 6100), End-to-end QoS behavior: CoS and traffic type (read via WebFetch)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.14/HTML/qos_4100i-6000-6100/Content/Chp_Overview/end-to-end-qos-beh.htm) - the same eight traffic types for CoS 0 to 7 as the draft's Table G-2, and "CoS 1 is deliberately set as the lowest CoS"
- [Juniper Networks, Bridging and VLANs (Junos OS, Layer 2 networking): VLAN IDs, TPIDs, native VLAN on switches with ELS](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/topic-map/bridging-and-vlans.html) - VLAN IDs 0 and 4095 reserved by Junos; the TPID 0x9100 for Q-in-Q; an ELS trunk does not recognize untagged data packets without native-vlan-id, and the logical interface must be a member of the native VLAN; vlan members by name or ID
- [Juniper Networks, 802.1Q VLAN IDs and Ethernet Interface Types](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/concept/ethernet-802-1q-vlan-id-by-interface-type.html) - "VLAN ID 0 is reserved for tagging the priority of frames"
- [Juniper Networks, Ethernet Switching User Guide (Junos OS), published 2026-09-23: vlan members ranges and set adding to the members](https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/multicast-l2.pdf) - vlan members 120-130 and members 500-501 (ranges); successive set lines adding to members [ 1 sales support ]
- [Cisco, VLAN Configuration Guide, Cisco IOS XE 17.18.x (Catalyst 9300 Switches), Configuring VLAN Trunks, updated 31 July 2025 (read via WebFetch; read again in a browser on 2026-11-08: the site refuses automated reads)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlan_trunks.html) - all VLANs allowed by default; no spaces in the list; VLAN 1 the default VLAN on all trunk ports, removable, management traffic continues; native VLAN 1 by default, untagged traffic forwarded in it, sent untagged on egress; the mismatch warning; nothing, in any sentence on the native VLAN, about a native VLAN left out of the allowed list
- [Cisco, VLAN Configuration Guide, Cisco IOS XE 17.18.x (Catalyst 9300 Switches), Configuring VLANs, updated 31 July 2025 (read via WebFetch)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/configuration_guide/vlan/b_1718_vlan_9300_cg/configuring_vlans.html) - VLAN IDs 1002 to 1005 reserved for Token Ring and FDDI VLANs, not forwarded by the device; VLAN 1 the default VLAN
- [Cisco, Command Reference, Cisco IOS XE 17.18.x (Catalyst 9300 Switches), VLAN Commands: switchport trunk (read in a browser on 2026-11-08: the site refuses automated reads)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-18/command_reference/b_1718_9300_cr/vlan_commands.html) - the allowed list is the VLANs that "receive and send traffic on this interface in tagged format"; the native VLAN is for "sending and receiving untagged traffic"; VLAN 1 the default native VLAN; every VLAN list includes all VLANs by default; a packet of the native VLAN "is sent without a tag"; no sentence on a native VLAN left out of the allowed list
- [Cisco, Command Reference, Cisco IOS XE 17.17.x (Catalyst 9300 Switches), VLAN Commands: switchport trunk (read via WebFetch)](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-17/command_reference/b_1717_9300_cr/vlan_commands.html) - the vlan-list format all | none | [add | remove | except] vlan-atom[,vlan-atom...]; all is 1 to 4094 and the default; the no forms; the native VLAN default 1; the allowed list is for traffic in tagged format
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide (6300/6400): vlan trunk allowed (read via WebFetch; read again in a browser on 2026-11-08: the site refuses automated reads)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-all.htm) - the VLAN-LIST format; all meaning every VLAN configured on the switch, now and later; multiple VLAN IDs assigned; the no form removing; the last VLAN removed trunking all VLANs
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide (6300/6400): vlan trunk native (read in a browser on 2026-11-08: the site refuses automated reads)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat.htm) - native VLAN 1 by default; setting it runs vlan trunk allowed all; a later allowed list keeps only the VLANs it names; the no form returns to VLAN 1; the example "Assigning native VLAN ID 20 to trunk interface 1/1/2 and then removing it from the list of allowed VLANs. (Only allow VLAN 10 on the trunk.)": a native VLAN left out of the allowed list is not carried
- [HPE Aruba Networking, AOS-CX 10.16 Layer 2 Bridging Guide (6300/6400): vlan trunk native tag (read in a browser on 2026-11-08: the site refuses automated reads)](https://arubanetworking.hpe.com/techdocs/AOS-CX/10.16/HTML/l2_bridging_6300-6400/Content/Chp_vlans/vlan_cmds/vla-tru-nat-tag.htm) - untagged incoming packets dropped except BPDUs; egress packets tagged
- [MikroTik, RouterOS Manual 7.24: Bridging and Switching, Bridge VLAN Filtering](https://manual.mikrotik.com/docs/7.24/bridging-and-switching/) - vlan-ids lists (100-115,120); tagged and untagged ports of the bridge VLAN table; pvid 1 by default; frame-types admit-all by default, and a port that admits untagged frames added as untagged for its PVID; VLANs missing from the table dropped; several untagged VLANs on one port warned against
- [Extreme Networks, Switch Engine v33.7.1 Command References: configure vlan add ports (p. 1569), configure vlan tag (p. 1605), configure vlan untagged-ports auto-move (p. 1608), create vlan (p. 1782)](https://documentation.extremenetworks.com/Switch%20Engine%20v33.7.1%20Command%20References/downloads/Switch_Engine_33_7_1_Command_References.pdf) - tagged or untagged ports, untagged by default; one untagged VLAN a port; Default (tag 1) untagged on all ports; tags 2 to 4094 (4095 for the management VLAN); auto-move inform by default
- [Extreme Networks, Fabric Engine v9.4 User Guide: Add or Remove Ports in a VLAN](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20User%20Guide/fe_9.4_ug_revacdev/content/documents/Switch_Operating_Systems/VOSS_and_Fabric_Engine/fabric_engine_user_guide/adding_or_removing_ports_in_a_vlan.shtml) - vlan members add and remove with one VLAN ID, 1 to 4059; 4060 to 4094 reserved for internal use, and 3500 to 3998 with the vrf-scaling and spbm-config-mode boot flags; VLAN 1 the default VLAN
- [Extreme Networks, Fabric Engine v9.4 Command References: default-vlan-id (p. 139), untag-port-default-vlan (p. 345), encapsulation dot1q](https://documentation.extremenetworks.com/Fabric%20Engine%20v9.4%20Command%20References/downloads/Fabric_Engine_9_4_Command_References.pdf) - default-vlan-id 0 to 4059; untag-port-default-vlan untags the default VLAN, disabled by default; encapsulation dot1q enables tagging
- [Arista Networks, EOS 4.37.0F User Manual, Virtual LANs (VLANs): switchport mode, switchport trunk allowed vlan, switchport trunk native vlan (read in a browser on 2026-11-08: the site refuses automated reads)](https://www.arista.com/en/um-eos/eos-virtual-lans-vlans) - trunk mode: "Untagged traffic is associated with the interface's native VLAN"; default mode access; allowed vlan v_range ("number, range, or comma-delimited list of numbers and ranges"), add, all, except, none, remove, all by default ("interfaces handle tagged traffic for all VLANs"), no and default restoring all; native vlan default 1, the no and default forms "restore vlan 1 as the trunk mode native VLAN", native traffic leaving untagged unless egress priority tagging sends "priority tagged Ethernet frames in place of untagged frames"; tag ("tag interface drops all untagged frames"; nothing on the native VLAN's egress then, so an allowed native VLAN is not confirmed); the example output "Trunking Native Mode VLAN: 1 (inactive)" for an allowed list of 6-10, read as not carried
- [Huawei, S5700 and S6700 V200R025C00 Command Reference, VLAN Configuration Commands: port link-type, port trunk allow-pass vlan, port trunk pvid vlan (read in a browser on 2026-11-08: the site refuses automated reads)](https://support.huawei.com/enterprise/en/doc/EDOC1100514211/834147df/vlan-configuration-commands) - port link-type default negotiation-desirable (negotiation-auto on the S5736-S); allow-pass vlan { vlan-id1 [ to vlan-id2 ] }&<1-10> | all ("Adds a trunk interface to all VLANs"), cumulative across lines, the undo form removing; allow-pass only-vlan for a trunk negotiated through LNP only (prerequisite port link-type negotiation); "By default, a trunk interface is in VLAN 1"; a VLAN that does not exist does not take effect (said, not modelled); pvid vlan 1 to 4094, default 1, the latest line winning, the undo form restoring the default, forwarded "only after it is added to the default VLAN using the port trunk allow-pass vlan command"
- [Huawei, S5700 and S6700 V200R025C00 Configuration Guide - Ethernet Switching, VLAN Configuration, Adding and Removing VLAN Tags: Table 4-2 (read in a browser on 2026-11-08: the site refuses automated reads)](https://support.huawei.com/enterprise/en/doc/EDOC1100514531/f9b8a34a/adding-and-removing-vlan-tags) - a trunk port: an untagged frame takes the default VLAN ID and is transmitted when that VLAN is permitted, discarded when it is denied; a tagged frame accepted only when its VLAN is permitted; on egress the default VLAN's frames leave untagged when permitted, other permitted VLANs tagged
- [RFC Editor, RFC index (XML): the current status of RFC 9542 and RFC 7042](https://www.rfc-editor.org/rfc-index.xml) - RFC 9542 (BCP 141) obsoletes RFC 7042 and is neither obsoleted nor updated

## Related reading

- [Layer 2 redundancy: LAG, MLAG and spanning tree](https://ronutz.com/en/learn/layer-2-redundancy-lag-mlag-and-spanning-tree.md): Redundant links at layer 2 either get blocked by spanning tree or bundled by link aggregation, and a bundle that ends on two switches needs a pair that agrees on who it is. The numbers behind STP and RSTP convergence, the guards that stop loops, multi-chassis link aggregation in five vendors' own documents, stacking and virtual chassis, the IEEE's DRNI, and EVPN multihoming as the standard answer. After reading, you can predict how each design fails, compute its timers, and know what to test before you trust it.
- [Least and most significant bit: bit numbering and bit order](https://ronutz.com/en/learn/least-and-most-significant-bit.md): Every bit of a binary number has a weight, and the least significant bit is worth 1 while the most significant bit is worth the most and, in two's complement, carries the sign. What significance means, why LSB and MSB sometimes mean bytes, the three ways documents number bits (LSB 0, MSB 0 and 1-based) and the same field read all three ways, the order bits travel on Ethernet, a UART, PPP, I2C and SPI, canonical and bit-reversed MAC addresses, masks, shifts, parity and reflected CRCs, the bugs a wrong order causes, and three cases on this site: Huawei's PortState printed bit 1 first, the I/G and U/L bits of a MAC address, and the DNS header flags.
- [The Ethernet frame, field by field: preamble to FCS, the 802.1Q tag, and the sizes that matter](https://ronutz.com/en/learn/the-ethernet-frame-field-by-field.md): Every Ethernet frame is the same short sequence of fields: a preamble to wake the receiver, two addresses, one field that is either a length or a type, the payload, and a checksum. What each field holds, why the minimum is 64 octets and the maximum 1518, where the 802.1Q tag goes and what it carries, and why jumbo frames are not in the standard.
- [VLAN hopping: switch spoofing, double tagging and the trunk settings that close both](https://ronutz.com/en/learn/vlan-hopping-switch-spoofing-and-double-tagging.md): A VLAN boundary rests on three decisions a switch makes about every frame: which VLAN a frame belongs to, which ports accept tags, and which VLAN travels untagged on a trunk. VLAN hopping attacks each of them. This part explains the IEEE 802.1Q classification rules those decisions come from, works through switch spoofing with the trunk-negotiation table and double tagging with the frame written out byte by byte at each switch, follows the voice VLAN and the 2022 VLAN 0 bypass of layer 2 filters, and gives the settings that close every path, from the vendors' guides, the NSA's hardening guidance and the DISA checklist. After reading, you can compute a tag by hand, predict whether a given frame crosses a VLAN boundary, say why double tagging is one-way, and audit a trunk and an access port for the settings that matter.
- [VLANs and 802.1Q trunking: tagged, untagged, native, and the voice VLAN](https://ronutz.com/en/learn/vlans-and-8021q-trunking.md): A VLAN turns one switched network into several that cannot hear each other's broadcasts, and 802.1Q is how a single cable carries many of them at once. Access and trunk ports in the standard's own terms, the native VLAN and the mismatch that loops a network, the VLAN-hopping attacks and the settings that stop them, the voice VLAN behind every desk phone, and why traffic between VLANs always needs a router.
