I'm running Ubuntu 13.04 32bit. I'm trying to accomplish something that I'm sure is simple. I have two NIC's installed on my PC.

  • eth0 - connected to office network with static IP.
  • eth1 - connected to Internet via router with DHCP.

I would like to have all regular Internet traffic going through eth1 and all internal office stuff going through eth0. From what I have read online so far, I understand that I need to setup a static route. Can anybody instruct me on how to do this?

2 Answers 2


The link to the geekstuff.com article is a very good explanation but does not describe exactly how to do this for a dual-homed scenario.


eth0 - office network with static IP address (10.x.x.x addresses); eth1 - Internet connection via router with DHCP (172.168.1.x addresses)

The following worked for me:

sudo route add -net netmask gw dev eth0
sudo route del default gw
sudo route add default gw dev et

In my case, Internet access was needed temporarily, so the appropriate files were not modified to make this permanent.

  • Thanks for the answer, what would be the appropriate files to change and which would be the changes? May 4, 2021 at 13:35

Take a look at this article. It describes a scenario similar to what you intend to implement and explains in brief some of the basic concepts behind networking.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .