1. Ethernet_frame
	1.1 以太网类型
	1.2 Ethernet II EtherType
2. 协议编号 IP protocol numbers

1. Ethernet_frame

在计算机网络中,以太网帧是数据链路层协议数据单元,使用底层以太网物理层传输机制。
换句话说,以太网链路上的数据单元将以太网帧作为其有效载荷进行传输。
 
在以太网链路上的数据包称作以太帧。 
  • 以太帧起始部分由前导码(Preamble)和帧开始符(Start frame delimiter SFD)组成。
  • 后面紧跟着一个以太网报头,以MAC地址说明目的地址和源地址(2组 6字节, 共12字节)。
  • 帧的中部是该帧负载的包含其他协议报头的数据包(例如IP协议)。
  • 以太帧由一个32位冗馀校验码结尾。它用于检验数据传输是否出现损坏。
 

1.1 以太网类型

以太网类型或説明 有效载荷开始两个字节
Payload start two bytes
length
(Decimal)
(Hex)
Ethernet II 以太网 II (最广泛) Any ≥ 1536 0600
Novell raw IEEE 802.3 非标准变体帧 0xFFFF ≤ 1500 05DC
IEEE 802.2 LLC 逻辑链路控制(LLC)帧 Other ≤ 1500 05DC
IEEE 802.2 SNAP 子网访问协议(SNAP)帧 0xAAAA ≤ 1500 05DC
 
不同类型的帧具有不同的格式和MTU值,但可以在同一物理介质上共存。
所有四种以太帧类型都可包含一个IEEE 802.1Q选项来确定它属于哪个VLAN以及他的IEEE 802.1p优先级(QoS)。
这个封装由IEEE 802.3ac定义并将帧大小从64字节扩充到1522字节
(注:不包含7个前导字节和1个字节的帧开始符以及12个帧间距字节)。
 
以太网类型 (EtherType)是以太网帧中的两个八位字节字段。 紧跟著目的MAC地址和源MAC地址后面的第13, 14字节. 
"Ethernet Type" or "IEEE802.3 Length" 
过去,根据以太网段上使用的以太网帧类型,两种解释可能同时有效,从而导致潜在的歧义。 
  • 以太网 II 帧将这些八位字节 [≥ 1536(十进制)] 视为以太网类型,
  • 而原始 IEEE 802.3 帧将这些八位字节 [≤ 1500(十进制)] 视为有效载荷的大小(以字节为单位)。
 
为了允许在同一以太网段上使用以太网 II 和 IEEE 802.3 帧,引入了统一标准 IEEE 802.3x-1997, 该标准要求以太网类型 (EtherType) 的值大于或等于 1536。
之所以选择该值,是因为以太网802.3 帧的数据字段的最大长度 ( MTU ) 为 1500 字节, 而 1536 在十六进制中用 600 表示。
因此,该字段的值小于或等于 1500 表示该字段用作以太网帧的有效载荷大小, 而大于或等于 1536 表示该字段用于表示以太网类型。
1501 到 1535(含)之间的值的解释尚未定义。
 

1.2 Ethernet II EtherType

Ethernet II: 以太 II 帧 也称作DIX以太网,是以这个设计的主要成员,DEC,Intel和Xerox的名字命名的。
维基百科上整理了部分常见的以太类型. 
(0x) https://en.wikipedia.org/wiki/EtherType#Values 协议 Protocol RFC (dec) x I
0800 Internet Protocol version 4 (IPv4) 互联网协议版本 4 (IPv4) [RFC9542] 2048 x I
0806 Address Resolution Protocol (ARP) 地址解析协议 (ARP) [RFC9542] 2054 x I
0842 Wake-on-LAN 局域网唤醒   2114    
22EA Stream Reservation Protocol 流预留协议   8938    
22F0 Audio Video Transport Protocol (AVTP) 音频视频传输协议 (AVTP)   8944    
22F3 IETF TRILL Protocol IETF TRILL 协议 [RFC6325] 8947   I
6002 DEC Maintenance Operation Protocol (MOP)
Remote Console (RC)
DEC 维护操作协议 (MOP) 远程控制台   24578 x I
6003 DECnet Phase IV, DNA Routing DECnet Phase IV, DNA 路由   24579 x I
6004 DEC Local Area Transport (LAT) DEC 局域网传输 (LAT)   24580 x I
8035 Reverse Address Resolution Protocol (RARP) 反向地址解析协议 (RARP) [RFC903] 32821 x I
809B AppleTalk (EtherTalk) AppleTalk (EtherTalk)   32923 x I
80D5 LLC PDU (in particular, IBM SNA) LLC PDU (IBM SNA以太网服务)   32981 x I
80F3 AppleTalk Address Resolution Protocol (AARP) AppleTalk 地址解析协议 (AARP)   33011 x I
8100 VLAN-tagged frame (IEEE 802.1Q) and Shortest Path Bridging IEEE 802.1aq with NNI compatibility VLAN 标记帧 (IEEE 802.1Q) 和最短路径桥接 IEEE 802.1aq,兼容 NNI [RFC9542] 33024 x I
8102 Simple Loop Prevention Protocol (SLPP) 简单环路预防协议 (SLPP)   33026 x I
8103 Virtual Link Aggregation Control Protocol (VLACP) 虚拟链路聚合控制协议 (VLACP)   33027 x I
8137 Novell (old) NetWare IPX (ECONFIG E option) Novell(旧版)NetWare IPX(ECONFIG E 选项)   33079 x I
8204 QNX Qnet Quantum QNX Qnet 量子软件   33284 x I
86DD Internet Protocol Version 6 (IPv6) 互联网协议版本 6 (IPv6) [RFC9542] 34525 x I
8808 Ethernet flow control 以太网流量控制 [RFC9542] 34824   I
8809 Ethernet Slow Protocols[11] such as the Link Aggregation Control Protocol (LACP) 以太网慢速协议[11],例如链路聚合控制协议(LACP) [IEEE] 34825   I
8819 CobraNet CobraNet   34841    
8847 MPLS unicast MPLS 单播 [RFC5332] 34887   I
8848 MPLS multicast MPLS 多播 [RFC5332] 34888   I
8863 PPPoE Discovery Stage PPPoE 发现阶段 [RFC2516] 34915   I
8864 PPPoE Session Stage PPPoE 会话阶段 [2516][8822] 34916   I
887B HomePlug 1.0 MME HomePlug 1.0 MME   34939    
888E EAP over LAN (IEEE 802.1X)
IEEE Std 802.1X - Port-based network access control
基于端口的网络访问控制
IEEE 802.1X 局域网 EAP
[IEEE] 34958   I
8892 PROFINET Protocol PROFINET 协议   34962    
889A HyperSCSI (SCSI over Ethernet) HyperSCSI(以太网 SCSI)   34970    
88A2 ATA over Ethernet 以太网 ATA   34978    
88A4 EtherCAT Protocol EtherCAT 协议   34980    
88A8 Service VLAN tag identifier (S-Tag) on Q-in-Q tunnel Q-in-Q 隧道上的服务 VLAN 标签标识符 (S-Tag)
IEEE 标准 802.1Q
[IEEE] 34984   I
88AB Ethernet Powerlink[citation needed] 以太网 Powerlink[需要引用]   34987    
88B8 GOOSE (Generic Object Oriented Substation event) GOOSE(通用面向对象变电站事件)   35000    
88B9 GSE (Generic Substation Events) Management Services GSE(通用变电站事件)管理服务   35001    
88BA SV (Sampled Value Transmission) SV(采样值传输)   35002    
88BF MikroTik RoMON (unofficial) MikroTik RoMON(非官方)   35007    
88CC Link Layer Discovery Protocol (LLDP) 链路层发现协议 (LLDP)
IEEE 标准 802.1AB
[IEEE] 35020   I
88CD SERCOS III SERCOS III   35021    
88E1 HomePlug Green PHY HomePlug Green PHY   35041    
88E3 Media Redundancy Protocol (IEC62439-2) 介质冗余协议 (IEC62439-2)   35043    
88E5 IEEE 802.1AE MAC security (MACsec) MAC 安全 (MACsec)
媒体访问控制安全
IEEE 标准 802.1AE
[IEEE] 35045   I
88E7 Provider Backbone Bridges (PBB) (IEEE 802.1ah) 运营商骨干网桥 (PBB)
IEEE 802.1ah
  35047   I
88F7 Precision Time Protocol (PTP) over IEEE 802.3 Ethernet 精确时间协议
PTP IEEE 802.3 以太网
  35063   I
88F8 NC-SI NC-SI   35064    
88FB Parallel Redundancy Protocol (PRP) 并行冗余协议 (PRP)   35067    
8902 IEEE 802.1ag Connectivity Fault Management (CFM) Protocol / ITU-T Recommendation Y.1731 (OAM) IEEE 802.1ag 连接故障管理 (CFM) 协议 / ITU-T 建议 Y.1731 (OAM)   35074    
8906 Fibre Channel over Ethernet (FCoE) 以太网光纤通道 (FCoE)   35078    
8914 FCoE Initialization Protocol FCoE 初始化协议   35092    
8915 RDMA over Converged Ethernet (RoCE) 融合以太网远程直接访问 (RoCE)   35093    
891D TTEthernet Protocol Control Frame (TTE) TTE 以太网协议控制帧 (TTE)   35101    
893a 1905.1 IEEE Protocol 1905.1 IEEE 协议   35130    
892F High-availability Seamless Redundancy (HSR) 高可用性无缝冗余 (HSR)   35119    
9000 Ethernet Configuration Testing Protocol (Loopback) 以太网配置测试协议(环回)   36864 x I
F1C1 Redundancy Tag (IEEE 802.1CB Frame Replication and Elimination for Reliability) 冗余标签(IEEE 802.1CB 帧复制和消除,以实现可靠性)   61889    
 
备注, 表格最后2列, [l]IANA ,[x]xerox 分別表示在下方2个详细表格内匹配到一致的项目.
 
下面有更详细的列表, 2家各自维护, 其中略有差异, 不过一些主流的, 认识都是一致的: 
以太网或 IEEE802.3 数据包的第 13 和 14 个八位字节(前导码之后)包含“以太网类型”或“IEEE802.3 长度”字段。
“以太网类型”值由 XEROX 管理。
 
EtherType 值由IEEE 注册机构分配。Protocols \ IEEE 802 Numbers \ Ethertypes
 
 

2. 协议编号 IP protocol numbers

  • 在互联网协议版本 4 (IPv4) [RFC791] 中,有一个名为“协议”的字段(8位)用于标识下一级协议。
  • 在互联网协议版本 6 (IPv6) [RFC8200] 中,此字段称为“下一个报头”字段。
它是封装协议的标识符,并决定了紧随报头之后的数据布局。 
协议编号由互联网号码分配机构(IANA)维护和发布。
[RFC5237][RFC7045]
同样属于 IPv6 扩展头类型的值应在 [IANA registry ipv6-parameters] 的 IPv6 扩展头类型注册表中列出。
Decimal Keyword Protocol 协议 IPv6
扩展头
Reference hex
145 NSH Network Service Header 网络服务报头 N [RFC9491] 91
146 Homa Homa transport protocol Homa 传输协议 N   92
0 HOPOPT IPv6 Hop-by-Hop Option IPv6 逐跳选项 Y [RFC8200] 0
43 IPv6-Route Routing Header for IPv6 IPv6 路由报头 Y [RFC8200] 2B
44 IPv6-Frag Fragment Header for IPv6 IPv6 分段报头 Y [RFC8200] 2C
50 ESP Encap Security Payload 封装安全负载 Y [RFC4303] 32
51 AH Authentication Header 身份验证报头 Y [RFC4302] 33
60 IPv6-Opts Destination Options for IPv6 用于 IPv6 的目标选项 Y [RFC8200] 3C
135 Mobility Header Mobility Extension Header for IPv6 IPv6 移动扩展报头 Y [RFC6275] 87
139 HIP Host Identity Protocol 主机身份协议 Y [RFC7401] 8B
140 Shim6 Site Multihoming by IPv6 Intermediation 通过 IPv6 中介实现站点多宿主 Y [RFC5533] 8C
147 BIT-EMU Bit-stream Emulation 比特流仿真 Y [RFC-ietf-pals-ple-14] 93
253-254   Use for experimentation and testing 用于实验和测试 Y [RFC3692] FD,FE
1 ICMP Internet Control Message 互联网控制消息   [RFC792] 1
2 IGMP Internet Group Management 互联网组管理   [RFC1112] 2
3 GGP Gateway-to-Gateway 网关到网关   [RFC823] 3
4 IPv4 IPv4 encapsulation IPv4 封装   [RFC2003] 4
5 ST Stream   [RFC1190][RFC1819] 5
6 TCP Transmission Control 传输控制   [RFC9293] 6
7 CBT Core-based trees 基于核心的树   [RFC2189] 7
8 EGP Exterior Gateway Protocol 外部网关协议   [RFC888] 8
9 IGP any private interior gateway (Cisco IGRP) 任何私有内部网关(思科IGRP)   [IANA] 9
10 BBN-RCC-MON BBN RCC Monitoring BBN RCC 监控     A
11 NVP-II Network Voice Protocol 网络语音协议   [RFC741] B
12 PUP PARC Universal Packet PARC 通用数据包协议     C
13 ARGUS ARGUS ARGUS   (deprecated) D
14 EMCON EMCON EMCON     E
15 XNET Cross Net Debugger 跨网络调试器     F
16 CHAOS Chaos 混沌     10
17 UDP User Datagram 用户数据报   [RFC768] 11
18 MUX Multiplexing 多路复用     12
19 DCN-MEAS DCN Measurement Subsystems DCN 测量子系统     13
20 HMP Host Monitoring 主机监控   [RFC869] 14
21 PRM Packet Radio Measurement 分组无线测量     15
22 XNS-IDP XEROX NS IDP XEROX NS IDP     16
23 TRUNK-1 Trunk-1 Trunk-1     17
24 TRUNK-2 Trunk-2 Trunk-2     18
25 LEAF-1 Leaf-1 Leaf-1     19
26 LEAF-2 Leaf-2 Leaf-2     1A
27 RDP Reliable Data Protocol 可靠数据协议   [RFC908] 1B
28 IRTP Internet Reliable Transaction 互联网可靠事务   [RFC938] 1C
29 ISO-TP4 ISO Transport Protocol Class 4 ISO 传输协议 4 类   [RFC905] 1D
30 NETBLT Bulk Data Transfer Protocol 批量数据传输协议   [RFC969] 1E
31 MFE-NSP MFE Network Services Protocol MFE 网络服务协议     1F
32 MERIT-INP MERIT Internodal Protocol MERIT 节点间协议     20
33 DCCP Datagram Congestion Control Protocol 数据报拥塞控制协议   [RFC4340] 21
34 3PC Third Party Connect Protocol 第三方连接协议     22
35 IDPR Inter-Domain Policy Routing Protocol 域间策略路由协议     23
36 XTP Xpress Transport Protocol Xpress 传输协议     24
37 DDP Datagram Delivery Protocol 数据报传送协议     25
38 IDPR-CMTP IDPR Control Message Transport Protocol IDPR 控制消息传输协议     26
39 TP++ TP++ Transport Protocol TP++ 传输协议     27
40 IL IL Transport Protocol IL 传输协议     28
41 IPv6 IPv6 encapsulation IPv6 封装 (6to4 和 6in4)   [RFC2473] 29
42 SDRP Source Demand Routing Protocol 源请求路由协议   [RFC1940] 2A
45 IDRP Inter-Domain Routing Protocol 域间路由协议     2D
46 RSVP Resource Reservation Protocol 资源预留协议   [RFC2205][RFC3209] 2E
47 GRE Generic Routing Encapsulation 通用路由封装   [RFC2784] 2890 2F
48 DSR Dynamic Source Routing Protocol 动态源路由协议   [RFC4728] 30
49 BNA Burroughs Network Architecture Burroughs 网络架构     31
52 I-NLSP Integrated Net Layer Security TUBA 集成网络层安全协议 (TUBA)     34
53 SwIPe IP with Encryption 加密 IP (已弃用)   (deprecated)5237 35
54 NARP NBMA Address Resolution Protocol NBMA 地址解析协议   [RFC1735] 36
55 Min-IPv4 IP Mobility (Min Encap) IP 移动性(最小封装)   [RFC2004] 37
56 TLSP Transport Layer Security Protocol
using Kryptonet key management
使用 Kryptonet 密钥管理
的传输层安全协议
    38
57 SKIP Simple Key-Management for Internet Protocol 互联网协议简单密钥管理   RFC 2356 39
58 IPv6-ICMP ICMP for IPv6 用于 IPv6 的 ICMP   [RFC8200] 3A
59 IPv6-NoNxt No Next Header for IPv6 用于 IPv6 的无下一个报头   [RFC8200] 3B
61   any host internal protocol 任何主机内部协议   [IANA] 3D
62 CFTP CFTP CFTP     3E
63   any local network 任何本地网络   [IANA] 3F
64 SAT-EXPAK SATNET and Backroom EXPAK SATNET 和后台 EXPAK     40
65 KRYPTOLAN Kryptolan Kryptolan     41
66 RVD MIT Remote Virtual Disk Protocol MIT 远程虚拟磁盘协议     42
67 IPPC Internet Pluribus Packet Core 互联网多总线分组核心     43
68   any distributed file system 任何分布式文件系统   [IANA] 44
69 SAT-MON SATNET Monitoring 卫星网络监控     45
70 VISA VISA Protocol VISA 协议     46
71 IPCU Internet Packet Core Utility 互联网分组核心实用程序     47
72 CPNX Computer Protocol Network Executive 计算机协议网络执行程序     48
73 CPHB Computer Protocol Heart Beat 计算机协议心跳     49
74 WSN Wang Span Network Wang Span 网络     4A
75 PVP Packet Video Protocol 分组视频协议     4B
76 BR-SAT-MON Backroom SATNET Monitoring 后台卫星网络监控     4C
77 SUN-ND SUN ND PROTOCOL-Temporary SUN ND协议-临时     4D
78 WB-MON WIDEBAND Monitoring 宽带监控     4E
79 WB-EXPAK WIDEBAND EXPAK 宽带扩展协议 (EXPAK)     4F
80 ISO-IP ISO Internet Protocol ISO 互联网协议     50
81 VMTP Versatile Message Transaction Protocol 多功能消息事务协议   RFC 1045 51
82 SECURE-VMTP Secure Versatile Message Transaction Protocol 安全多功能消息事务协议   RFC 1045 52
83 VINES VINES VINES     53
84 IPTM Internet Protocol Traffic Manager 互联网协议流量管理器     54
85 NSFNET-IGP NSFNET-IGP NSFNET-IGP     55
86 DGP Dissimilar Gateway Protocol 不同网关协议     56
87 TCF TCF TCF     57
88 EIGRP EIGRP 增强型内部网关路由协议   [RFC7868] 58
89 OSPFIGP Open Shortest Path First IGP 开放式最短路径优先   [RFC1583][2328][5340] 59
90 Sprite-RPC Sprite RPC Protocol Sprite RPC 协议     5A
91 LARP Locus Address Resolution Protocol Locus 地址解析协议     5B
92 MTP Multicast Transport Protocol 多播传输协议     5C
93 AX.25 AX.25 Frames AX.25 帧     5D
94 IPIP KA9Q NOS compatible IP over IP tunneling KA9Q NOS 兼容 IP over IP 隧道     5E
95 MICP Mobile Internetworking Control Pro. 移动互联控制协议   (deprecated) 5F
96 SCC-SP Semaphore Communications Sec. Pro. 信号量通信安全协议     60
97 ETHERIP Ethernet-within-IP Encapsulation IP 内以太网封装   [RFC3378] 61
98 ENCAP Encapsulation Header 封装报头   [RFC1241] 62
99   any private encryption scheme 任何私有加密方案   [IANA] 63
100 GMTP GMTP GMTP     64
101 IFMP Ipsilon Flow Management Protocol Ipsilon 流管理协议     65
102 PNNI PNNI over IP 基于 IP 的 PNNI     66
103 PIM Protocol Independent Multicast 协议无关组播   [RFC7761] 67
104 ARIS IBM's ARIS (Aggregate Route IP Switching) IBM 的 ARIS (聚合路由IP交换)     68
105 SCPS Space Communications Protocol Standards 空间通信协议规范   SCPS-TP 69
106 QNX QNX 嵌入式Unix     6A
107 A/N Active Networks 主动网络     6B
108 IPComp IP Payload Compression Protocol IP 有效载荷压缩协议   [RFC2393] 3137 6C
109 SNP Sitara Networks Protocol Sitara 网络协议     6D
110 Compaq-Peer Compaq Peer Protocol Compaq 对等协议     6E
111 IPX-in-IP IPX in IP IP 中的 IPX     6F
112 VRRP Virtual Router Redundancy Protocol, 
Common Address Redundancy Protocol
 (not IANA assigned)
虚拟路由器冗余协议,
通用地址冗余协议
(非 IANA 分配)
  [RFC9568] 70
113 PGM PGM Reliable Transport Protocol PGM 可靠传输协议   RFC 3208 71
114   any 0-hop protocol 任何零跳协议   [IANA] 72
115 L2TP Layer Two Tunneling Protocol 第二层隧道协议v3   [RFC3931] 73
116 DDX D-II Data Exchange (DDX) D-II 数据交换 (DDX)     74
117 IATP Interactive Agent Transfer Protocol 交互式代理传输协议     75
118 STP Schedule Transfer Protocol 调度传输协议     76
119 SRP SpectraLink Radio Protocol SpectraLink 无线电协议     77
120 UTI Universal Transport Interface Protocol 通用传输接口协议     78
121 SMP Simple Message Protocol 简单消息协议     79
122 SM Simple Multicast Protocol 简单组播协议   (deprecated) 7A
123 PTP Performance Transparency Protocol 性能透明协议     7B
124 ISIS over IPv4 Intermediate System to Intermediate System
(IS-IS) Protocol over IPv4
中间系统到中间系统
(IS-IS) IPv4 协议
  RFC 1142, RFC 1195 7C
125 FIRE Flexible Intra-AS Routing Environment 灵活的自治系统内路由环境     7D
126 CRTP Combat Radio Transport Protocol 作战无线电传输协议     7E
127 CRUDP Combat Radio User Datagram 作战无线电用户数据报     7F
128 SSCOPMCE Service-Specific Connection-Oriented Protocol
in a Multilink and Connectionless Environment
多链路和无连接环境中的
服务特定面向连接协议
    80
129 IPLT         81
130 SPS Secure Packet Shield 安全数据包屏蔽     82
131 PIPE Private IP Encapsulation within IP IP 内私有 IP 封装     83
132 SCTP Stream Control Transmission Protocol 流控制传输协议   RFC 4960 84
133 FC Fibre Channel 光纤通道   [RFC6172] 85
134 RSVP-E2E-IGNORE Reservation Protocol (RSVP) End-to-End Ignore 预留协议 (RSVP) 端到端忽略   [RFC3175] 86
136 UDPLite Lightweight User Datagram Protocol 轻量级用户数据报协议   [RFC3828] 88
137 MPLS-in-IP Multiprotocol Label Switching Encapsulated in IP IP 封装的多协议标签交换   [RFC4023] 5332 89
138 manet MANET Protocols 自组网协议   [RFC5498] 8A
141 WESP Wrapped Encapsulating Security Payload 封装安全有效载荷   [RFC5840] 8D
142 ROHC Robust Header Compression 健壮报头压缩   [RFC5858] 8E
143 Ethernet Segment Routing over IPv6 IPv6 分段路由   [RFC8986] 8F
144 AGGFRAG AGGFRAG encapsulation payload for ESP ESP 的 AGGFRAG 封装有效载荷   [RFC9347] 90
255 Reserved       [IANA] FF
148-252   Unassigned 未分配   [IANA] 93-FC