Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So the configuration is a bit weird, from our internet provider we get an IP via DHCP, there's also a whole subnet that's routed to this IP.

I solved it by adding a second interface with the static IPs (normally you would put a router in between and lose 1 IP), so now to the problem:

Every time the DHCP lease expires and IP is renewed, the interface eth1:0 state is changed to down.

Configuration for eth1:

DEVICE=eth1
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
PEERDNS=no
BOOTPROTO=dhcp
DHCP_HOSTNAME=router.xxx.xxx

Configuration for eth1:0:

DEVICE=eth1:0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.255.248

I hope the solution is a simple option I forgot, thanks for any help!

dhclient version:

Internet Systems Consortium DHCP Client 4.1.1-P1
Copyright 2004-2010 Internet Systems Consortium.
share|improve this question

1 Answer 1

This problem can be solved via a dhclient hook script under /etc/dhcp/ in my case I named the file dhclient-eth1-up-hooks which is executed when eth1 is switched up.

Inside the script I have a simple

ifconfig eth1:0 inet xxx.xxx.xxx.xxx netmask 255.255.255.248
share|improve this answer

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.