<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} @font-face {font-family:"/@宋体"; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; mso-pagination:none; font-size:10.5pt; mso-bidi-font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:宋体; mso-font-kerning:1.0pt;} /* Page Definitions */ @page {mso-page-border-surround-header:no; mso-page-border-surround-footer:no;} @page Section1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
Tag 和 untag
untag 就是普通的 Ethernet 报文,普通 PC 机的网卡是可以识别这样的报文进行通讯;
tag 报文结构的变化是在源 mac 地址和目的 mac 地址之后,加上了 4bytes 的 vlan 信息,也就是 vlan tag 头;一般来说这样的报文普通 PC 机的网卡是不能识别的。
带 802.1Q 的帧是在标准以太网帧上插入了 4 个字节的标识。其中包含:
2 个字节的协议标识符( TPID) ,当前置 0x8100 的固定值,表明该帧带有 802.1Q 的标记信息。
2 个字节的标记控制信息( TCI ),包含了三个域。
Priority 域,占 3bits ,表示报文的优先级,取值 0 到 7 , 7 为最高优先级, 0 为最低优先级。该域被 802.1p 采用。
规范格式指示符( CFI) 域,占 1bit , 0 表示规范格式,应用于以太网; 1 表示非规范格式,应用于 Token Ring 。
VLAN ID 域,占 12bit ,用于标示