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 have a single network interface that I want to simultaneously support both DHCP as well as a static address. When the DHCP interface is able to get an IP address, everything seems to work fine. If there is no DHCP interface on the network, the syslog reports a timeout waiting for the DHCP server and then the static address on eth0:1 goes down. Anyone know how to keep the static alias up and running even if the primary interface fails to get a DHCP address?

Below is my interfaces file:

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp


auto eth0:0
iface eth0:0 inet static
name Ethernet alias LAN card
address 192.168.254.1
netmask 255.255.255.0
broadcast 192.168.254.255
network 192.168.254.0
share|improve this question
    
Should it be eth0:1 instead of eth0:0? –  jocull Dec 4 '13 at 3:26
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.