為什麼需要乙太網/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
  • 閱讀 ( 35 )
  • 分類:網際網路

你可能感興趣的文章

瞭解ip和mac地址:它們有什麼好處?

...的地址,但它們幾乎都被佔用了,而且正在耗盡。這就是為什麼全世界都在向IPv6遷移,其中有320多個尚未建立(!)可能的IPv6地址總數。如果你不知道什麼是未成年,它看起來是這樣的: ...

  • 發佈於 2021-03-13 11:32
  • 閲讀 ( 51 )

網路101:乙太網、區域網及其工作原理

... 什麼是區域網(a lan)? ...

  • 發佈於 2021-03-14 04:20
  • 閲讀 ( 51 )

如何直接連線到樹莓皮沒有網際網路

... 你什麼時候可以用這個 ...

  • 發佈於 2021-03-16 08:17
  • 閲讀 ( 51 )

mac無法連線到wi-fi?恢復線上的9個步驟

...路或路由器沒有問題,那麼在繼續之前,有幾個基本步驟需要檢查。 ...

  • 發佈於 2021-03-18 07:41
  • 閲讀 ( 58 )

適用於mac電腦的7款最佳thunderbolt配件

... 瞭解更多有關為什麼您需要立即開始使用Thunderbolt 3的資訊。 ...

  • 發佈於 2021-03-19 01:21
  • 閲讀 ( 55 )

什麼是遊戲路由器,它們值得購買嗎?

... 但是這些遊戲路由器和標準路由器到底有什麼不同呢?此外,它們的特徵真的重要嗎? ...

  • 發佈於 2021-03-22 12:27
  • 閲讀 ( 46 )

usb over ethernet:您不使用的最強大的系統

...擇那樣有效,但是嘿,如果你已經有了透過乙太網的USB,為什麼不使用它呢? ...

  • 發佈於 2021-03-26 11:31
  • 閲讀 ( 45 )

什麼是資料包丟失以及如何修復其原因?

...它會使您的連線變得雜亂無章。但是什麼是資料包丟失,為什麼它是一個問題呢? ...

  • 發佈於 2021-03-29 13:28
  • 閲讀 ( 46 )

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

...能有相同的地址,因為路由器不知道哪個是哪個。這就是為什麼你會看到這個訊息,這通常不會發生,除非你的路由器出了問題或你已經手動分配了一個重複的地址。 ...

  • 發佈於 2021-03-30 19:17
  • 閲讀 ( 53 )

如何加快playstation 4的下載速度

...能設計這種行為是為了優先考慮遊戲和其他軟體,這就是為什麼你可以從PSN下載物品,仍然玩線上遊戲。如果你急於下載完成,最好停止運行遊戲或應用程式,做點別的事情。 暫停並繼續下載 我們看到的另一個有用的技巧是暫...

  • 發佈於 2021-04-03 10:12
  • 閲讀 ( 91 )
xozz84810
xozz84810

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章

相關推薦