Loren M. Lang lorenl at north-winds.org
Wed Jun 10 18:42:09 UTC 2009

On Wed, 2009-06-10 at 08:14 -0700, David W. Hankins wrote:
> On Wed, Jun 10, 2009 at 01:35:22AM -0700, Loren M. Lang wrote:
> > nothing in the log file to indicate otherwise.  I tried setting up
> > dhcrelay to listen on ppp0 and relay it to the IP of the ethernet card
> > on the DHCP server, however dhcrelay complained that it did not support
> > device type 512 of ppp0.  We are using ISC DHCP 4.  Is there any way to
> > respond to the DHCPINFORM messages generated by Windows on a PPP link?
> There are two obstacles.  The first is that ISC DHCP has to use raw
> sockets in order to process RFC 2131 conforming broadcast DHCP
> messages (both to receive and transmit them).  This means the software
> has to understand how to perform the link layer framing, and we have a
> limited number of link layers supported currently.  This can be worked
> around by compiling the software with USE_SOCKETS, but then your RFC
> 2131 conformance with regard to those special messages comes under
> question.
> The second obstacle I think is that dhcrelay will refuse to use an
> interface that is non-broadcast.  This may prove more difficult to
> solve.

With my basic understanding of the DHCP protocol, my assumption would be
that it would be easier to port dhcrelay or to develop a special DHCP
relay specifically for listening on a PPP interface rather than adding
PPP support to the DHCP server.  Once the packet has been relayed, I
believe the server should not care what the physical link was, in
particular, since this will be a DHCPINFORM message.  Windows seems to
fill in chaddr and the DHCP client identifier with some dummy MAC
address.  I believe I will need to dedicate an IP address to the DHCP
relay agent since it listens on the BOOTP server address for replies
from the DHCP server.  The one part I'm not clear on is how the relay
agent determines which interface to send the reply to.  There might be
some DHCP option for storing the network interface name or something.
Need to do some further research.

As an experiment, I decided to see if I could get dhcrelay to listen on
the PPP interface with the following patch:

--- common/lpf.c.orig   2009-06-10 11:21:02.000000000 -0700
+++ common/lpf.c        2009-06-10 02:03:09.000000000 -0700
@@ -450,6 +450,11 @@
                        hw->hbuf[0] = HTYPE_FDDI;
                        memcpy(&hw->hbuf[1], sa->sa_data, 16);
+               case ARPHRD_PPP:
+                       hw->hlen = 0;
+                       //hw->hbuf[0] = HTYPE_FDDI;
+                       //memcpy(&hw->hbuf[1], sa->sa_data, 16);
+                       break;
                        log_fatal("Unsupported device type %ld for \"%s
                                  (long int)sa->sa_family, name);

dhcrelay now happily sits connected to ppp0 though I have no way to test
it at the moment.  I'm sure it will take more than this to actually work

> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
Loren M. Lang
lorenl at north-winds.org

Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
Fingerprint: 10A0 7AE2 DAF5 4780 888A  3FA4 DCEE BB39 7654 DE5B

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20090610/312ce0b5/attachment.bin>

More information about the dhcp-users mailing list