1

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.
grekasius
  • 2,046
  • 11
  • 15

1 Answers1

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