This is and example of a dhcpd config file for OpenBSD. The interface fxp1 is the internal interface to my local lan. It has a static private IP (192.168.0.1) The dhcpd server is bound to it and it gives leases to my internal workstations. There are 3 workstations that get static ip's from the dhcp server. The ip's they get are based on their mac addresses. The dns server and default route is also the 192.168.0.1 mentioned above.
This example is from the /etc/dhcpd.conf file.
#OpenBSD: dhcpd.conf,v 1.1 1998/08/19 04:25:45 form Exp $ # # DHCP server options. # See dhcpd.conf(5) and dhcpd(8) for more information. # # Network: 192.168.1.0/255.255.255.0 # Domain name: domain.lan # Name servers: 192.168.0.1 # Default router: 192.168.0.1 # Addresses: 192.168.0.241 - 192.168.0.254 # # Internal dns cache is BIND. one-lease-per-client on; authoritative; option domain-name "domain.lan"; option domain-name-servers 192.168.0.1; option routers 192.168.0.1; option subnet-mask 255.255.255.0; subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.241 192.168.0.254; } ### Fixed IP addresses host storage { hardware ethernet 00:D2:B9:89:F2:7D; fixed-address 192.168.0.10; option host-name "storage"; } host workstation { hardware ethernet 00:D1:B7:B7:11:0F; fixed-address 192.168.0.20; option host-name "workstation"; } host media { hardware ethernet 00:05:71:C4:D6:4B; fixed-address 192.168.0.30; option host-name "media"; }
The example below from the /etc/dhcp.interfaces file. Put in the interface(s) you want dhcpd to listen on in here.
# $OpenBSD: dhcpd.interfaces,v 1.1 1998/08/19 04:25:45 form Exp $ # # List of network interfaces served by dhcpd(8). # # ep0 # ed0 le0 fxp1