openwrt / odhcpd

This repository is a mirror of https://git.openwrt.org/?p=project/odhcpd.git. Pull requests will be accepted which will be merged in odhcpd.git
GNU General Public License v2.0
160 stars 96 forks source link

ipv4 not listening on udp port 67 #129

Closed ghost closed 5 years ago

ghost commented 5 years ago

ubus -S call system board

{"kernel":"4.14.113","hostname":"to","system":"ARMv7 Processor rev 1 (v7l)","model":"Turris Omnia","board_name":"armada-385-turris-omnia","release":{"distribution":"TurrisOS","version":"4.0-beta1","revision":"0663455801","target":"mvebu\/cortexa9","description":"TurrisOS 4.0-beta1 0663455801"}}

The odhcp package feed is pulled from OpenWRT 18.06


The aim is to utilise odhcp for ipv4 dhcp leases as it is for ipv6. With the latter it is working as expected but it does not work for ipv4.

with /etc/config/dhcp

config odhcpd 'odhcpd'
    option maindhcp '1'

it would be expected that odhcpd is listening on udp port 67 in order to serve ipv4 dhcp queries, having dnsmasq stopped/disabled/removed, but it does not however and thus not serving ipv4 queries.

dedeckeh commented 5 years ago

Besides setting maindhcp to 1 you need to set also dhcpv4 to server in the lan dhcp section

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
ghost commented 5 years ago

I thought I had read the documentation but apparently missed it...

douardda commented 2 years ago

After upgrading to openwrt 21.02, I cannot odhcpd to server IPv4 leases. (It used to work just fine before the upgrade)

I do have the "option dhcpv4 'server'" properly set as well as the maindhcp (in the odhcpd section). I seems the dhcpv4 is completely disabled but I don't know why. Even started with -l 7, I see no logging/debug that would help me understand what is going on.

Any idea?

douardda commented 2 years ago

After upgrading to openwrt 21.02, I cannot odhcpd to server IPv4 leases. (It used to work just fine before the upgrade)

I do have the "option dhcpv4 'server'" properly set as well as the maindhcp (in the odhcpd section). I seems the dhcpv4 is completely disabled but I don't know why. Even started with -l 7, I see no logging/debug that would help me understand what is going on.

Any idea?

Forget it, I actually had the odhcpd-ipv6only package installed after the upgrade... Sorry