[Dnsmasq-discuss] Setting Hostname/IP for a specific MAC
Lucas Brutschy
L_Brutschy@web.de
Sat, 23 Apr 2005 01:04:49 +0200
Hi,
my old router died some days ago so I was forced to install a new one. I used
dnsmasq for a small DNS- and DHCP-Server, which works quite well.
But there's one thing that's not working: I'm trying to set a fixed Hostname/IP
for a specific MAC using DHCP. So I got the MACs from the Clients using
ifconfig:
> --------
eth0 Link encap:Ethernet HWaddr 00:0E:2E:0E:AD:CB
< --------
Then I added the following entries to my /etc/dnsmasq.conf:
> --------
# Always give the host with ethernet address 11:22:33:44:55:66
# the name fred and IP address 192.168.0.60 and lease time 45 minutes
#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m
dhcp-host=00:0E:2E:0E:AD:CB,annuminas,192.168.1.101,infinite
dhcp-host=00:40:F4:36:88:40,hobbingen,192.168.1.102,infinite
dhcp-host=00:E0:7D:89:29:B7,lothlorien,192.168.1.103,infinite
< --------
But dnsmasq doesn't care about these settings...
/var/state/dnsmasq/dnsmasq.leases:
> --------
0 00:0e:2e:0e:ad:cb 192.168.1.142 annuminas 01:00:0e:2e:0e:ad:cb
0 00:e0:7d:89:29:b7 192.168.1.103 LOTHLORIEN 01:00:e0:7d:89:29:b7
0 00:40:f4:36:88:40 192.168.1.102 hobbingen 01:00:40:f4:36:88:40
< --------
As you can see, the IP of 'annuminas' is wrong (btw: it's the IP 'annuminas' had
with the old dhcp server...). The hostname of 'lothlorien' isn't correct too:
LOTHLORIEN is the hostname I set on the client.
I'm kind of confused now, could someone please help me?
Greets,
Lucas