macos ifconfig 和接口

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6591375/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 08:08:36  来源:igfitidea点击:

ifconfig and interfaces

macosinterfaceipifconfig

提问by lollercoaster

just a question for my understanding. on my mac when I use ifconfigcommand on my mac I get the following interfaces:

只是我理解的一个问题。在我的 mac 上,当我ifconfig在我的 mac 上使用命令时,我得到以下界面:

  • en0
  • en1
  • lo0
  • fw0
  • vment0
  • vment1
  • en0
  • en1
  • fw0
  • vment0
  • vment1

I don't understand why there are so many. I understand that eth0 would be for LAN connections, and that en0 is the wireless connection. But macbook only has one airport..so why en1 as well? not sure what vments are for either.

我不明白为什么有这么多。我知道 eth0 将用于 LAN 连接,而 en0 是无线连接。但是 macbook 只有一个机场..那么为什么还有 en1 呢?也不知道 vments 是干什么用的。

采纳答案by Mehrdad Afshari

There's no eth0on default configuration of OS X. By default, en0and en1are your physical network connections (wired and wireless LAN). lo0is the loopback interface. fw0is the IP over Firewire interface; and vmnetinterfaces are installed by VMware for network communication with virtual machines.

有没有eth0在OS X上的默认配置缺省情况下,en0en1是你的物理网络连接(有线和无线LAN)。lo0是环回接口。fw0是 IP over Firewire 接口;和vmnet接口由 VMware 安装,用于与虚拟机进行网络通信。

回答by Matthew Scharley

en0and en1are your physical wired/wireless cards.

en0并且en1是您的物理有线/无线卡。

lo0is the loopback device, which is used for entirely internal communication, ie. between two applications both running on your PC.

lo0是环回设备,用于完全内部通信,即。在 PC 上运行的两个应用程序之间。

fw0is for networking over firewire I believe.

fw0我相信是用于通过火线联网。

vment*- is used by VMWare Fusion to provide networking to your virtual machines, and there's likely to be one per VM you have set up.

vment*- 由 VMWare Fusion 用于为您的虚拟机提供网络连接,并且您设置的每个 VM 可能有一个。