Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 am getting a static ip from provider. But in my Ubuntu 11.04 pc i have two reserved ethernet interface mostly both are like getting automatic dhcp IP as of now.

But i want my Ethernet interface 0 as static ip WAN. And Ethernet interface 1 as dhcp server.

How can i do this setup?

share|improve this question
Please clarify: Do you want to do 'internet connection sharing' with this setup? – aquaherd Oct 5 '11 at 22:01
up vote 1 down vote accepted

I think it should work this way: setup the two interfaces in /etc/network/interfaces. Install dhcp3-server package. After that, in the /etc/defaults/dhcp3-server configuration file, you can tell the DHCP server, on what interface(s) it should listen: INTERFACES="eth0". That's all!

share|improve this answer

Never tried to use both at the same time. I don't know if this is going to work...

but you can try this:

sudo -i
vi /etc/network/interfaces
iface eth0 inet static

auto eth1
iface eth1 inet dhcp

It's the first thing It came out from my head.

share|improve this answer
Don't you need sudo privileges to do 90% of that? – James Oct 5 '11 at 13:25
I assume you're going to do sudo -i – maniat1k Oct 5 '11 at 13:36
Never assume anything - always specify something that you need done. – James Oct 5 '11 at 13:47
you are right ... my mistake – maniat1k Oct 5 '11 at 19:14
The OP wants a DHCP-Server, not a client! – aquaherd Oct 5 '11 at 22:03

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.