Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DNSmasq and DHCP + fixed address
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Jan 20, 2004 10:04 am    Post subject: DNSmasq and DHCP + fixed address Reply with quote

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
View user's profile Send private message
puddpunk
l33t
l33t


Joined: 20 Jul 2002
Posts: 681
Location: New Zealand

PostPosted: Tue Jan 20, 2004 10:19 am    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Jan 20, 2004 10:23 am    Post subject: Reply with quote

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
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Jan 20, 2004 6:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 21, 2004 1:14 am    Post subject: Reply with quote

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! 8)
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 21, 2004 2:23 am    Post subject: Reply with quote

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
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Wed Jan 21, 2004 4:50 am    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jan 21, 2004 9:22 am    Post subject: Reply with quote

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
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Wed Jan 21, 2004 1:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum