Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1

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? –  jrg 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. –  jrg 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
add comment

Your Answer

 
discard

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.