51

When I do ifconfig on my Mac, I get a list of the following interfaces:

lo0
gif0
stf0
en0
fw0
en1
vmnet8
vmnet1

I wonder what each interface is. Also, which of these is the IP interface ? I don't see eth0 anywhere, which I assume is the standard interface name used by linux systems.

63

I wonder what each interface is.

  • lo0 = loopback
  • gif0 = Software Network Interface
  • stf0 = 6to4 tunnel interface
  • en0 = Ethernet 0
  • fw0 = Firewire
  • en1 = Ethernet 1
  • vmnet8 = Virtual Interface
  • vmnet1 = Virtual Interface

Something like that.

Also, which of these is the IP interface ?

There hasn't been "the" IP interface since many years ago. All of them can have IPv4 and/or IPv6 configured and running. The default one to use is defined by the routing table (in particular the default or 0.0.0.0, ::/0 entry).

I don't see eth0 anywhere, which I assume is the standard interface name used by linux systems.

Mac OS X is BSD, not Linux.

  • 3
    +1 Nice answer. Also, sometimes you'll see ppp0, which is also used for some VPN tunnels. – Mark E. Haase Apr 8 '11 at 0:59
  • 5
    Also, the osx VPN client creates a utun0 interface. – Dan Pritts Dec 1 '15 at 4:09
33

You can see the names that are used in System Preferences for some of the devices by running networksetup -listallhardwareports:

Hardware Port: HUAWEIMobile-
Device: HUAWEIMobile-Modem
Ethernet Address: N/A

Hardware Port: Bluetooth DUN
Device: Bluetooth-Modem
Ethernet Address: N/A

Hardware Port: Ethernet
Device: en0
Ethernet Address: a8:20:66:31:95:57

Hardware Port: MBBEthernet
Device: en5
Ethernet Address: 00:1e:10:1f:00:01

Hardware Port: Wi-Fi
Device: en1
Ethernet Address: 8c:2d:aa:33:03:e9

Hardware Port: Bluetooth PAN
Device: en4
Ethernet Address: 8c:2d:aa:33:03:ea

Hardware Port: Thunderbolt 1
Device: en2
Ethernet Address: 32:00:1b:25:92:c0

Hardware Port: Thunderbolt 2
Device: en3
Ethernet Address: 32:00:1b:25:92:c1

Hardware Port: Thunderbolt Bridge
Device: bridge0
Ethernet Address: N/A

VLAN Configurations
===================

networksetup -listnetworkserviceorder produces similar output but it displays "a list of network services in the order they are contacted for a connection" or it shows the services in the same order as System Preferences.

networksetup does not include devices such as the vmnet1 and vmnet8 devices used by VMWare.

You can see further information about the en devices by running defaults read /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist:

{
    Interfaces =     (
                {
            Active = 1;
            "BSD Name" = en0;
            IOBuiltin = 1;
            IOInterfaceNamePrefix = en;
            IOInterfaceType = 6;
            IOInterfaceUnit = 0;
            IOMACAddress = <a8206631 9557>;
            IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP03@1C,2/IOPP/GIGE@0/BCM5701Enet/en0";
            SCNetworkInterfaceInfo =             {
                UserDefinedName = Ethernet;
            };
            SCNetworkInterfaceType = Ethernet;
        },
                {
            Active = 1;
            "BSD Name" = en1;
            IOBuiltin = 1;
            IOInterfaceNamePrefix = en;
            IOInterfaceType = 6;
            IOInterfaceUnit = 1;
            IOMACAddress = <8c2daa33 03e9>;
            IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP04@1C,3/IOPP/ARPT@0/AirPort_Brcm4360/en1";
            SCNetworkInterfaceInfo =             {
                UserDefinedName = "Wi-Fi";
            };
            SCNetworkInterfaceType = IEEE80211;
        },
                {
            Active = 1;
            "BSD Name" = en2;
            IOBuiltin = 1;
            IOInterfaceNamePrefix = en;
            IOInterfaceType = 6;
            IOInterfaceUnit = 2;
            IOMACAddress = <32001b25 92c0>;
            IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP05@1C,4/IOPP/UPSB@0/IOPP/DSB0@0/IOPP/NHI0@0/AppleThunderboltHAL/AppleThunderboltNHIType2/IOThunderboltController/IOThunderboltLocalNode/AppleThunderboltIPService/AppleThunderboltIPPort/en2";
            SCNetworkInterfaceInfo =             {
                UserDefinedName = "Thunderbolt 1";
            };
            SCNetworkInterfaceType = Ethernet;
        },
                {
            Active = 1;
            "BSD Name" = en3;
            IOBuiltin = 1;
            IOInterfaceNamePrefix = en;
            IOInterfaceType = 6;
            IOInterfaceUnit = 3;
            IOMACAddress = <32001b25 92c1>;
            IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/RP05@1C,4/IOPP/UPSB@0/IOPP/DSB0@0/IOPP/NHI0@0/AppleThunderboltHAL/AppleThunderboltNHIType2/IOThunderboltController/IOThunderboltLocalNode/AppleThunderboltIPService/AppleThunderboltIPPort/en3";
            SCNetworkInterfaceInfo =             {
                UserDefinedName = "Thunderbolt 2";
            };
            SCNetworkInterfaceType = Ethernet;
        },
                {
            "BSD Name" = en4;
            IOBuiltin = 0;
            IOInterfaceNamePrefix = en;
            IOInterfaceType = 6;
            IOInterfaceUnit = 4;
            IOMACAddress = <8c2daa33 03ea>;
            IOPathMatch = "Migrated_From: IOService:/IOResources/IOUserEthernetResource/IOUserEthernetResourceUserClient/IOUserEthernetController/en2";
            SCNetworkInterfaceInfo =             {
                UserDefinedName = "Bluetooth PAN";
            };
            SCNetworkInterfaceType = Ethernet;
        },
                {
            Active = 1;
            "BSD Name" = en5;
            IOBuiltin = 0;
            IOInterfaceNamePrefix = en;
            IOInterfaceType = 6;
            IOInterfaceUnit = 5;
            IOMACAddress = <001e101f 0001>;
            IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/EHC1@1D/AppleUSBEHCI/HUAWEI Mobile@1d110000/IOUSBInterface@4/HuaweiDataCardECMData/en5";
            SCNetworkInterfaceInfo =             {
                "USB Product Name" = "HUAWEI Mobile";
                UserDefinedName = MBBEthernet;
                idProduct = 5382;
                idVendor = 4817;
            };
            SCNetworkInterfaceType = Ethernet;
        }
    );
    Model = "iMac13,1";
}

In addition to what iklier said about the device name for Wi-Fi being en0 in laptops without an ethernet port and en1 in Macs with a single ethernet port, it is also en2 in at least some Mac Pros with two ethernet ports.

15

On older Apple portables, en0 is Ethernet and en1 is Airport(WiFi).

Older Mac Pro's, with Ethernet jack, will have en3 as well as they have two Ethernet NICs and Airport(WiFi).

In newer MacBooks without an Ethernet jack, en0 is Airport(WiFi).

vmnet# is usually created by VMs(Parallels/VMWare)

protected by JakeGould Oct 16 '15 at 6:14

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.