Topic: static ip-adresses with dnsmasq?

i want want to get the same ip-adress for my desktop every time. but it does not work. i always get the false adress.

my dnsmasq.conf:

domain-needed
bogus-priv
filterwin2k
local=/lan/
domain=lan
except-interface=vlan1
dhcp-authoritative
dhcp-range=192.168.1.100,192.168.1.250,255.255.255.0,12h
dhcp-leasefile=/tmp/dhcp.leases
read-ethers
dhcp-option=3,192.168.1.1
dhcp-option=6,192.168.1.1

my ethers:
00:02:2D:BB:FF:BA 192.168.1.99

eth1 on my desktop:
eth1      Protokoll:Ethernet  Hardware Adresse 00:02:2D:BB:FF:BA
          inet Adresse:192.168.1.218  Bcast:192.168.1.255  Maske:255.255.255.0
[...]

i always get 192.168.1.218 and i absolutely can not see, what i am missing here.

2

Re: static ip-adresses with dnsmasq?

When I toyed with this myself on the april experimental, I suspected that the read-ethers functionality was actually broken. Try putting it directly into dnsmasq.conf instead, as I remember I only got it working from there

3

Re: static ip-adresses with dnsmasq?

Just had a try & it definitely works in dnsmasq.conf of april experimental.

dhcp-host=00:00:00:00:00:00,192.168.1.200

4

Re: static ip-adresses with dnsmasq?

I checked, & read-ethers is not working for me either

Re: static ip-adresses with dnsmasq?

Make sur /etc/ethers is readable to user nobody :

chown nobody:nobody /etc/ethers

Then restart dnsmasq and check in logread that dnsmasq is able to read your ether file

Re: static ip-adresses with dnsmasq?

there is no group nobody, but giving it to user nobody did the job. thank you.

Re: static ip-adresses with dnsmasq?

for my wrt dnsmasq and "ethers" works fine - i see no problem...

Re: static ip-adresses with dnsmasq?

I've been trying to get mine to work as well... with no success.
My router is 10.0.0.1 subnet mask 255.255.255.0
dhcp leases are from 10.0.0.200 - 10.0.0.250 (configured from the nvram vars... not the dnsmasq config file.. otherwise you can end up with more than one range of dynamic ip addresses)

when i use this format for /etc/ethers, logread shows "read /etc/ethers - 1 addresses" which is correct:

00:00:00:00:00:00 10.0.0.120


however instead of 10.0.0.120, my computer is assigned 10.0.0.245

Re: static ip-adresses with dnsmasq?

ah, hmm.. found one bad oops on my part... i punched in the wrong mac address for my lappy that fixed things a bit... smile

Re: static ip-adresses with dnsmasq?

my ethers does not work i even tried running dnsmasq as root