View previous topic :: View next topic |
Author |
Message |
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Jan 20, 2004 10:04 am Post subject: DNSmasq and DHCP + fixed address |
|
|
Just emerged dnsmasq and loving it - so small simple and beautiful compared to BIND+DHCPD
But has anyone got fixed-address working using it?
Here's a snippet from /etc/dnsmasq.conf
Code: |
# DHCP options
dhcp-range=192.168.0.100,192.168.0.150
dhcp-lease=/var/lib/dhcp/dhcpd.leases
# Set the default route to the ADSL router
dhcp-option=3,192.168.0.1
# Set the timeserver address
dhcp-option=42,192.168.0.2
# Fixed addresses
dhcp-host=xx:xx:xx:xx:xx:xx,192.168.0.10,uberpc
|
I've tried many things, but uperpc always gets an ip address of 192.168.0.101 |
|
Back to top |
|
|
puddpunk l33t
Joined: 20 Jul 2002 Posts: 681 Location: New Zealand
|
Posted: Tue Jan 20, 2004 10:19 am Post subject: |
|
|
Hi there,
Just one thing you may try is using a XXXXXXXXXXXXXXXX format for your hardware address instead of XX:XX:XX:XX:XX:XX:XX:XX. Or perhaps try: XX-XX-XX-XX-XX-XX-XX-XX. The thing is there is so many different ways of representing the MAC address of a card, and the XX:XX... is reasonably standard.
BTW, this is a guess. I do not have the dnsmasq man pages at hand.
Cheers,
Chris. _________________ THIS SIG INTENTIONALLY LEFT BLANK |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Jan 20, 2004 10:23 am Post subject: |
|
|
The man pages state XX:XX:XX:XX:etc
I'll give the others a go, but I don't have much hope of that fixing it |
|
Back to top |
|
|
think4urs11 Bodhisattva
Joined: 25 Jun 2003 Posts: 6659 Location: above the cloud
|
Posted: Tue Jan 20, 2004 6:45 pm Post subject: |
|
|
Hi!
I had the same problem. I've solved it by extending the dhcp-range so that it includes the dhcp-host addresses too.
Not very logical (to me at least...), but nevertheless it works fine
Code: | dhcp-range=10.0.0.5,10.0.0.100
dhcp-host=xx:xx:xx:xx:xx:xx,10.0.0.5
|
HTH
T. _________________ Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Wed Jan 21, 2004 1:14 am Post subject: |
|
|
Cool - that works!
And sucks at the same time
I'd like to reserve a few fixed address's, but if I can't do that like it is.......
I've sent an email to the developer. Hopefully it can be changed for the final 2.0 release
Thanks! |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Wed Jan 21, 2004 2:23 am Post subject: |
|
|
I've been told that the new version fixes this
However, there's currently a segfault problem when faking an name using the --address option |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Wed Jan 21, 2004 4:50 am Post subject: |
|
|
You can assign fixed addresses in your /etc/dhcp/dhcpd.conf:
Code: |
host mimi {
hardware ethernet XX:XX:XX:XX:XX:XX;
fixed-address 192.168.0.2;
}
|
Exclude those from the range of available addresses. |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Wed Jan 21, 2004 9:22 am Post subject: |
|
|
Sorry - was talking about dnsmasq version 2.0rc1 which has it's own DHCP config now and doesn't need a DHCP.conf file |
|
Back to top |
|
|
ronmon Veteran
Joined: 15 Apr 2002 Posts: 1043 Location: Key West, FL
|
Posted: Wed Jan 21, 2004 1:48 pm Post subject: |
|
|
Okay. My router is an old Gentoo-1.2 box without ACCEPT_KEYWORDS. So it's running dnsmasq-1.1.8 and dhcpd. |
|
Back to top |
|
|
|