55

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

  • en0
  • en1
  • lo0
  • 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.

lollercoaster
  • 15,969
  • 35
  • 115
  • 173
  • 1
    I would imagine that you have a VWare installtion of some sort to get the vment* entries, (which are often the NAT or bridged interfaces of the VM server). There has been a similar question before http://superuser.com/questions/267660/mac-os-x-please-explain-ifconfig-output – Drav Sloan Jul 06 '11 at 03:59
  • apologies! you are right. i only searched SO – lollercoaster Jul 06 '11 at 04:09
  • Just closing as off-topic instead of migrating to avoid creating a duplicate. – Bill the Lizard Jul 06 '11 at 11:24

2 Answers2

57

There's no eth0 on default configuration of OS X. By default, en0 and en1 are your physical network connections (wired and wireless LAN). lo0 is the loopback interface. fw0 is the IP over Firewire interface; and vmnet interfaces are installed by VMware for network communication with virtual machines.

Mehrdad Afshari
  • 414,610
  • 91
  • 852
  • 789
  • 1
    so i could have 5 IP addresses? (if you count 127.0.0.1) I could appear as 5 computers to the network? – lollercoaster Jul 06 '11 at 04:07
  • 1
    @lollercoaster Yes. Those networks are not necessarily related, however. Moreover, you can create virtual interfaces on top of a physical interface and have multiple IP addresses on a single underlying adapter. – Mehrdad Afshari Jul 06 '11 at 04:10
  • @Merhrdad I see. Like virtual apache servers? And what do you mean by "Those networks are not necessarily related"? – lollercoaster Jul 06 '11 at 04:14
  • 1
    @lol 1) I'm not sure what exactly you mean by a virtual Apache server, but Apache can be multiplexed in two ways; first, hosting multiple domains on a single IP endpoint (IP and port combination,) which is implemented at HTTP level, not TCP (i.e. a single socket will listen for connections for all domains.); second, having Apache listen on different IP endpoints (either ports, or actual addresses). For the latter, one can leverage from having multiple addresses on a single network interface. -- 2) I mean, you'll have 5 addresses, but each of them is only valid on its respective network... – Mehrdad Afshari Jul 06 '11 at 04:21
  • 1
    ...(cont'd) implementation of multiple IPs over a single physical network interface is easy. IP is completely irrelevant in the Ethernet protocol. The kernel has to do a couple things: receive and process packets directed at multiple IP addresses and respond to ARP packets sent to those IP addresses with the same MAC address. – Mehrdad Afshari Jul 06 '11 at 04:24
21

en0 and en1 are your physical wired/wireless cards.

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

fw0 is for networking over firewire I believe.

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.

Matthew Scharley
  • 127,823
  • 52
  • 194
  • 222
  • oh ok. so why do I not get a local IP address (192.168.x.x) when I run `ifconfig`? I only see my actual IP 1x.196.x.x – lollercoaster Jul 06 '11 at 04:11
  • @lollercoaster Which interface are you looking at? Also, there are several different local IP ranges (10.x, 192.168.x and one other one too), you may simply be on a different private range. – Matthew Scharley Jul 06 '11 at 04:24