Hosts from DHCP to DNS. Need to set static DHCP:
add to /etc/config/dhcp host
config host
option tag ‘lan’ <— tag of lan static host
option name ‘dgw’
option mac ‘00:09:b0:xx:xx:x’
option ip ‘192.168.1.1’
and domain my config dnsmasq:
(hosts add from LuciGIU [DHCP and DNS] but without option tag ‘lan’ )
config dnsmasq
option domainneeded ‘1’
option boguspriv ‘1’
option localise_queries ‘1’
option rebind_protection ‘1’
option rebind_localhost ‘1’
option local ‘/domena.com/’
option domain ‘domena.com’
option expandhosts ‘1’
option authoritative ‘1’
option readethers ‘1’
option leasefile ‘/tmp/dhcp.leases’
option resolvfile ‘/tmp/resolv.conf.auto’
option port ‘0’
option localservice ‘1’
option quietdhcp ‘1’
option nonwildcard ‘1’
list interface ‘br-lan’
in /etc/dnsmasg.conf you add:
#pool for non static users
dhcp-range=tag:!known,lan,192.168.1.200,192.168.1.254,2m
/etc/init.d/dnsmasq restart
and DNS now:
ping dgw
PING iradiow (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=60 time=6.887 ms
ping dgw.domena.com
PING dgw.domena.com (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=0.093 ms
nslookup dgw.domena.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: dgw.domena.com
Address 1: 192.168.1.1
*** Can’t find dgw.domena.com: No answer
nslookup 192.168.1.1
Server: 127.0.0.1
Address: 127.0.0.1#53
** server can’t find 1.1.168.192.in-addr.arpa: NXDOMAIN
DNS kresd no reverse DNS set.
nslookup dgw.piesok.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: dgw.piesok.com
Address 1: 192.168.1.1
*** Can’t find dgw.piesok.com: No answer <---- no ipv6
I set no ipv6 used!
pls look to /var/kresd/hints.tmp.
All static users.