dhcpd: Network is unreachable.
 

Problem:

DHCP-daemon does not work.

Symptom:

You have a Linux server running as DHCP server (dhcpd). Some clients in the network shall use dynamic ip-adresses assigned by the Linux server, but this does not work and the following error message appears in "/var/log/messages":

dhcpd: DHCPDISCOVER from 00:60:97:8b:2a:32 via eth0
dhcpd: DHCPOFFER on 192.168.0.111 to 00:60:97:8b:2a:32 via eth0
dhcpd: sendpkt: Network is unreachable


If you check the routing table it might look like this:

[root@powerlink robert]# netstat -rn
Kernel IP routing table
Destination  Gateway   Genmask         Flags  MSS  Window  irtt   Iface
192.168.0.0  0.0.0.0   255.255.255.0  U       1500 0       0      eth0
127.0.0.0    0.0.0.0   255.0.0.0      U       3584 0       0      lo

Reason:

The DHCPD are answering on the broadcast adress 255.255.255.255, but for the subnet 255.255.255.0 there is no route, so the server can not reach that net. That's why the error says "Network is unreachable".

Solution:

As a workaround you can insert an extra route by running the following command:

/sbin/route add 255.255.255.255 netmask 0.0.0.0 dev eth0

This adds an extra route:

[root@powerlink robert]# netstat -rn
Kernel IP routing table
Destination     Gateway  Genmask          Flags  MSS  Window  irtt   Iface

255.255.255.255 0.0.0.0  255.255.255.255 U       1500 0       0      eth0
192.168.0.0     0.0.0.0  255.255.255.0   U       1500 0       0      eth0
127.0.0.0       0.0.0.0  255.0.0.0       U       3584 0       0      lo


 
 
Design 19©96-20©03, Robert Grefstad