Can someone please explain ifconfig output in Mac OS X?

238

Solution 1

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.

Solution 2

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.

Solution 3

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)

Share:
238

Related videos on Youtube

maudulus
Author by

maudulus

Updated on September 18, 2022

Comments

  • maudulus
    maudulus almost 2 years

    I customized a codepen pen, which has prefix-free installed, and installed the prefix-free prefixfree.dynamic-dom.min.js, but the code is still not animating. What would I need to do to make this animate (not in codepen but after putting prefix-free in my code)?

    HTML:

    <html>
    <head>
       <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
       <style type="text/css"></style>
       <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script><script src="/javascripts/json2.js"></script>
       <link href="http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,700,300,600,800,400" rel="stylesheet" type="text/css">
       <script src="/javascripts/survey3_main.js"> </script><script src="/javascripts/prefixfree.dynamic-dom.min.js"> </script><script src="/javascripts/prefixFreePlugin.js"> </script>
       <link rel="stylesheet" href="/stylesheets/survey3style.css">
       <link rel="stylesheet" href="http://normalize-css.googlecode.com/svn/trunk/normalize.css">
    </head>
    <body>
     com/svn/trunk/normalize.css">
     <div id="pinDropDiv"> </div>
     <div id="pinHoldDiv">
       <div>
          <img width="75" height="75" title="" alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAZJREFUeNrsnO1tGkEQhveQ/4cUEAlXEFxAZKgAUkGgAocK4CoAKuCoIJcKOJQCoANflAYoIbPWxEIRYG5n3v1AHmnFD5u9vYd3Z2b3Zi8znu3Pw5c2fQypfabW5dY+8+8HantuW2rVp92vgwlkmWdATwxHYhbcklrpG1zmAdKU2uiCelztwNAWvqBlQFAzVlIbfA8v0AjYLDlYBMlOsx/UOp5dip2eY4K2R12gpQzqO33sAoAy7At3NIZR9MqiQa7YN8VgBSlsHCWsyEDBgGU3CgoCrCUENY8YlLURR+WwyqJBDDnqpWB9UlgVBBaB6nDUaycCy+Zi99Lk1XUazhMCZXisc+/KIlX16GNj0jTRdLxzVBXC/r+JHuAa0xPXwSgLoKqC2vrcr81BZKAccZ3V1dRnPSkNuGSHO740cPpbyXnSPX9Hw77BlcUR8FlhsBMCsBCsPTXcwEeXyNhEWUOFQY5dQbHS7Hc1MvIhehoOhAPM6WYL6V1yHwthNwM0LEl0qjU356ivie1T0EUPBoujoMhPAdKAXJKksg+GKKsjVFWpTYqno0RdUcIqDc4qn1PxWlgfBIPaAmEh+3aGJXnWh3xMVccI693eYWFg1ZGOvx0jrN++E8Ar7fHWpuEA2LdkvQpbSEvyma7CCuDcqkKS/+1RsKQ+awpQlbTPGgKLlha1dOGqWYPA+1oitfI9wXyWtDplzhU2UlBdBVU5uZUmsH4qhPmNBBh/d6OQMmzRsCqFGWRvcsfTqCmomdF7sOt0L02f7uyMvCb02MFe3D09qkWdGsWaL7qm05P4ps8N14qw7M2vuAqnOjE1HkEJrfOW0Z3DhRAPWXvgTF/F97Yayrc22M08H1Z6gaUUFUNaIamkaQxLYe87pK1DLKTXCYKqpQVtrrAWBrtdjLBc2oETLJ73y4RAHTQCk2Q/KyV1LTXO9zjDSkhdByOvjRArKxV1LbVOjYlgJaAuNVU1XkhfWPA+mzCHm96yiaQeTHsavg4q0rxqodmhCiyukqkig6V+KqylPLhYnH2pcfwEBot3JGJw9geEqrSVZbgUch8YVo46YN5KwVc0sErbqUNh8YHu/Jamn2qedSb30ny4cY19RdSuoqfh6+A9RscCDQoKi6Ojj2R17ysphpYc8RZ0gfZTvl6v4qM+awJMJ6BvCPEOi391hP/KffgpL9HwRHTsGb2DnZA3gkQDi4GN6GMldegE6iFExuu1tFvh+Jv1T/1Qy4MsxEUdX8nyAurmX2N3Bph928i11cYqL7FIahqeWHDvrwTVDw0qqLJYXbZYze7ft98AFXrbJ7iy/uVg/Qs52DgWUMFhMbBza7ux76QzelhHKcXxHthC46T+TZuNkJxWRGl/BRgAtAd0cl+QnEwAAAAASUVORK5CYII=" class="pin">
          <div style="display: none;" class="pin-shadow"></div>
       </div>
    </div>
    </body>
    </html>
    

    CSS:

    #pinHoldDiv div {
        width: 77px;
        height: 77px;
        margin:25px auto;
    }
    
    .pin {
        margin: 0 auto;
        position: absolute;
        transform-origin: 50% 100%;
        animation-duration: .5s;
        animation-name: bounce;
    }
    
    @keyframes "bounce" {
     0% {
        opacity: 0;
        animation-timing-function: ease-out;
        transform: translateY(0) scale(0.9, 1.2);
     }
     11% {
        opacity: 1;
     }
     22% {
        transform: translateY(-13px) scale(0.9, 1.2);
        animation-timing-function: ease-in;
     }
     48% {
        transform: translateY(-9px);
        animation-timing-function: ease-in-out;
     }
     65% {
        transform: translateY(0) scale(1.05, 0.83);
        animation-timing-function: ease-in-out;
     }
     72% {
        transform: translateY(0) scale(1.15,0.7);
        animation-timing-function: ease-out;
     }
     100% {
        transform: translateY(0) scale(1,1);
     }
    
    }
    
    .info {
      position: absolute;
      top:10px; right:10px;
      padding:5px;;
      background:rgba(0,0,0,.5);
      color:#FFF;
      font:12px sans-serif;
    }
    .pin-shadow{
      position:absolute;
      top:172px;
      margin-left:-.75em;/*half of width.*/
      left:50%;
      width:.01em;
      height:.5em;
      background-color:rgba(120,120,120,.5);
      border-radius:100%;
      -moz-animation:     pin-shadow 0.3s 0.3s forwards;
        -webkit-animation:  pin-shadow 0.3s 0.3s forwards;
      -o-animation:       pin-shadow 0.3s 0.3s forwards;
        animation:          pin-shadow 0.3s 0.3s forwards;
    }
    @-webkit-keyframes pin-shadow {
      0%{
        width:.01em;
        margin-left:-.005em;/*half of width.*/
      }
      10%{
        width:1.5em;
        margin-left:-.75em;
      }
      15%{
        width:1.1em;
        margin-left:-.55em;
      }
      20%{
        width:1.5em;
        margin-left:-.75em;
      }
      25%{
        width:1.2em;
        margin-left:-.6em;
      }
      30%{
        width:1.5em;
        margin-left:-.75em;
      }
      35%{
        width:1.3em;
        margin-left:-.65em;
      }
      40%{
        width:1.5em;
        margin-left:-.75em;
      }
      100%{
        width:1.5em;
        margin-left:-.75em;
      }
    }
    @-moz-keyframes pin-shadow {
      0%{
        width:.01em;
        margin-left:-.005em;/*half of width.*/
      }
      10%{
        width:1.5em;
        margin-left:-.75em;
      }
      15%{
        width:1.1em;
        margin-left:-.55em;
      }
      20%{
        width:1.5em;
        margin-left:-.75em;
      }
      25%{
        width:1.2em;
        margin-left:-.6em;
      }
      30%{
        width:1.5em;
        margin-left:-.75em;
      }
      35%{
        width:1.3em;
        margin-left:-.65em;
      }
      40%{
        width:1.5em;
        margin-left:-.75em;
      }
      100%{
        width:1.5em;
        margin-left:-.75em;
      }
    }
    @-o-keyframes pin-shadow {
      0%{
        width:.01em;
        margin-left:-.005em;/*half of width.*/
      }
      10%{
        width:1.5em;
        margin-left:-.75em;
      }
      15%{
        width:1.1em;
        margin-left:-.55em;
      }
      20%{
        width:1.5em;
        margin-left:-.75em;
      }
      25%{
        width:1.2em;
        margin-left:-.6em;
      }
      30%{
        width:1.5em;
        margin-left:-.75em;
      }
      35%{
        width:1.3em;
        margin-left:-.65em;
      }
      40%{
        width:1.5em;
        margin-left:-.75em;
      }
      100%{
        width:1.5em;
        margin-left:-.75em;
      }
    }
    @keyframes pin-shadow {
      0%{
        width:.01em;
        margin-left:-.005em;/*half of width.*/
      }
      10%{
        width:1.5em;
        margin-left:-.75em;
      }
      15%{
        width:1.1em;
        margin-left:-.55em;
      }
      20%{
        width:1.5em;
        margin-left:-.75em;
      }
      25%{
        width:1.2em;
        margin-left:-.6em;
      }
      30%{
        width:1.5em;
        margin-left:-.75em;
      }
      35%{
        width:1.3em;
        margin-left:-.65em;
      }
      40%{
        width:1.5em;
        margin-left:-.75em;
      }
      100%{
        width:1.5em;
        margin-left:-.75em;
      }
    }
    

    JS:

    $(function(){
        pin = $(".pin");
            $(document).click(function(e){
              pin.clone().appendTo("body").attr("style", "top: " + (e.pageY - 78) + "px; left: " + (e.pageX - 36.5) + "px;");
            pinshadow.clone().appendTo("body").attr("style", "top: " + (e.pageY-5) + "px; left: " + (e.pageX) + "px;");    
        });
        pinshadow = $(".pin-shadow");
            $(document).click(function(e){
            pinshadow.clone().appendTo("body").attr("style", "top: " + (e.pageY-5) + "px; left: " + (e.pageX) + "px;");
        });
    });
    

    You can see the pindrop animation working like it's supposed to here: http://codepen.io/maudulus/pen/ohFiH

  • Mark E. Haase
    Mark E. Haase about 13 years
    +1 Nice answer. Also, sometimes you'll see ppp0, which is also used for some VPN tunnels.
  • maudulus
    maudulus over 9 years
    prefix-free is in my pen now...the problem is that the animation doesn't work outside of the pen.
  • maudulus
    maudulus over 9 years
    The normalize was a typo. Changing the css from @keyframes "bounce" to @keyframes bounce doesn't make the animation work, however. Prefix-free is now added in code-pen, but the problem is that the animation doesn't work outside of the pen.
  • elzi
    elzi over 9 years
    Looks like you found the problem yourself then... prefix-free is not being included correctly. Here's a direct link to the codepen output frame: view-source:s.codepen.io/boomerang/… View the source and use it as a reference to how your markup should look.
  • maudulus
    maudulus over 9 years
    yes it is not. how do i include it correctly. I have followed the docs and it's all linked, including the jquery pluging, but not working.
  • CMS_95
    CMS_95 over 9 years
    You may need to use -moz- or -webkit- to do the animation in a regular browser window
  • Stephen Rodriguez
    Stephen Rodriguez over 9 years
    Can you organize everything into a codepen so I can make edits?
  • elzi
    elzi over 9 years
    Link me to a live page and I'd be happy to help further - but there's nothing left to debug at this point
  • maudulus
    maudulus over 9 years
    The source doesn't seem to have anything there @elzi
  • elzi
    elzi over 9 years
    Sorry - that link only works temporarily I realize. Try replacing your prefixfree.js with this: s.codepen.io/assets/libs/prefixfree.min.js
  • Dan Pritts
    Dan Pritts over 8 years
    Also, the osx VPN client creates a utun0 interface.
  • xdhmoore
    xdhmoore over 4 years
    Is there a master list somewhere?
  • Joel
    Joel about 4 years
    very helpful ive always wanted to know this command thank you!