Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've got an Ubuntu guest VM in virtualbox. When I add a second network adapter that is host-only, I lose internet connectivity. All internt traffic gets sent through the second interface, instead of the first bridged interface.

Why this is happening and how do I correct it?

share|improve this question

closed as off topic by HopelessN00b, Zoredache, Hubert Kario, Michael Hampton, Scott Pack Oct 8 '12 at 1:57

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

Most likely you have the second adapter set for DHCP.

The adapter is getting a default gateway in addition to the IP address settings, and that default gateway is being used instead of the gateway for your bridged interface.

You could set your DHCP client to not request or use the gateway it receives. You may be able to adjust the metric. You could statically assign the address on your host-only interface, and simply not set a gateway.

share|improve this answer
thanks so much that was exactly it. i set it to static ip w/ no gateway and now net works. appreciate the help! – jadent Oct 4 '12 at 12:12

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