Problem with dhcp-client on linux with multiple interfaces

Thomas Boehne tobox at gmx.de
Wed Aug 2 17:12:10 UTC 2006


Hello dhcp-gurus,

I have a NSLU2 box running Debian linux with one network interface
connected to an AVM Fritz!Box DSL-Router (which the DHCP Server). I am
using DHCP to configure eth0, and I added two aliases (eth0:fix and
eth0:fix2) with static IPs (this way I can connect to the NSLU2 at
home and in the office and always reach it at some fixed addresses,
while all other networking parameters are set by DHCP. After the
system boots, this is what ifconfig says (perfectly correct):

nslu2:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
          inet addr:192.168.178.25  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2449 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2009 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:256
          RX bytes:232121 (226.6 KiB)  TX bytes:691777 (675.5 KiB)

eth0:fix  Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
          inet addr:192.168.178.214  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:fix2 Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
          inet addr:10.10.62.214  Bcast:10.10.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:280 (280.0 b)  TX bytes:280 (280.0 b)

I noticed that the eth0:fix interface sometimes just vanished, and I
could not explain why. The output of ifconfig was exactly like above
except that the eth0:fix interface was missing. Since last week I
monitored the interface status, and it looks like the interface
vanished exactly when the DHCP lease was renewed:

daemon.log:
Aug  2 17:40:25 nslu2 dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
Aug  2 17:40:26 nslu2 dhclient: DHCPOFFER from 192.168.178.1
Aug  2 17:40:26 nslu2 dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Aug  2 17:40:26 nslu2 dhclient: DHCPACK from 192.168.178.1
Aug  2 17:40:26 nslu2 dhclient: bound to 192.168.178.25 -- renewal in 407003 seconds.

ifconfig.log:
Wed Aug  2 17:40:09 CEST 2006
eth0      Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
eth0:fix  Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
eth0:fix2 Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
Wed Aug  2 17:40:19 CEST 2006
eth0      Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
eth0:fix  Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
eth0:fix2 Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
Wed Aug  2 17:40:29 CEST 2006
eth0      Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
eth0:fix2 Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
Wed Aug  2 17:40:39 CEST 2006
eth0      Link encap:Ethernet  HWaddr 00:14:BF:66:71:43
eth0:fix2 Link encap:Ethernet  HWaddr 00:14:BF:66:71:43

Any ideas what is going wrong?

Regards
Thomas Boehne

Some more information that might help:

nslu2:~# uname -a
Linux nslu2 2.6.15-1-nslu2 #2 Tue Mar 7 17:36:32 UTC 2006 armv5tel GNU/Linux

nslu2:~# cat /etc/network/interfaces
auto lo eth0 eth0:fix eth0:fix2

iface lo inet loopback

iface eth0 inet dhcp

iface eth0:fix inet static
        address 192.168.178.214
        netmask 255.255.255.0
        network 192.168.178.0
        broadcast 192.168.178.255

iface eth0:fix2 inet static
        address 10.10.62.214
        netmask 255.255.0.0
        network 10.10.0.0
        broadcast 10.10.255.255

nslu2:~# egrep -v ^# /etc/dhcp3/dhclient.conf

send host-name "nslu2";
send dhcp-client-identifier 1:00:14:BF:66:71:43;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name,
        netbios-name-servers, netbios-scope, interface-mtu;

nslu2:~# dpkg -l dhcp* | egrep ^ii
ii  dhcp3-client     3.0.4-6        DHCP Client
ii  dhcp3-common     3.0.4-6        Common files used by all the dhcp3* packages



More information about the dhcp-users mailing list