Router not in DHCP

I have a Mi Router 3 Pro (z), flashed with a custom build of OpenWrt, which uses odhcpd for all DHCP (including IPv4), and unbound for DNS.

For all devices, the router creates a DNS record and reverse lookup - e.g. my desktop is at dt.z. Where dt is my desktop hostname, and z is the domain configured in DHCP. Unfortunately, this doesn't seem to be creating a record for my router itself - I have rt, but no rt.z.

Should I be defining a static IP in /etc/config/dhcp for the router, or perhaps I'm missing something else?

For reference, my configurations are...

config dhcp 'lan'
        option interface 'lan'
        option dhcpv4 'server'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        option dynamicdhcp '1'
        option leasetime '12h'
        option start '100'
        option limit '150'
        list domain 'z'

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

config odhcpd 'odhcpd'
        option maindhcp '1'
        option leasefile '/var/lib/odhcpd/dhcp.leases'
        option leasetrigger '/usr/lib/unbound/'

config host
        option name 'dt'
        option dns '1'
        option ip ''
        option leasetime 'infinite'
        option mac '??'
config system
        option hostname 'rt'
config unbound
        option verbosity '4'
        option add_local_fqdn '2'
        option validator '1'
        option validator_ntp '1'
        option root_age '9'
        option query_minimize '1'
        option protocol 'mixed'
        option domain 'z'
        option domain_type 'static'
        list domain_insecure ''
        option dhcp_link 'odhcpd'
        option dhcp4_slaac6 '1'
        option unbound_control '1'
        list trigger_interface 'lan'
        list trigger_interface 'wan'

config zone
        option enabled '1'
        option tls_upstream '1'
        option zone_type 'forward_zone'
        list zone_name '.'
        list server ''
        list server ''
        list server ''
        list server ''

Add a domain in config/dhcp

config domain
	option name 'vps.elv'
	option ip ''

Ah I see! I swear it used to work... I wonder if I had that and got rid of it accidently...

So in my case I'd add the following?

config domain
	option name 'rt.z'
	option ip ''
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.