0

I have a MacBook Pro (Retina, 13-inch, Late 2013) running macOS 10.12.1.

I know from reading another answer:

There's no eth0 on default configurations of OS X. By default, en0 and en1 are your physical network connections (wired and wireless LAN).

I know from the Linux Network Admintrator's Guide section 2.1:

These interface names are used for configuration purposes when you want to specify a particular physical device in a configuration command, and they have no meaning beyond this use.

In my case, I think the interfaces are actually named like:

  • en0 - wireless interface
  • en5 - physical interface

Because when I connect to my wireless network I see the following output from ifconfig:

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    ether 80:e6:50:0d:08:80
    inet6 fe80::89a:3fda:fa41:b241%en0 prefixlen 64 secured scopeid 0x4
    inet 10.8.209.254 netmask 0xfffff000 broadcast 10.8.223.255
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active

And when I plug in my usb-to-ethernet adapter I see an additional section in the ifconfig output:

en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    options=4<VLAN_MTU>
    ether ac:7f:3e:e6:08:75
    inet6 fe80::1087:37ec:78ca:c443%en5 prefixlen 64 secured scopeid 0xb
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect (100baseTX <full-duplex,flow-control>)
    status: active

When I unplug the adapter and type "what's my ip" into google I get the following ip address:

8.18.111.121

When I plug my adapter in, disable my wifi and ask google again what my ip address is I get:

206.16.32.199

There are many questions that come to mind:

  • When using WiFi, why does inet 10.8.209.254 netmask 0xfffff000 broadcast 10.8.223.255 not match 8.18.111.121?
  • Which one is my actual ip?
  • When using my adapter why is there no broadcast address like for WiFi?
  • Why doesn't inet6 fe80::1087:37ec:78ca:c443%en5 prefixlen 64 secured scopeid 0xb match 206.16.32.199?
  • What is the output from ifconfig in the en5 section telling me?
  • I'm curious, does your ifconfig en5 output change when you turn Wi-Fi off but keep the Ethernet connected? – Spiff Mar 21 '17 at 3:23
1

Google told you the WAN ip address - given by your Internet Service Provider (ISP) - which is assigned to the outside interface of your router.

You might get different results if...

  • you restarted your router and your ISP assigned another address or
  • your WiFi and "wired" connections are handled by different ISPs / routers (public Wifi?).

10.8.209.254 is a private class A network ip address. This one is assigned to your wireless interface en0 and probably given by your router. The router connects the private network (inside) with the internet (outside) and "hides" your internal ip addresses by Network Address Translation (NAT).

ifconfig shows that your wired adapter has no IPv4 but an IPv6 address. IPv6 doesn't define broadcast addresses:

IPv6 does not implement traditional IP broadcast, i.e. the transmission of a packet to all hosts on the attached link using a special broadcast address, and therefore does not define broadcast addresses. -- Wikipedia: IPv6

| improve this answer | |
1
  • When using WiFi, why does inet 10.8.209.254 netmask 0xfffff000 broadcast 10.8.223.255 not match 8.18.111.121?

This indicates your Wi-Fi connection is behind a "Network Address Translator" (NAT) gateway. Most "wireless routers" and other home gateway routers act as NATs. NAT gateways allow a range of private addresses (addresses starting with 10.x.x.x, 172.[16-31].x.x, or 192.168.x.x) to share one or more public routable addresses.

  • Which one is my actual ip?
  • 10.8.223.255 is your Wi-Fi interface's private address behind the NAT.
  • 8.18.111.121 is a publicly routable IP address on the public side of the NAT, that the NAT gateway makes it look like your traffic is coming from.

They're both "actual" in some sense. If someone on your same Wi-Fi network needs to know your IP address give them the private (10.x.x.x) one. If someone on some other network needs your IP address, give them the public one.

  • When using my adapter why is there no broadcast address like for WiFi?

There's no IPv4 broadcast address because there's no IPv4 address at all on that interface. If that interface is configured to use DHCP, it seems there's no DHCP server on that wired Ethernet network that you're connecting your USB Ethernet adapter to.

  • Why doesn't inet6 fe80::1087:37ec:78ca:c443%en5 prefixlen 64 secured scopeid 0xb match 206.16.32.199?

inet6 means IPv6. fe80::…%en5 means it's an IPv6 link-local address, which isn't routable off of the current link (meaning the local Ethernet LAN in this case).

From the information you've provided so far, the only way I could see that fe80:: address being the source address for what becomes the 206.16.32.199 traffic would be if there's a gateway doing "NAT64" (pronounced "nat six four") on that network. So the same idea of NAT, but where the private addresses are IPv6 link-local addresses, and the public addresses are IPv4 addresses.

  • What is the output from ifconfig in the en5 section telling me?

It's telling you that your Ethernet cable is connected to a 100BASE-TX hub or switch, and that apparently no DHCP server has been found on that network.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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