<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
Hello everybody,<br>
<br>
finally I figured out. Thank you all for your support.<br>
<br>
Working config:<br>
/etc/hosts<br>
192.168.64.200 cntemplate<br>
<br>
dnsmasq.conf<br>
dhcp-range=192.168.64.0,static,1d<br>
dhcp-host=cntemplate<br>
<br>
Dhcp request has a hostname field 'cntemplate'<br>
<br>
Config that did not work:<br>
/etc/hosts<br>
192.168.64.200 cntemplate.hpc<br>
<br>
Dhcp request has a hostname field 'cntemplate'<br>
<br>
<br>
<br>
<span class="VIiyi" lang="en"><span class="JLqJ4b ChMk0b" data-language-for-alternatives="en" data-language-to-translate-into="hu" data-phrase-index="0" data-number-of-phrases="1"><span class="Q4iAWc">So the problem
was that something didn't make the hostname -> fqdn change.<br>
<br>
Regards,<br>
Adam Maulis<br>
</span></span></span><br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 5/19/22 16:46, Maulis Adam via
Dnsmasq-discuss wrote:<br>
</div>
<blockquote type="cite" cite="mid:5554a5d2-43ae-3a6f-dab0-733d2ca60b1d@ludens.elte.hu">Hello,
<br>
<br>
I like to configure my dhcp server with as little redundacy as
possible. But it looks like the IP address needs to be written
both of /etc/hosts and /etc/dnsmasq.conf
<br>
<br>
The client machines are in the /etc/hosts for example:
<br>
<br>
192.168.64.200 cntemplate.hpc
<br>
<br>
The non-default dnsmasq config options are:
<br>
<br>
no-resolv
<br>
server=192.168.5.251
<br>
expand-hosts
<br>
domain=hpc
<br>
<br>
Case 1:
<br>
dhcp-range=192.168.64.0,static
<br>
dhcp-host=cntemplate
<br>
<br>
Does not work, syslog said:
<br>
May 19 15:53:47 gw00 dnsmasq-dhcp[4912]: DHCPDISCOVER(vlan164)
02:00:00:00:00:65 no address available
<br>
<br>
Case 2:
<br>
dhcp-range=192.168.64.0,static
<br>
dhcp-host=cntemplate,192.168.64.200
<br>
<br>
Working, but needed a duplicate entry both of /etc/hosts and
/etc/dnsmasq.conf
<br>
<br>
Case 3:
<br>
dhcp-range=192.168.64.100,192.168.64.250
<br>
dhcp-host=cntemplate,192.168.64.200
<br>
<br>
Working, but needed a duplicate entry both of /etc/hosts and
/etc/dnsmasq.conf
<br>
<br>
Case 4:
<br>
dhcp-range=192.168.64.100,192.168.64.250
<br>
dhcp-host=cntemplate
<br>
<br>
Does not work, syslog said:
<br>
May 19 16:15:04 gw00 dnsmasq-dhcp[5282]: not giving name
cntemplate.hpc to the DHCP lease of 192.168.64.215 because the
name exists in /etc/hosts with address 192.168.64.200
<br>
<br>
<br>
<br>
<br>
<br>
The client's DHCP requests (tcpdump)
<br>
<br>
02:00:00:00:00:65 > ff:ff:ff:ff:ff:ff, ethertype 802.1Q
(0x8100), length 346: vlan 164, p 0, ethertype IPv4 (0x0800), (tos
0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17),
length 328)
<br>
0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from
02:00:00:00:00:65, length 300, xid 0x619d4060, Flags [none]
<br>
Client-Ethernet-Address 02:00:00:00:00:65
<br>
Vendor-rfc1048 Extensions
<br>
Magic Cookie 0x63825363
<br>
DHCP-Message (53), length 1: Discover
<br>
Hostname (12), length 10: "cntemplate"
<br>
Parameter-Request (55), length 13:
<br>
Subnet-Mask (1), BR (28), Time-Zone (2),
Default-Gateway (3)
<br>
Domain-Name (15), Domain-Name-Server (6), Unknown
(119), Hostname (12)
<br>
Netbios-Name-Server (44), Netbios-Scope (47), MTU
(26), Classless-Static-Route (121)
<br>
NTP (42)
<br>
<br>
Server's config:
<br>
<br>
ip addr show vlan164
<br>
6: vlan164@ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UP group default qlen 1000
<br>
link/ether 52:54:00:12:34:58 brd ff:ff:ff:ff:ff:ff
<br>
inet 192.168.64.254/24 brd 192.168.64.255 scope global vlan164
<br>
valid_lft forever preferred_lft forever
<br>
inet6 fe80::5054:ff:fe12:3458/64 scope link
<br>
valid_lft forever preferred_lft forever
<br>
<br>
cat /etc/debian_version
<br>
10.12
<br>
<br>
uname -a
<br>
Linux gw00 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17)
x86_64 GNU/Linux
<br>
<br>
dpkg -l dnsmasq
<br>
ii dnsmasq 2.80-1+deb10u1 all Small caching DNS
proxy and DHCP/TFTP server
<br>
<br>
I would be very happy with any advice
<br>
<br>
Adam Maulis
<br>
<br>
<br>
_______________________________________________
<br>
Dnsmasq-discuss mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:Dnsmasq-discuss@lists.thekelleys.org.uk">Dnsmasq-discuss@lists.thekelleys.org.uk</a>
<br>
<a class="moz-txt-link-freetext" href="https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss">https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss</a>
<br>
</blockquote>
<br>
</body>
</html>