为什么需要以太网/mac地址?

如果你对整个网络还不熟悉,那么当你第一次开始了解不同类型的地址以及它们是如何协同工作的时候,你会觉得有点不知所措。今天的超级用户问答旨在为好奇的读者澄清困惑。...

为什么需要以太网/mac地址?

如果你对整个网络还不熟悉,那么当你第一次开始了解不同类型的地址以及它们是如何协同工作的时候,你会觉得有点不知所措。今天的超级用户问答旨在为好奇的读者澄清困惑。

今天的问答环节是由SuperUser提供的,SuperUser是Stack Exchange的一个分支,是一个由社区驱动的问答网站分组。

图片由维基百科提供。

问题

超级用户读者user2449761想了解更多关于以太网/MAC地址的需求:

I do not understand why Ethernet/MAC addresses are needed. Surely all computers could just be connected to a unified network and use IP addresses to communicate?

For example, there is the following mechani** in Ethernet:

  • A computer with the IP address 192.168.1.1 (X.1) wants to send a packet to the address 192.168.1.2 (X.2).
  • X.1 uses ARP to get the MAC address of X.2.
  • To do so, X.1 needs to send a packet to all computers in the network and only one will answer.
  • X.1 gets a MAC address and sends the packet.

It would be simpler to just do it in one step:

  • X.1 sends a packet to all computers in the network and only X.2 will process it, the others will ignore it.

My other question is: Why are IP addresses needed if all devices have unique MAC addresses?

为什么需要以太网/MAC地址?

答案

超级用户贡献者Paul为我们提供了答案:

The different network layers are there to allow them to be swapped for different technologies. The two layers you are talking about here are Layers 2 and 3. Layer 2 in this scenario is Ethernet – from which MAC addresses arise, and Layer 3 is IP.

Ethernet only works at the local level between network devices connected to a broadcast network “data link”, whereas IP is a routable protocol and can target devices on remote networks.

The requirements for each of these layers is different. Ethernet specifies a family of technologies that allow packets to be sent and received between network devices, whereas IP defines a protocol that allows packets of data to traverse multiple networks.

Neither is reliant on the other, which is what gives networking its flexibility. For example, you may choose to connect to your Internet service using IP over Ethernet, but in your internal network, you might choose to use IP over paper (where someone writes down the contents of each packet and physically walks it over to another machine and types it in). Clearly this would not be particularly fast, but it would still be IP provided the person carrying around the bits of paper respected IP routing rules.

In the real world there are different data link protocols that you are already using (although their addressing schemes are the same): 802.3 – Ethernet, and 802.11 – Wi-Fi.

IP does not care what the underlying layer is. Equally, IP can be swapped out for different network layer protocols (provided it happens for all participants) such as Asynchronous Transfer Mode (ATM).

While there is nothing directly preventing the creation of a protocol that encompasses both Layers 2 and 3, it would be less flexible, less attractive, and therefore unlikely to be used.

请务必通过下面的链接阅读其他生动的讨论主题!


有什么要补充的解释吗?在评论中发出声音。想从其他精通技术的Stack Exchange用户那里了解更多答案吗?在这里查看完整的讨论主题。

  • 发表于 2021-04-11 04:47
  • 阅读 ( 213 )
  • 分类:互联网

你可能感兴趣的文章

了解ip和mac地址:它们有什么好处?

...的地址,但它们几乎都被占用了,而且正在耗尽。这就是为什么全世界都在向IPv6迁移,其中有320多个尚未建立(!)可能的IPv6地址总数。如果你不知道什么是未成年,它看起来是这样的: ...

  • 发布于 2021-03-13 11:32
  • 阅读 ( 291 )

mac无法连接到wi-fi?恢复在线的9个步骤

... 2仔细检查你的以太网电缆 ...

  • 发布于 2021-03-18 07:41
  • 阅读 ( 204 )

如何在mac上查找和更改ip地址

...能有相同的地址,因为路由器不知道哪个是哪个。这就是为什么你会看到这个消息,这通常不会发生,除非你的路由器出了问题或你已经手动分配了一个重复的地址。 ...

  • 发布于 2021-03-30 19:17
  • 阅读 ( 347 )

如何更新mac的ip地址(解决问题)

... 选择适当的网络并单击“高级”按钮。这适用于有线(以太网)和无线(Wi-Fi)连接。 下一个屏幕应默认为Wi-Fi选项卡。选择“TCP/IP”,就在它的右边。 单击“续订DHCP许可证”按钮,然后在续订完成后单击“确定”。单击此...

  • 发布于 2021-03-31 19:42
  • 阅读 ( 133 )

如何(以及为什么)在windows、linux和mac上更改mac地址

...“欺骗”这些地址并不难。下面是如何做到这一点,以及为什么你可能想。 连接到网络的每个网络接口(无论是路由器、无线设备还是计算机中的网卡)都有一个唯一的媒体访问控制(MAC)地址。这些MAC地址有时被称为物理地...

  • 发布于 2021-04-07 15:20
  • 阅读 ( 205 )

如何查找任何设备的ip地址、mac地址和其他网络连接详细信息

...用有线连接,请进入“设置”>“网络和Internet”>“以太网”。在右边,您将看到您的连接列表。单击所需的。 向下滚动一点到“属性”部分,你会找到你想要的信息。 windows 7、8、8.1和10 您可以在以前版本的Windows上通...

  • 发布于 2021-04-07 20:34
  • 阅读 ( 178 )

如何在mac上配置代理服务器

...”。如果要配置连接到有线网络时使用的代理,请单击“以太网”。 单击网络窗口右下角的“高级”按钮。 选择“代理”选项卡。您需要在此处启用一个或多个协议复选框来配置代理。 要让Mac检测是否需要代理并自动配置代...

  • 发布于 2021-04-08 07:40
  • 阅读 ( 187 )

如何在酒店房间使用谷歌chromecast?

...题:Chromecast无法导航身份验证过程。 相关:如何(以及为什么)在Windows、Linux和MAC上更改MAC地址 这是你必须发挥创造力的地方。认证过程几乎总是链接到连接到网络的设备的MAC地址。在Chromecast设置过程中,Chromecast的MAC地址显...

  • 发布于 2021-04-09 01:34
  • 阅读 ( 233 )

如何设置静态dhcp,使您的计算机的ip地址不会更改

...应该找到无线网卡的MAC,如果你用的是有线的,那么就用以太网卡。 只需在系统托盘中找到连接图标并单击即可。我的是无线的。 右键单击当前活动连接并单击状态。 单击“详细信息…”按钮。 此设备的MAC地址列为“物理...

  • 发布于 2021-04-09 19:09
  • 阅读 ( 166 )

如何在OSX上查找和更改您的mac地址

...aa:bb:cc:dd:ee:ff 这将为en0设置您的MAC地址。如果您的Mac也有以太网端口,那么您可能需要使用en1。 如何获得随机mac地址 如果你想要隐私,随机化你的MAC地址可能是最好的选择。此命令将自动执行: openssl rand -hex 6 | sed 's/\(..\)/\1:/g;...

  • 发布于 2021-04-10 10:37
  • 阅读 ( 185 )
xozz84810
xozz84810

0 篇文章

相关推荐