OpenBSD Journal

DHCP Information

Contributed by jose on from the dynamic-networks dept.

OnLamp has a neat series of articles in their FreeBSD Basics column by Dru Lavigne . The series opens up with Introducing DHCP , which talks about some basics. Not all of this article applies to OpenBSD, though. The next article, Configuring a DHCP Server , does apply more to OpenBSD. The ISC DHCP daemon is installed in the base installation, and Dru shows you how to configure it. Part three, DHCP on a Multi-Segment Network , covers the use of the DHCP Relay tool to handle a subnetted network. All in all an interesting series of articles if you're looking at setting up a DHCP server under OpenBSD.

(Comments are closed)

  1. By Anonymous Coward () on

    hm. dhcrelay does not seem to work for me somehow.

    i have a normal subnet with as router and dhcp/dns server. now i got an old laptop which i am using as wireless ap (in IBSS mode). Wireless subnet is i set up "dhcrelay -i wi0". the dhcp-requests from the clients come in through wi0 but dhcrelay doesnt react in any way. nothing appropriate leaves through ep1 (the other interface). if i set up an ip-adress manually everything works fine.

    Any ideas?

    1. By Anonymous Coward () on

      Do you really need dhcrelay for this? I have pretty much the same setup as you, and the only thing I had to do was put wi0 and fxp0 in my /etc/dhcpd.interfaces and another entry in my dhcpd.conf

      1. By Anonymous Coward () on

        As said its an additional router there. Aot the same machine.
        I have set up more than one central routers with wireless too. there i have the setup you described.

    2. By Christopher Smith () on

      You need to have the interface the DHCP requests have to be relayed *to* on the commandline as well. ie. dhcrelay -i wi0 -i ep1
      This seems a bit counter-intuitive, but it is documented in the man page (at least, it is on my FreeBSD systems).

      1. By Anonymous Coward () on

        oh well. it seems i have missunderstood this one... also i have read the manpage 3 times...

        so the second iface is "to"?

        1. By Anonymous Coward () on

          hm. i tried this too, still not working

        2. By Christopher Smith () on

          No, on the commandline you list all the interfaces you want to relay DHCP requests from *and* the interface the relayed requests need to be made out of. For example, the dhcrelay commandline on one of our firewalls looks like this:

          /usr/local/sbin/dhcrelay -a -A 1400 -i vlan0
          -i vlan1 -i vlan2 -i vlan3 a.b.c.d w.x.y.z

          vlan0 is the "external" interface through which the DHCP relay contacts the two servers a.b.c.d and w.x.y.z.
          vlan[1-3] are the "internal" interfaces it listens for DHCP requests to relay on.

          I don't believe the order is important.

          The relevant extract from the man page is:
          The -i flag can be used to specify the network interfaces on which the relay agent should listen. In general, it must listen not only on those network interfaces to which clients are attached, but also on those network interfaces to which the server (or the router that reaches the server) is attached .

          Again, this is a FreeBSD (4.6.2) box. YMMV. Although as long as you have the same major DHCP release (we are using isc-dhcp3) it shouldn't matter.

          Don't forget to make sure your firewall rules aren't blocking some aspect of the DHCP negotiation.

Latest Articles


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]