MAC 地址格式 解说 (转载)

article/2025/9/8 15:01:38
为了能使某网卡发出的帧被正确的网卡接收并处理,IEEE规定:每块网卡都有一个唯一的以太网地址----MAC地址(IEEE之所以将其称为MAC地址,是因为编址细节是由诸如802.3等MAC协议定义的)。MAC地址有48位(6字节),通常用十六进制来表示,如0000.0c12.3456是一个合法的以太网地址。
为确保MAC地址的唯一性,以太网卡制造商将MAC地址固化到网卡中。地址的前半部分(24位)标识网卡的制造商,由IEEE分配,称为OUI(组织唯一标识符);地址的后半部分由网卡制造商为其网卡分配一个唯一的编号。
用于标识某一块网卡的地址叫做“单播地址”(Unicast),该地址又叫做BIA(Burned-in Address)、UAA(Universally administered address)。无论使用BIA还是其它名称,很多人都将单播地址称为LAN地址、以太网地址或MAC地址。
“组地址”(group address)用于标识多个以太网卡,IEEE定义了两类以太网组地址:
● 广播地址(broadcast):标识LAN内所有的设备,值为FF-FF-FF-FF-FF-FF(即全为1时表示是广播地址);
● 组播地址(multicast):标识LAN中的部分设备。有些应用程序需要同多台设备通信,通过发送一个组播帧,所有想接收该应用程序发送的数据的设备都可以对这个帧进行处理,而其它的设备则忽略它。组播MAC地址的形式为:01-00-5e-xx-xx-xx,其中X可为任意值。组播地址似乎有复杂的规定,留着以后解决。。。。。如下图所示,6个字节的MAC地被分成两段,各三个字节,前面三个字节用来标识生产厂商(OUI-Organistionally Unique Identifier),后三个字节则用来标识这个厂商的不同的网络设备,这后三个字节的内容则由生产厂商按照自己的喜好来安排了,所以大的生产厂商就会去申请很多个OUI。

而这个6个字节中的最高有效字节中的最低有效位(b1)用来标识 unicast,和mulcast,即单播 和多播

而次最低有效位(b2)则用来标识 universally administered address

locally administered address

其中:universally administered address 是指烧录在固件中由厂商指定的地址,也也即大家通常所理解的MAC地址,

locally administered address 则是指由网络管理员为了加强自己对网络管理而指定的地址,由定义可知, locally administered address的U/L位要设置成1.所以 要表示 locally administered address的话,那
MAC 地址的第一个字节应该是
0x02, 因此不能够把MAC地址改成其它已经被厂商占用的 universally administered address了。但是通常情况下,很多人都不会遵守上面的约定。因为
MAC地址通常只能在局域网里发挥作用,因为在网络上传输,MAC地址是会被不断的替换掉的。所以即使你用了
已经被厂商占用的 universally administered address也不用担心会产生冲突。

说到着就更清楚了吧。说到底, locally administered address 和 universally administered address的区别在于是直接由生产的时候确定的还是由你自己修改过的。而它们两者理论是U/L位来区别的,但是在实际应用中,却没有人管这些。所以

locally administered address 的范围是:

 

1: 0000 0000 0001 - FFFF FFFF FFFD

 2:在1中定义的,还不要用第一个字节中的最低有效位为1的地址,因为它们是多播的

 3:同时还不要用全是0的和全是1的




 



U/L = 1

Locally administered address: the adapter uses a logical address (assigned by network administrator). U/L=1 may result in a hex code of 0x02 in the first byte. The U/L bit is always set when a logical address is assigned (even if the assigned address doesn't follow this convention). Therefore, it is impossible to imitate a burned-in address; but other logical address may be imitated at any time.


而且一旦 locally administered address地址由网管设定,它就会取代(overridding) universally administered address地址代发挥作用了。

至于为什么要设定 locally administered address 地址,则不清楚,留着以后再查。

 

Locally administered address主要有以下作用:

  http://www.irongeek.com/i.php?page=security/changemac


  1. To get past MAC address filtering on a router. Valid MAC addresses can be found by sniffing them and then the deviant user could assume the MAC of a valid host. Having two hosts on the same network can cause some network stability problems, but much of the time it's workable. This is one of the reasons why MIC Address filtering on a wireless router is pointless. An attacker can just sniff the MAC address out of the air while in monitor mode and set his WiFi NIC to use it. Interestingly, a lot of hotels use MAC filtering in their "pay to surf" schemes, so this method can be an instant in for cheap skate road warriors. 
  2. Sniffing other connections on the network. By assuming another host's MAC as their own they may receive packets not meant for them. However, ARP poisoning is generally a better method than MAC spoofing to accomplish this task.
  3. So as to keep their burned in MAC address out of IDS and security logs, thus keeping deviant behavior from being connected to their hardware. For example, two of the main things a DHCP server logs when it leases an IP to a client is the MAC address and host name. If you have a wireless router look around on it's web interface for where it logs this info. Luckily there are tools to randomize this information (MadMACs ).
  4. To pull off a denial of service attack, for instance assuming the MAC of the gateway to a sub net might cause traffic problems. Also, a lot of WiFi routers will lock up if a client tries to connect with the same MAC as the router's BSSID.

对于 l ocally administered address地址,有些交换机和网桥不会转发包含了这样地址的帧。

而单播和多播就不多说了。
Address details
20788636_1316690634FqrY.png
在上图中,我们可以看到U/L位和  G/I 位并不是在我们平时看到的样式的最高位和次高位,比如说 01-00-5e-xx-xx-xx(0000 0001-00-5e-xx-xx-xx)G/I位是1而不是0。之所以这样子设计,是因为我们的电脑发送数据是按位发送的(面向位数的,它要一位一位的接受数据),并且我们的大多PC机采用的是小端(Small-edian),因此要想让电脑先能接受到一个帧的G/I位和 U/L位,那就要把这两个位放到最高字节的最低有效位。这时就可以把它们轻松发出去了。


universally administered address

The original MAC address comes from the original Ethernet addressing scheme.This 48-bit address space contains potentially 248 or 281,474,976,710,656 possible MAC addresses.

All three numbering systems use the same format and differ only in the length of the identifier. Addresses can either be "universally administered addresses" or "locally administered addresses".

A universally administered address is uniquely assigned to a device by its manufacturer; these are sometimes called "burned-in addresses" (BIA). The first three (in transmission order) identify the organization that issued the identifier and are known as the (OUI).The following three (MAC-48 and EUI-48) or five (EUI-64) octets are assigned by that organization in nearly any manner they please, subject to the constraint of uniqueness. The IEEE expects the MAC-48 space to be exhausted no sooner than the year 2100;EUI-64s are not expected to run out in the foreseeable future.

A locally administered address is assigned to a device by a network administrator, overriding the burned-in address. Locally administered addresses do not contain OUIs.

Universally administered and locally administered addresses are distinguished by setting the second of the most significant byte of the address. If the bit is 0, the address is universally administered. If it is 1, the address is locally administered. In the example address 06-00-00-00-00-01 the most significant byte is 06 (hex), the binary form of which is 00000110, where the second least significant bit is 1. Therefore, it is a locally administered address.Consequently, this bit is 0 in all OUIs.

If the least significant bit of the most significant octet of an address is set to 0 (zero), the frame is meant to reach only one receiving .[ ] This type of transmission is called . A unicast frame is transmitted to all nodes within the , which typically ends at the nearest or . Only the node with the matching hardware MAC address will accept the frame; network frames with non-matching MAC-addresses are ignored, unless the device is in promiscuous mode .[ ]

If the least significant bit of the most significant address octet is set to 1, the packet will still be sent only once; however, NICs will choose to accept it based on different criteria than a matching MAC address: for example, based on a configurable list of accepted multicast MAC addresses. This is called addressing.


http://chatgpt.dhexx.cn/article/wgO1eyHV.shtml

相关文章

MAC地址简介

MAC 地址长 6 个字节共 48 位,通常使用十六进制数表示。(例如:52:54:00:3b:ca:3f) MAC 地址是什么? MAC 地址用于在网络中唯一标识一个网卡(即 MAC 地址只作用于网卡),每个网卡都有…

计算机网络 『MAC帧格式、MAC地址』

以太网最大传输单元MTU1500 B,以太网为不可靠传输。 MAC帧格式 MAC帧最小为64字节,目标地址源地址FCS(帧校验序列)占了18字节,所以IP数据报最小为46个字节 无效的MAC帧 ① 帧的长度不是整数个字节 ② 用收到的帧序…

excel 转换MAC地址格式方法

公式如下 MID(A1,1,2)&":"&MID(A1,3,2)&":"&MID(A1,6,2)&":"&MID(A1,8,2)&":"&MID(A1,11,2)&":"&MID(A1,13,2) A1是原mac所在位置,1是指从A1里面的第1个字符开始&…

excel 转换MAC地址格式

公式如下:MID(A1,1,2)&":"&MID(A1,3,2)&":"&MID(A1,5,2)&":"&MID(A1,7,2)&":"&MID(A1,9,2)&":"&MID(A1,11,2) MID(C1,1,4)&"-"&MID(C1,5,4)&&qu…

mac地址格式

(转载)http://blog.chinaunix.net/uid-20788636-id-2892320.html 为了能使某网卡发出的帧被正确的网卡接收并处理,IEEE规定:每块网卡都有一个唯一的以太网地址----MAC地址(IEEE之所以将其称为MAC地址,是因…

MAC 地址格式

原帖:不详 参考 http://en.wikipedia.org/wiki/MAC_address http://baike.baidu.com/view/69334.htm 为了能使某网卡发出的帧被正确的网卡接收并处理,IEEE规定:每块网卡都有一个唯一的以太网地址----MAC地址(IEEE之所以将其称…

计算机网络-MAC地址与以太网帧格式

一、MAC地址 计算机联网必需的硬件是安装在计算机上的网卡,通信中,用来标识主机身份的地址就是制作在网卡上的一个硬件地址,每块网卡在生产出来后,除了具有基本的功能外,都有一个全球唯一的编号来标识自己&#xff0c…

网络协议02 - Mac地址和IP地址

MAC地址 介绍 每一个网卡都要一个6字节的MAC地址(Media Access Control Address),该地址全球唯一,固化在网卡的ROM中,由IEEE802标准规定 前3个字节:组织唯一标识符,由IEEE的注册管理结构分配…

4.2.2 以太网技术(二) MAC地址和MAC帧的格式

4.2.2 以太网技术(二) MAC地址和MAC帧的格式 前面我们提出了两个问题中第一个是在总线式的广播信道中我们如何实现计算机之间一对一的通信?为了在总线上实现一对一的通信我们可以使每一台计算机都拥有一个和其他的计算机不同的地址&#xff…

MAC地址的分类和基本规范

一、MAC地址是什么? MAC地址(Media Access Control Address)是一种硬件地址,也称为物理地址,是用于区分网络中不同设备的唯一标识符。MAC地址长度为48位二进制数,通常以十六进制表示,由6个字节组…

MAC地址格式详解

以太网编址 在数据链路层,数据帧通常依赖于MAC地址来进行数据交换,它如同公网IP地址一样要求具有全球唯一性,这样才可以识别每一台主机。那么MAC地址如何做到这点?它的格式又是什么? MAC地址,英文全称Med…

关于数学模拟软件无法在win10环境下运行的解决办法

由于当时我电脑的操作系统是win7,所以可以直接使用1stopt,但后来放到win10的操作系统中时,1stopt无法打开。下面就来阐述以下解决办法。 (由于win8并非主流的操作系统,所以将不予叙述) 下载好“1stopt”右…

CTP平台之API

CTP平台: 综合交易平台CTP(Comprehensive Transaction Platform)是由上海期货信息技术有限公司(上海期货交易所的全资子公司)开发的期货交易平台,CTP平台以“新一代交易所系统”的核心技术为基础&#xff…

vnpy: 在Ubuntu系统上编译vn.py CTP接口

一、本人按照以下过程在docker容器里使用python3.7编译成功了,具体容器编译环境(python,gcc)如下图: 为以后sopt编译做准备吧 以下为参考:https://zhuanlan.zhihu.com/p/83732424 交易接口支持 目前2.0版…

讲 透Object.prototype.toString.call()

Object.prototype.toString.call() 这个方法是用来判断数据类型的,主要用到的知识点是原型,原型链,toString(),call toString 每个对象都有一个 toString() 方法,当该对象被表示为一个文本值时,或者一个对象以预期的…

DeepSort 解读

1 摘要 DeepSort是在Sort目标追踪基础上的改进。引入了在行人重识别数据集上离线训练的深度学习模型,在实时目标追踪过程中,提取目标的表观特征进行最近邻匹配,可以改善有遮挡情况下的目标追踪效果。同时,也减少了目标ID跳变的问…

总结SPOT系列卫星发射情况

SPOT系列卫星是法国空间研究中心自1978年开始立项研制的对地观测卫星系统,自1986年成功发射SPOT 1卫星以来,该系列卫星获得了大量全球卫星观测影像数据,应用于测图、土地利用等诸多领域。目前共发射SPOT 1-7共7颗卫星,其发射时间及…

hive 修改cluster by算法_疯狂Hive之DML操作(四)

DML操作 Load 在将数据加载到表中时,Hive不会进行任何转换。加载操作是将数据文件移动到与Hive表对应的位置的纯复制、移动操作。 语法结构: load data [local] inpath ‘filepath’ [overwrite] into table tablename [partition(par2val1,par2val2....…

RT-Thread Studio学习(十一)IIC

RT-Thread Studio学习(十一)IIC 一、简介二、新建RT-Thread项目并使用外部时钟三、设置AT24Cxx的驱动框架四、驱动代码移植五、测试六、总结 一、简介 本文将基于STM32F407ZGT芯片介绍如何在RT-Thread Studio开发环境下访问AT24C256模块。 操作系统&am…

从根上理解操作系统(二)

目录 进程 1、进程到底是什么 2、怎么知道时间片用完的 3、进程切换 4、进程初始化 5、任务堆栈 6、系统调用 进程 程序是一个可执行文件,而进程是一个执行中的程序实例,所以可以认为 进程 进程资源 执行序列 利用分时技术,在操作系统…