I'm on OS Sierra. This is (part of) what I get on ifconfig

    ether 98:01:a7:b4:91:63 
    inet6 fe80::4e:52ae:9fa8:2e6c%en0 prefixlen 64 secured scopeid 0x5 
    inet netmask 0xffffff00 broadcast
    nd6 options=201<PERFORMNUD,DAD>
    media: autoselect
    status: active
utun1: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1400
    inet --> netmask 0xffffffff

If I try to ping from en0 interface (command ping -S it works fine, but if I try to ping it from utun1 (command ping -S I get a timeout. Why is that?

Actually, I had a look at netstat and saw this:

Routing tables

Destination        Gateway            Flags        Refs      Use   Netif Expire      UHr            65      550   utun1   link#14            UCS             0        0   utun1    link#5             UCS             1        0     en0       98:1:a7:b4:91:63   UHLWI           0        9     lo0

Why do addresses and have such different configurations for the netif column? How do I change them? I'd like to change line to use netif lo0

  • I wouldn't expect this to work. It doesn't make sense to ping on some other interface than lo0 – Michael Hampton Nov 8 '18 at 20:51
  • @MichaelHampton The behavior I would expect is that -S specify a source address, not an interface. And the interface is chosen based on routing table towards the destination, in this case For that reason I would have expected identical behavior regardless of which local IP address is given to -S. The question is not whether it is supposed to work or not, but rather why giving another local IP address to -S changes the behavior. – kasperd Nov 8 '18 at 21:14
  • @kasperd Well it doesn't make any sense that way either. – Michael Hampton Nov 8 '18 at 21:18
  • also known as localhost is only available on the host itself through the lo interface. you cant reach it through any other interface, a nice of peace of information about here – Zina Nov 8 '18 at 21:25
  • 1
    I have tested it and can ping from my local interface, my en0 interface, my VirtualBox added interfaces, but NOT from a VPN interface. The reason would be that the tunnelled interface does go through the tunnel only, while all the "local" interfaces can reach as they reside on the same host. – Zina Nov 9 '18 at 19:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.