I have a Debian workstation with two interfaces: the ethernet jack attached to the motherboard (eth0), and a USB to ethernet adapter (eth6). eth0 connects to the internet, while eth6 connects to some special equipment only accessible over ethernet.

When the workstation starts, it connects to eth6 by default; when this happens the workstation cannot reach the internet and I must choose to connect to eth0 from the network manager. I would like it to connect to eth0 by default. How can I do this?


You just need to set the default gateway to the correct interface.

It should be configured in your GUI (Network Manager for example) or if you feel a bit geeky, you can configure it in your /etc/network/interfaces

This is a minimal configuration example for your /etc/network/interfaces file:

auto eth0
iface eth0 inet static

You need to replace the values with your personal network settings. Make sure not to set two gateways at the same time. This will cause problems and is only possible if you use different routing tables.

Edit: Don't use DHCP on eth6 should work as well. Configure just an IP address in your Network Manager and leave eth0 as it is.


Supposing you've got DHCP on both interfaces:

  1. Right click on the Network Manager tray icon
  2. Choose Edit Connections...
  3. Double click your eth6 connection
  4. In the IPv4 Settings tab choose Automatic (DHCP) address only
  5. Close the window clicking Save

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.