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 use Ubuntu, and I have many interfaces. eth0, which is my internet connection, and it gets its info from a DHCP-server totally outisde of my control.

I then have eth1,eth2,eth3 and eth4 which I have created a DHCP-server for.(ISC DHCP-Server)

It seems to work, and I even get an IP-address from the foreign DHCP-server on the internet facing interface.

However, for some reason it seems my gateway for eth0 became screwed after I installed my local DHCP-server for eth1-eth4. (I think so because I got an IP for eth0, and I can ping other stuff on the local network, but I cannot get access to the internet).

My eth0-specific info in /etc/network/interfaces: auto lo iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
  mtu 8192

auto eth2
iface eth2 inet static
  mtu 8192

My /etc/default/isc-dhcp-server:

INTERFACES="eth1 eth2 eth3 eth4"

So why does my local DHCP-server ruin the gateway for eth0, when I tell it not to listen to eth0? Anyone see the problem or what I can do to fix it?

The problem seems indeed to be the gateways. "netstat -nr" gives: --- 10.X.X.X ---- --- UG 0 0 0 eth3

It should have been 129.2XX.X.X UG 0 0 0 eth0

So for some reason, my local DHCP-server overrides the gateway I get from the network DHCP.

Edit: dhcp.conf looks like this(I included info only for eth1 subnet):

ddns-update-style none;

not authoritative;

subnet netmask { interface eth1; 
option domain-name ""; 
option domain-name-servers,; 
default-lease-time 600; 
max-lease-time 7200;
host camera1_1 { hardware ethernet 00:30:53:11:24:6E; fixed-address; }
host camera2_1 { hardware ethernet 00:30:53:10:16:70; fixed-address; } 

Also, it seems that the gateway is correctly set if I run "/etc/init.d/networking restart" in a terminal, but that's not helpful for me, I need the correct gateway to be set during startup, and i'd rather find the source of the problem

share|improve this question
what configuration do you have for eth1-eth4? – Serge Oct 16 '12 at 16:19
have you tried dpkg-reconfigure dhcp or apt-get install --reinstall dhcp3-server ?? – poz2k4444 Oct 16 '12 at 16:19
Alright, I added the configuration for eth1 and eth2, eth3 and eth4 is similar. However, eth1-eth4 seems to work fine, so does eth0. The problem seems to be that the gateways are screwed – Henrik Kjus Alstad Oct 16 '12 at 16:29
up vote 1 down vote accepted

So I found the solution. I had nothing to do with the DHCP-server. The reason the default gateway got changed was because of the gateway-arguments to the eth1, eth2 etc. Since I don't really need to specify a gateway for them I simply removed all gateway-stuff at /etc/network/interfaces.

share|improve this answer

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.