Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Debian based virtual machine running on VMWare Fusion with a OS X 10.9 host OS.

In VMWare Fusion I have a private network setup that allows the Mac and the VM to communicate without access to the outside world, this is for me so that I can SSH/SHCP into the server without packets going out to a router. This is necessary for me so I can work with the VM when I'm not on an external network, such as when I'm on a plane or out and about.

The private network configuration in VMWare

In addition to the private network I would like to have the VM attached to a public network which I may enable or disable from time to time. Obviously having the VM able to reach the Internet may be necessary at time, so I configured the VM to have two network connections.

enter image description here

The first in the public network, which in VMWare is configured to be essentially whatever the Mac is connected to.

enter image description here

The second network is the private network.

enter image description here

This is the /etc/network/interfaces file I've written.

# The loopback network interface
auto lo
iface lo inet loopback

# The public network interface
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

# The private network interface
auto eth1
allow-hotplug eth1
iface eth1 inet static

As far as I can tell, this should work just fine but my VM cannot ping, however oddly enough it seems to be able to resolve to it's IP just fine.

I'm sure this is something simple, but I need help, thanks in advance!

ping results:

cody@eureka:/$ ping
PING ( 56(84) bytes of data.
--- ping statistics ---
78 packets transmitted, 0 received, 100% packet loss, time 77025ms

ifconfig results:

cody@eureka:/$ sudo ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0c:29:a6:d9:b3  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::20c:29ff:fea6:d9b3/64 Scope:Link
          RX packets:553 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:105473 (103.0 KiB)  TX bytes:2318 (2.2 KiB)

eth1      Link encap:Ethernet  HWaddr 00:0c:29:a6:d9:bd  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::20c:29ff:fea6:d9bd/64 Scope:Link
          RX packets:601 errors:0 dropped:0 overruns:0 frame:0
          TX packets:461 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:53403 (52.1 KiB)  TX bytes:56656 (55.3 KiB)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
share|improve this question

migrated from Jun 24 '14 at 7:48

This question came from our site for system and network administrators.

up vote 2 down vote accepted

Remove the default gateway for eth1. Since that interface is local only you don't need a gateway.

A quick look at your route table will probably show that this is your problem.

share|improve this answer
This seems to have worked, thanks! Would you mind shortly elaborating as to why this worked? – Cody Smith Jun 22 '14 at 4:20
Default gateway is used to route packets for other networks. In this case packets to were routed via the gateway for the private network, and it didn't route the packets anywhere. So, after removing private network default gateway, a working default gateway was used. – Tero Kilkanen Jun 22 '14 at 7:28
Thanks a bunch, I thought that the gateway command was only used to route packets to that particular interface. I didn't realize that Debian would influence how Debian chose the nic to send the traffic through. – Cody Smith Jun 28 '14 at 9:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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