Skip to content

Instantly share code, notes, and snippets.

@nemesifier
Created November 12, 2015 13:21
Show Gist options
  • Save nemesifier/a1d71ae00a8516e543e0 to your computer and use it in GitHub Desktop.
Save nemesifier/a1d71ae00a8516e543e0 to your computer and use it in GitHub Desktop.
# /etc/config/dhcp
# example config of how to use odchp instead of dnsmasq for ipv4
config odhcpd 'odhcpd'
# this tells openwrt to use odchpd instead of dnsmasq
option maindhcp '1'
# ensure the directory exists or the lease
# file won't be written and will fail silently
option leasefile '/tmp/odhcp-leases'
option leasetrigger '/usr/sbin/odhcpd-update'
config dhcp 'lan'
# this is needed to enable odhcp for ipv4
option dhcpv4 'server'
# the rest of the options are the
# same as when you are using dnsmasq
option start '100'
option leasetime '12h'
option limit '150'
option interface 'lan' # uci interface name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment