# MAC 地址

MAC 地址（Media Access Control address，媒体访问控制地址）是 IEEE 802 网络接口——最常见的是以太网和 Wi-Fi 适配器——用来在本地网络上标识自身作为帧的源或目的地的 48 位或 64 位链路层标识符。48 位形式被标准化为 EUI-48，历史上称为 MAC-48，是最常用的以太网接口标识符。<sup>[1](https://www.rfc-editor.org/rfc/rfc9542.pdf)</sup> MAC 地址工作在网络模型的第二层：与 IP 地址不同，它们通常不会被路由跨越第三层边界，依赖方不应假设其在本地网络之外也具有唯一性。<sup>[2](https://datatracker.ietf.org/doc/rfc10031/)</sup>

| 要点 | 详情 |
|---|---|
| 长度与格式 | 48 位（6 个八位组），写作六个十六进制八位组；IEEE 802 下还存在 64 位的 EUI-64 形式<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup> |
| 结构 | 前三个八位组构成组织唯一标识符（OUI）；后三个八位组是由该组织分配的网卡专用位，以保证全局唯一性<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup> |
| 特殊位 | 第一个八位组的第 0 位是 I/G 位（0 为单播，1 为组播）；第 1 位是 U/L 位（0 为全局管理，1 为本地管理）<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup> |
| IEEE 前缀块 | 截至 2024 年，分配了三种前缀长度：MA-L（24 位，24 个所有者位）、MA-M（28 位，20 个所有者位）和 MA-S（36 位，12 个所有者位）<sup>[1](https://www.rfc-editor.org/rfc/rfc9542.pdf)</sup> |
| 地址解析 | ARP（RFC 826，1982 年 11 月）将 IPv4 地址映射为 48 位以太网地址；IPv6 邻居发现结合了 ARP、ICMP 路由器发现和 ICMP 重定向功能<sup>[4](https://www.rfc-editor.org/info/rfc826/)</sup><sup> • </sup><sup>[5](https://www.rfc-editor.org/info/rfc4861/)</sup> |
| 交换 | 第二层交换机将源 MAC 地址学习到 MAC 地址表中，并根据目的地址查找转发帧；Catalyst 6500 的表至少可容纳 128,000 条条目<sup>[6](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/15-4SY/config_guide/sup6T/15_3_sy_swcg_6T/layer2.pdf)</sup> |
| 隐私应对 | 操作系统现已在 Wi-Fi 上随机化 MAC 地址；Android 10 在客户端模式、SoftAp 和 Wi-Fi Direct 下默认启用随机化<sup>[7](https://source.android.com/docs/core/connect/wifi-mac-randomization?authuser=53)</sup> |

## 结构与管理

全局管理的 MAC 地址由设备制造商分配，分为两部分：按传输顺序的前三个八位组构成[组织唯一标识符](https://www.edgepedia.org/zh/organizationally-unique-identifier)，标识发放该标识符的组织；随后的三个八位组由该组织分配，使最终地址全局唯一。<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup> IEEE 注册管理机构负责分配前缀。在 EUI-48 中，IEEE 注册管理机构发放前导前缀，而该前缀的所有者决定其余各位；到 2024 年，存在三种前缀长度：MA-L 为 24 位，MA-M 为 28 位，MA-S 为 36 位，MA-S 为其持有者留下 12 位自有位用于构建 48 位地址。<sup>[1](https://www.rfc-editor.org/rfc/rfc9542.pdf)</sup> 在旧命名体系下，不需要完整三个八位组的组织获得的是个人地址块（IAB），其中前 4.5 个八位组（36 位）已被分配，持有者控制剩余的 1.5 个八位组（12 位）。<sup>[8](https://www.rfc-editor.org/rfc/rfc5342.html)</sup>

第一个八位组中有两位具有特殊含义。最低有效位即 I/G 位，为 0 时表示该地址为个体（单播），为 1 时表示组（组播）；下一位即 U/L 位，为 0 时表示该地址为全局管理，为 1 时表示本地管理。<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup> 若 U/L 位为 1，则按 IEEE 802 的规定整个地址被视为本地管理，全局管理地址必须向 IEEE 注册，而本地管理地址则不需要。<sup>[9](https://datatracker.ietf.org/doc/html/rfc9797)</sup> 本地管理地址可由网络管理员或设备操作系统设置，覆盖烧录地址；它们不是全局唯一的，必须加以管理以避免网络内冲突。<sup>[10](https://www.cisco.com/c/en/us/td/docs/switches/lan/c9000/lyr2-fwd/cdp-lldp-mac-udld/cdp-lldp-mac-udld-configuration-guide/configure-mac.html)</sup>

术语随时间发生了变化。EUI-48 在 IEEE Std 802 下通常用作硬件接口的地址，历史上称为 MAC-48；由于两个术语之间的区别未被充分理解，现在两者统一使用 EUI-48，MAC-48 标识符一词已废弃。<sup>[11](https://standards-support.ieee.org/hc/en-us/articles/4888705676564-Guidelines-for-Use-of-Extended-Unique-Identifier-EUI-Organizationally-Unique-Identifier-OUI-and-Company-ID-CID)</sup> IEEE 还定义了 EUI-64，随着 IEEE 802 技术被广泛采用，64 位扩展格式在 IEEE 802 框架下得以启用。<sup>[11](https://standards-support.ieee.org/hc/en-us/articles/4888705676564-Guidelines-for-Use-of-Extended-Unique-Identifier-EUI-Organizationally-Unique-Identifier-OUI-and-Company-ID-CID)</sup><sup> • </sup><sup>[9](https://datatracker.ietf.org/doc/html/rfc9797)</sup>

## 历史

48 位地址可追溯至以太网的商业标准化。以太网规范 1.0 版于 1980 年由[数字设备公司](https://www.edgepedia.org/zh/digital-equipment-corporation)、英特尔和施乐组成的 DIX 联盟发布，允许任何厂商在自己的硬件中使用该规范。<sup>[12](https://www.tomshardware.com/networking/the-ethernet-spec-was-first-drafted-on-this-day-in-1980-dec-intel-and-xerox-defined-the-standard-several-years-before-the-internet-existed)</sup> 1983 年 6 月，以太网被 IEEE 802 局域网标准委员会采纳为 IEEE 标准。<sup>[13](https://standards.ieee.org/beyond-standards/ethernet-50th-anniversary/)</sup> 为保持统一，48 位寻址方案被沿用到后续的 802 标准中，如[令牌环](https://www.edgepedia.org/zh/token-ring)网以及最终的 Wi-Fi（802.11）；这就是 Wi-Fi 适配器和以太网端口上的地址看起来相似并占据共同地址空间的原因。<sup>[14](https://macadress.com/learn/history-of-the-mac-address)</sup>

地址空间中用于本地管理的那一半后来得到了结构化。通过 IEEE Std 802c-2017，本地地址空间在结构化本地地址计划（SLAP）下获得了正式结构，将其划分为服务于不同分配目的的特定象限，而非任其不受管制；根据该修正案，一个本地地址范围保留给使用 IEEE 注册管理机构发放的公司标识符（CID）的协议，另一个范围保留给本地管理员分配。<sup>[14](https://macadress.com/learn/history-of-the-mac-address)</sup><sup> • </sup><sup>[15](https://www.ieee802.org/1/pages/802c.html)</sup>

## 在交换和地址解析中的作用

**交换。** 第二层交换机维护 MAC 地址表以高效转发帧。当帧进入交换机时，交换机将源 MAC 地址与接收该帧的端口关联；当帧的目的 MAC 地址不在表中时，交换机将帧泛洪到同一 VLAN 的所有端口（接收端口除外），当目的站回复时，其地址和端口被添加到表中。<sup>[6](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/15-4SY/config_guide/sup6T/15_3_sy_swcg_6T/layer2.pdf)</sup> 条目在配置的闲置期后老化失效。<sup>[6](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/15-4SY/config_guide/sup6T/15_3_sy_swcg_6T/layer2.pdf)</sup>

**地址解析。** IP 网络需要一种将协议地址映射到 MAC 地址的方法。[地址解析协议](https://www.edgepedia.org/zh/address-resolution-protocol)由 D. Plummer 于 1982 年 11 月作为 RFC 826 发布，将 IP 地址等协议地址转换为 48 位以太网地址以便传输。<sup>[4](https://www.rfc-editor.org/info/rfc826/)</sup> 对于 IPv6，邻居发现协议确定所连接链路上邻居的链路层地址、发现路由器、跟踪可达性并检测链路层地址变化；它相当于 IPv4 中 ARP、ICMP 路由器发现和 ICMP 重定向几种协议功能的组合。<sup>[5](https://www.rfc-editor.org/info/rfc4861/)</sup> 多层路由器和 Wi-Fi 接入点依赖 ARP 和 NDP 来构建用于数据包转发的 MAC 到 IP 表。<sup>[9](https://datatracker.ietf.org/doc/html/rfc9797)</sup>

在大规模场景下，大型第二层域使这些机制承受压力。可扩展地址解析协议（SARP）是 IETF 的一项实验，于 2015 年作为 RFC 7586 发布并于 2017 年结束，其做法是让交换机侦听并安装（IP，MAC 地址）代理表，使数据中心站点内的所有主机在其他站点看来只有一个 MAC 地址，从而显著减小交换机 MAC 地址表规模，并减少地址解析组播流量。<sup>[16](https://www.rfc-editor.org/rfc/rfc9898.html)</sup> 在制造商无法或无需预分配链路层地址的情况下，RFC 8947 定义了基于 DHCPv6 的分配机制。<sup>[17](https://www.ietf.org/ietf-ftp/rfc/rfc8947.pdf)</sup>

## 隐私与随机化

由于全局管理的 MAC 地址是全局唯一的，且在共享介质上以明文传输，只需简单观察介质即可追踪设备；在 802.11 网络中，站点在扫描时的探测请求帧中以及关联到接入点后的帧传输中都会暴露其 MAC 地址。<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup> U/L 位使一种对策成为可能：设备可以生成本地管理的随机地址而无需任何全局协调，从而将全局唯一标识符与设备解耦。<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup>

主要平台已采纳此做法。从 Android 8.0 起，Android 设备在未关联时探测新网络时使用随机化 MAC 地址；Android 9 增加了连接时随机化的开发者选项；[Android 10](https://www.edgepedia.org/zh/android-10) 在客户端模式、SoftAp 和 [Wi-Fi Direct](https://www.edgepedia.org/zh/wi-fi-direct) 下默认启用随机化。<sup>[7](https://source.android.com/docs/core/connect/wifi-mac-randomization?authuser=53)</sup> Apple 平台在未与网络关联时执行 Wi-Fi 扫描时使用随机化 MAC 地址，在装有 iOS 14、iPadOS 14、macOS 14、visionOS 1、watchOS 7 或更高版本的设备上，设备在连接网络时可以用唯一的随机 Wi-Fi 地址标识自身；Apple 还随机化序列号和用于加扰的种子值以缓解指纹识别。<sup>[18](https://support.apple.com/en-ie/guide/security/secb9cb3140c/web)</sup>

随机化并非完全的屏障。2021 年发表在《隐私增强技术论文集》上的一项研究测试了 160 款手机型号，发现尽管装有更新操作系统的非常新的手机通常能提供高度隐私保护，但许多广泛使用的手机并不能有效防止追踪。<sup>[19](https://petsymposium.org/popets/2021/popets-2021-0042.php)</sup> 对 Wi-Fi 探测请求的研究表明，探测请求模板包含足够的信息，可以完全不依赖 MAC 地址来追踪或重新识别用户。<sup>[20](https://www.sciencedirect.com/science/article/pii/S014036642500324X)</sup> 在 DNS 中发布 EUI-48 地址也带来类似风险：RFC 7043 建议不应在公共 DNS 中发布 EUI-48 或 EUI-64 地址，因为发布可能便于追踪用户以及对已部署设备进行 MAC 克隆攻击。<sup>[21](https://datatracker.ietf.org/doc/html/rfc7043)</sup>

## 运营影响与安全

使 MAC 地址作为标识符有用的持久性，也意味着网络在设计时假设了稳定的 MAC 到设备映射，而随机化可能打破这一假设。<sup>[9](https://datatracker.ietf.org/doc/html/rfc9797)</sup> 接入点和控制器使用 MAC 地址来验证设备连接上下文，包括认证状态、服务质量或安全配置文件以及加密密钥材料；当设备更改其 MAC 地址时，该上下文必须重建并重新启动新会话，这会中断音频和视频等实时流。<sup>[9](https://datatracker.ietf.org/doc/html/rfc9797)</sup> DHCPv4 服务器可能失去对有效地址分配的跟踪并面临地址池耗尽，激进的随机化可能耗尽第二层交换机有限的 MAC 地址缓存；Linux MAC 地址缓存的默认超时为 300 秒，因此新条目创建速度快于旧条目老化速度可能导致意外的拒绝服务状况。<sup>[9](https://datatracker.ietf.org/doc/html/rfc9797)</sup> RFC 9724 编录了由此产生的选择策略，从按厂商 OUI 的地址到按网络、按时间段和按会话生成的地址。<sup>[3](https://datatracker.ietf.org/doc/html/rfc9724)</sup>

MAC 地址还带有固有的安全局限。它们提供的是扁平地址空间，没有可用于本地网段之外路由的层次信息；它们通常被烧录在[网络接口控制器](https://www.edgepedia.org/zh/network-interface-controller)中；它们容易受到欺骗攻击（恶意行为者冒充另一台设备）和 MAC 泛洪攻击（淹没交换机的 MAC 地址表）。<sup>[10](https://www.cisco.com/c/en/us/td/docs/switches/lan/c9000/lyr2-fwd/cdp-lldp-mac-udld/cdp-lldp-mac-udld-configuration-guide/configure-mac.html)</sup> MAC 认证绕过通过 MAC 地址认证设备，但可以通过伪造有效设备的 MAC 地址来攻破，而且它认证的是设备而非用户。<sup>[22](https://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/Security/TrustSec_1-99/MAB/MAB_Dep_Guide.html)</sup> 当 MAC 地址被绑定到 X.509 证书中时，RFC 10031 要求证书颁发机构验证订阅者合法控制所声称的地址，并考虑到欺骗的可能性。<sup>[2](https://datatracker.ietf.org/doc/rfc10031/)</sup>

## References

1. [RFC 9542: IANA Considerations and IETF Protocol and Documentation Usage for IEEE 802 Parameters, RFC Editor (April 2024)](https://www.rfc-editor.org/rfc/rfc9542.pdf)
2. [RFC 10031: Media Access Control (MAC) Addresses in X.509 Certificates, IETF](https://datatracker.ietf.org/doc/rfc10031/)
3. [RFC 9724: State of Affairs for Randomized and Changing Media Access Control (MAC) Addresses, IETF (March 2025)](https://datatracker.ietf.org/doc/html/rfc9724)
4. [RFC 826: An Ethernet Address Resolution Protocol, RFC Editor (November 1982)](https://www.rfc-editor.org/info/rfc826/)
5. [RFC 4861: Neighbor Discovery for IP version 6 (IPv6), RFC Editor (September 2007)](https://www.rfc-editor.org/info/rfc4861/)
6. [Layer 2 LAN Port Configuration, Cisco Catalyst 6500 Supervisor Engine 6T Software Configuration Guide](https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst6500/ios/15-4SY/config_guide/sup6T/15_3_sy_swcg_6T/layer2.pdf)
7. [Implement MAC randomization, Android Open Source Project](https://source.android.com/docs/core/connect/wifi-mac-randomization?authuser=53)
8. [RFC 5342: IANA and IETF Use of IEEE 802 Parameters, RFC Editor (September 2008)](https://www.rfc-editor.org/rfc/rfc5342.html)
9. [RFC 9797: Randomized and Changing Media Access Control (MAC) Addresses: Context, Network Impacts, and Use Cases, IETF (June 2025)](https://datatracker.ietf.org/doc/html/rfc9797)
10. [CDP, LLDP, MAC, and UDLD Configuration Guide: Configure MAC, Cisco IOS XE 17](https://www.cisco.com/c/en/us/td/docs/switches/lan/c9000/lyr2-fwd/cdp-lldp-mac-udld/cdp-lldp-mac-udld-configuration-guide/configure-mac.html)
11. [Guidelines for Use of Extended Unique Identifier (EUI), Organizationally Unique Identifier (OUI), and Company ID (CID), IEEE](https://standards-support.ieee.org/hc/en-us/articles/4888705676564-Guidelines-for-Use-of-Extended-Unique-Identifier-EUI-Organizationally-Unique-Identifier-OUI-and-Company-ID-CID)
12. [The Ethernet spec was first drafted on this day in 1980, Tom's Hardware](https://www.tomshardware.com/networking/the-ethernet-spec-was-first-drafted-on-this-day-in-1980-dec-intel-and-xerox-defined-the-standard-several-years-before-the-internet-existed)
13. [Ethernet Through the Years: Celebrating the Technology's 50th Year of Innovation, IEEE SA](https://standards.ieee.org/beyond-standards/ethernet-50th-anniversary/)
14. [A brief history of the MAC address, macadress](https://macadress.com/learn/history-of-the-mac-address)
15. [IEEE 802.1: 802c - Local Medium Access Control (MAC) Address Usage](https://www.ieee802.org/1/pages/802c.html)
16. [RFC 9898: Neighbor Discovery Considerations in IPv6 Deployments, RFC Editor](https://www.rfc-editor.org/rfc/rfc9898.html)
17. [RFC 8947: Link-Layer Address Assignment Mechanism for DHCPv6, IETF (December 2020)](https://www.ietf.org/ietf-ftp/rfc/rfc8947.pdf)
18. [Privacy features when connecting to wireless networks, Apple Platform Security Support](https://support.apple.com/en-ie/guide/security/secb9cb3140c/web)
19. [Fenske, E. et al. (2021). Three Years Later: A Study of MAC Address Randomization In Mobile Devices And When It Succeeds. PoPETs 2021(3):164-181](https://petsymposium.org/popets/2021/popets-2021-0042.php)
20. [Vogel, D. et al. (2026). I still know you were here: Leveraging probe request templates for identifying Wi-Fi devices at scale. Computer Communications 246](https://www.sciencedirect.com/science/article/pii/S014036642500324X)
21. [RFC 7043: Resource Records for EUI-48 and EUI-64 Addresses in the DNS, IETF (October 2013)](https://datatracker.ietf.org/doc/html/rfc7043)
22. [MAC Authentication Bypass Deployment Guide, Cisco](https://www.cisco.com/c/en/us/td/docs/solutions/Enterprise/Security/TrustSec_1-99/MAB/MAB_Dep_Guide.html)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 网络与安全 › Networking fundamentals and architecture › Routing and addressing › Layer-2 and MAC addressing

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/mac-address

English original: https://www.edgepedia.org/mac-address
