MAC Address

news2024/10/5 12:48:00

文章目录

  • 1. 前言
  • 2. MAC Address
    • 2.1 MAC 地址格式
    • 2.2 Locally Administered MAC Address
      • 2.3 MAC 单播 和 多播
  • 3. 参考资料

1. 前言

限于作者能力水平,本文可能存在谬误,因此而给读者带来的损失,作者不做任何承诺。

2. MAC Address

2.1 MAC 地址格式

网络设备的 MAC 地址格式如下图:
在这里插入图片描述
MAC 共 6 个字节,前 3 个字节为制造商 ID,从 OUI 组织申请,后 3 个字节为厂商网络设备的唯一标识。

2.2 Locally Administered MAC Address

Locally Administered Address 是一类特殊的 MAC 地址,类似于 LAN IP 地址,如 10.0.0.0/8,192.168.0.0/16,172.16.0.0/16 等局域网地址。Locally Administered Address 是系统管理员自定义的网络设备 MAC,不会和各大厂商注册的 MAC 冲突,通常用于虚拟网卡(如网桥)等设备。

MAC 地址的第一个字节的第 2 位,即上图中的 U/L bit ,如果该 bit 为 0,则为 OUI 组织分配的各大厂商 MAC否则Locally Administered Address 。看下对 Locally Administered Address 的说明:

locally administered address

A locally administered MAC address is similar to a LAN IP address (10.0.0.0/8, 
172.16.0.0/12, and 192.168.0.0/16). You can make up your own locally administered 
address and can be sure that it will not collide with any hardware on your network that 
use a factory burned-in MAC address. Locally administered addresses are useful when 
creating virtual machines or virtual network interfaces.

The second bit of the first byte of a MAC address determines the type of OUI. If the bit 
is 0 then it is an OUI globally assigned by the IEEE; if the bit is 1 then it is a locally
administered MAC address.

Create a OUI by whatever scheme you like, then logically OR it with 02:00:00:00:00:00, and
then logically AND it with fe:ff:ff:ff:ff:ff, and you will have a locally administered 
address. The first OR pattern sets bit 2 of the first byte; the second AND pattern clears 
bit 1 of the first byte (unicast, not multicast).

The following MAC address pattern satisfies the OUI requirements:
4e:4f:41:48:00:00

2.3 MAC 单播 和 多播

在这里插入图片描述
上图中,MAC 的最高字节的 bit 0,如果该 bit 为 0,则是单播 MAC;否则多播 MAC。看下面的描述:

universally administered address 

The original IEEE 802 MAC address comes from the original Xerox 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 octets (in 
transmission order) identify the organization that issued the identifier and are known as 
the Organizationally Unique Identifier (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 least significant bit 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 NIC. This type of transmission 
is calledunicast . A unicast frame is transmitted to all nodes within the collision 
domain , which typically ends at the nearest network switch or router . 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 multicast addressing.

3. 参考资料

[1] Understanding MAC Addresses
[2] Identify a randomised (locally administered) MAC Address
[3] 给自己分一个 MAC地址–locally administered address
[4] MAC 地址格式
[5] Organizationally unique identifier
[6] MAC address

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1860599.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Java集合框架深度解析:Hashtable、HashMap与TreeMap的较量,哪个更适合你的项目?

引言 在Java编程世界中,集合是编程语言的重要组成部分。它们负责存储、组织和操作数据集合,是开发过程中不可或缺的工具。Java集合框架提供了丰富且功能强大的数据结构,而其中的Hashtable、HashMap和TreeMap是使用频率极高的三种实现。 本篇文…

2024年希望杯数学竞赛各年级100道练习题及答案

链接里面有无答案版本链接:https://pan.baidu.com/s/1nTIVJrTEWUzb0LJNo4mI_Q 提取码:0548 –来自百度网盘超级会员V7的分享 一年级 二年级 三年级 四年级 五年级 六年级 七年级 八年级

如何使得Macos的剪切板感知fileURL并当fileURL被执行paste 动作时 回调到某个监听的函数 从而来填充file content

问题及尝试: 我在做一个跨平台文件拷贝的功能,文件可能是从其他操作系统比如Linux 或者Windows 拷贝到Macos上, 但是我试过所有可以hook NSPasteboard的方法,确实没有找到可以监听macos 剪切板的方法,因为fileURL 确实…

网络设备框架

文章目录 前言一、主要流程二、Linux网络设备驱动架构1.概述2.读入数据 总结 前言 Linux中的Ethernet驱动框架涉及到网络设备驱动程序的多个方面,包括初始化、注册、数据传输以及与物理层(PHY)的交互。以下是网络设备驱动架构的概述&#xf…

Centos7虚拟机

Centos 7 安装 1 镜像下载1.1 官网下载1.2 阿里云镜像下载 2 环境的安装2.1 打开我们的虚拟机,点击文件进行新建2.2 选择典型之后,下一步2.3 选择稍会安装操作系统2.4 勾选Linux,并且选择CentOS 7的版本2.5 设定我们虚拟机的名称和安装位置2.…

VOSviewer分析知网文献

VOSviewer简介 VOSviewer 是一款用于构建和可视化科学文献计量网络的软件工具。它能够帮助用户分析和可视化期刊、研究人员或单个出版物之间的关系,这些关系可以基于引用、共引、共著或术语共现关系来构建。VOSviewer 还提供了文本挖掘功能,可以用来构建…

Python 爬虫从入门到入狱之路一

实际上爬虫一共就四个主要步骤: 明确目标 (要知道你准备在哪个范围或者网站去搜索)爬 (将所有的网站的内容全部爬下来)取 (去掉对我们没用处的数据)处理数据(按照我们想要的方式存储和使用) 我们在之前写的爬虫程序中,都只是获取…

fidder自动测试cookie脚本

前言 工作在使用fidder抓包时,经常需要找到一个请求携带的cookie中,真正校验了那些cookie,从而在代码中实现写入这些cookie的请求。这个过程除了根据经验快速过滤,就只能一个一个删除测试了。 所以我写了这个脚本,自动…

阿里云云服务器、ACR镜像服务、容器化实战:搭建企业应用

一、容器化基础知识 华为云免费试用服务器:https://activity.huaweicloud.com/free_test/index.html 阿里云docker容器教程:https://edu.aliyun.com/course/3111900/lesson/341807097 查询ip地址:www.ip138.com 二、容器化搭建企业应用实战 2…

如何选择和优化谷歌外贸关键词?

长尾关键词是关键,长尾关键词是指由三个或更多词组成的更具体、更详细的搜索词组。与单个关键词相比,长尾关键词虽然搜索量较低,但往往能带来更高的转化率,因为它们更能精准地反映用户的搜索意图和需求 使用长尾关键词有几个优势…

海南云亿商务咨询有限公司抖音带货怎么样?

在数字化浪潮席卷全球的今天,电商行业正迎来前所未有的发展机遇。特别是短视频平台如抖音的崛起,更是为电商行业注入了新的活力。海南云亿商务咨询有限公司,作为抖音电商服务的佼佼者,凭借其专业的团队和卓越的服务,助…

北邮《计算机网络》蒋老师思考题及答案-传输层

蒋yj老师yyds! 答案自制,仅供参考,欢迎质疑讨论 问题一览 传输层思考题P2P和E2E的区别使用socket的c/s模式通信,流控如何反映到编程模型三次握手解决什么问题举一个两次握手失败的例子为什么链路层是两次握手而非三次?…

HTML(24)——过渡

过渡 作用:可以为一个元素在不同的状态之间切换的时候添加过渡效果 属性名:transition(复合属性) 属性值:过渡的属性 花费时间(s) 提示: 过渡的属性可以是具体的CSS属性也可以为all(两个状态属性值不同的所有属性…

证件照制作工具有哪些?分享当下热门的证件照制作工具

无论是考证、出国旅游还是应聘,一张符合标准的证件照成了必备之物。 如果手头的证件照尺寸不符合要求,不必惊慌,现在有多种证件照制作软件可以帮助你迅速解决问题。 今天,本文就为大家分享几个证件照制作教程,让你的…

js小题3:构造函数介绍与普通函数对比

一、构造函数介绍: 在JavaScript中,构造函数是用于创建和初始化一个由new关键字生成的对象的特殊函数。构造函数的名字通常以大写字母开头,但这并不是JavaScript语法的一部分,而是一种约定俗成的命名规范,有助于区分构…

HTML基础入门知识

HTML基础使用 文章目录 HTML基础使用1、什么是HTML2、web标准4、HTML语法规则5、常用的标签标题标签段落标签换行标签文本格式化标签div和span标签图片标签路径链接标签注释 1、什么是HTML 什么是网页 网站是指在因特网上根据一定的规则,使用 HTML 等制作的用于展示…

国内有哪些比较优秀的wordpress主题?

WordPress作为全球最受欢迎的开源内容管理系统之一,拥有众多优质的主题供用户选择。那么国内有哪些比较优秀的wordpress主题呢?下面小编就和大家分享国内功能比较完善比较受欢迎的wordpress主题。 wordpress主题合集:WP主题-办公人导航https:…

202406最新manjaro安装sogou输入法解决方案(采用aur本地package+sogou deb包解决方案)

本地执行安装方法 1.拉取源码 git clone https://gitee.com/liushuai05/fcitx-sogoupinyin.git cd fcitx-sogoupinyin 2.获取sogou下载地址并替换到源码中 - 下载地址:https://pinyin.sogou.com/linux/ - 点击立即下载->x86_64->下载,然后右键复…

【数据结构(邓俊辉)学习笔记】二叉搜索树02——查找、插入和删除

文章目录 1.概述2. 查找2.1 查找:算法2.2 查找:理解2.3 查找:实现2.4 查找:语义 3. 插入3.1 插入:算法3.2 插入:实现 4. 删除4.1 删除:框架4.2 删除:单分支4.3 删除:双分…

数据库讲解---(数据库保护)【上】

目录 一.事务 1.1事务的概念【重要】 1.2事务的特性【重要】 1.2.1原子性(Atomicity) 1.2.2一致性(Consistency) 1.2.3隔离性(Isolation) 1.2.4持久性(Durability) 二.数据库恢复 2.1数据库系统的故障 2.1.1事务内部故障 2.1.2系统故障 2.1.3介质故障 2.1.4计算机…