Skip to content

Instantly share code, notes, and snippets.

@youxiaojie
Forked from nemesifier/openwrt-odchp-ipv4.uci
Created October 3, 2021 19:45
Show Gist options
  • Save youxiaojie/c17c00759d22903c56511a7034306d7a to your computer and use it in GitHub Desktop.
Save youxiaojie/c17c00759d22903c56511a7034306d7a 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