openwrt / openwrt/packages

dnsmasq-full does not work in IPv6 relay mode

Open
#24,682 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

We definitely need DHCPv6 relay as some ISP only provides a /64 prefix, where relay is the only way to grant IPv6 accesses to LAN devices.

By default, OpenWrt uses dnsmasq for IPv4 DHCP and odhcpd-ipv6only for IPv6 DHCP. The DHCPv6 relay (powered by odhcpd-ipv6only) works as expected and we only need to change /etc/config/dhcp to be like this to make it work:

config dhcp 'lan'
        option interface 'lan'
...IPv4 stuff omitted...
        option ra 'relay'
        option dhcpv6 'relay'
        option ndp 'relay'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'

config dhcp 'wan6'
        option interface 'wan6'
        option dhcpv6 'relay'
        option ra 'relay'
        option ndp 'relay'
        option master '1

If one uses dnsmasq-full to handle DHCP for both IPv4 and IPv6(opkg remove dnsmasq odhcpd-ipv6only and opkg install dnsmasq-full), the DHCPv6 relay stops working. The /etc/init.d/dnsmasq script does not seem to generate dnsmasq configurations for these IPv6 options:
image

Confirmed on OpenWrt 23.05.3 x86-64.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting /etc/init.d/dnsmasq and the /etc/config/dhcp relay settings shown in the report, then compare the generated configuration with the working odhcpd-ipv6only setup. Done means dnsmasq-full supports the documented IPv6 relay options and DHCPv6 relay works on OpenWrt 23.05.3 x86-64.

Written by the indexing model from the issue text.

Assessment

Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.