Help needed on DHCP relay

ashok singh ashokr2k3 at yahoo.com
Mon Jun 5 13:53:40 UTC 2006


Thanks glen. Yes, the route entry at the server was missing.
Glenn Satchell <Glenn.Satchell at uniq.com.au> wrote:  
>Date: Mon, 5 Jun 2006 03:39:54 -0700 (PDT)
>From: ashok singh 
>Subject: Help needed on DHCP relay
>To: dhcp-users at isc.org
>
>Hi All,
>  
>  I have configured DHCP server and relay agent as shown below. My DHCP  Server 
is giving error messages ( shown below ) when it receives DHCP  discover from 
the relay agent.Please help me out.
>  
>  
>                          (eth0)
>     +-------------+    10.0.0.1   +-------------+
>  
>     | DHCP Client  +---------------+ relay agent |
>  
>     +-------------+               +------+------+
>  
>                                           |   (eth0)
>                                           | 192.168.0.8
>                                           |
>                                           |
>                                           |   (eth0)
>                                           | 192.168.0.1
>  
>                                     +-----+-------+
>  
>                                     | dhcp server |
>  
>                                     +-------------+
>  
>  
>  my dhcpd.conf is as follows
>  
>  authoritative;
>  ddns-update-style interim;
>  ddns-updates off;
>  omapi-port 7911;
>  
>  subnet 192.168.0.0 netmask 255.255.255.0 {
>   option subnet-mask 255.255.255.0;
>   range dynamic-bootp 192.168.0.30 192.168.0.49;
>   option domain-name "test.com";
>   default-lease-time 86400;
>   max-lease-time 86400;
>   min-lease-time 86400;
>  }
>  subnet 10.0.0.0 netmask 255.255.255.0 {
>   option subnet-mask 255.255.255.0;
>   range dynamic-bootp 10.0.0.30 10.0.0.49;
>   }
>  
>  the dhcp server command line is "/usr/sbin/dhcpd eth0 -d"
>  
>  my relay agent command line is "/usr/sbin/dhcrelay -i eth0 -i eth1 -d 
192.168.0.1"
>  
>  Since i have my dhcp server in debug mode i get the following messages 
>  
>  DHCPDISCOVER from  via 10.0.0.1
>  icmp_echorequest 10.0.0.49: Network is unreachable
>  DHCPOFFER on 10.0.0.49 to  via 10.0.0.1
>  send_packet: Network is unreachable
>  send_packet: please consult README file regarding broadcast address.
>  
>  At relay agent side i get the following messages
>  
>  forwarded BOOTREQUEST for  to 192.168.0.1
>  forwarded BOOTREQUEST for  to 192.168.0.1
>  forwarded BOOTREQUEST for  to 192.168.0.1
>  forwarded BOOTREQUEST for  to 192.168.0.1
>  
>  I am using linux kernel 2.4.20-8 for both dhcp server and dhcp relay  agent. 
I am using ISC dhcp 3.0.3. I read the README file but didn't  help me much.
>  
>  I tried adding the following to my route table on DHCP Server
>  "route add -host 255.255.255.255 dev eth0" but didn't help.
>  
>  Regards,
>  Ashok
> __________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>

It looks like a routing issue. The dhcp server tries to ping the
IP address to see if it is in use before offering it to the
client. In this case the kernel sends back an error because it
doesn't know how to get there.

For the client add the 'option routers' statement to the subnet to
define the default gateway on the client.

subnet 10.0.0.0 netmask 255.255.255.0 {
  option subnet-mask 255.255.255.0;
  option routers 10.0.0.1;
  range dynamic-bootp 10.0.0.30 10.0.0.49;
}

For the server you'll need to add a route to the kernel's routing table.

  route add net 10.0.0.0 gateway 192.168.0.8

or perhaps create a default route if that makes more sense in
your situation

  route add default gateway 192.168.0.8

The exact syntax of the route command might vary slightly depending on
your OS, but the system manual pages, and the above examples should get
you there. You can test the result by trying to do the ping manually
and see if it works, eg

  ping 10.0.0.1
  
How you make this a permanent setting depends on your operating
system platform.

regards,
-glenn




 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the dhcp-users mailing list