How do I configure an interface to have *both* a DHCP address and a static address in Ubuntu?

Posted by Paul Hoffman on Server Fault See other posts from Server Fault or by Paul Hoffman
Published on 2011-02-06T04:13:18Z Indexed on 2011/02/06 7:27 UTC
Read the original article Hit count: 636

Filed under:
|
|

In a lab setup, I want eth0 on a Ubuntu server box to get a DHCP address for talking to the outside world, and I also want to assign it a static 10.x.y.z address for talking to other boxes on the local network that have 10.x.y.z addresses. I want to do this by editing /etc/network/interfaces.

The man page for /etc/network/interfaces is modeled after "here's a bunch of examples, I hope you can figure out the actual rules on your own". I don't see a way to give one interface two addresses using two different methods (static and dhcp), and initial fumbling didn't produce useful results.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about networking