Replace dhcpd+bind by dnsmasq in a local network: few details
Hi,
In my local network (and on client's LANs), I'm using dhcpd and Bind to manage DHCP and DNS services. I've been reading some Dnsmasq documentation lately, and I think this would be a more simple solution, the more so since Dnsmasq is already shipping with a stock Slackware installation and its syntax seems more straightforward. I've experimented with it for a few hours, and first results are encouraging. There are a few configuration details that I have yet to solve. Here's my current setup. 1. DHCP server: Code:
# /etc/dhcpd.conf Code:
// /etc/named.conf Code:
; zone.microlinux.montpezat Code:
; revp.192.168.2 Code:
# /etc/dnsmasq.conf There's a few things I have yet to figure out. First things first. How do I add additional DNS entries like those in /var/named/zone.microlinux.montpezat? Code:
mirror.nestor IN A 192.168.2.1 Cheers, Niki |
I try to answer the first question myself. After some more experimenting, I tried the following directive:
Code:
# /etc/dnsmasq.conf Any suggestions, in general and in particular? |
Officially, your use of the "address" is incorrect - the "address" statement is used to mask a whole domain behind a single IP address. In your case, "mirror.nestor" is seen by dnsmasq as a domain name, not a host name. If you look up anything ending on "mirror.nestor", like one.mirror.nestor , foo.mirror.nestor but also just mirror.nestor, dnsmasq will return 192.168.2.1. Effectively, this does what you want.
The correct way of adding hosts is to write them into your server's /etc/hosts file. Eric |
The entries below are from my own home server conf file - they may be of some use to you ...
#dhcp-option= options from rfc2132 dhcp-option=1,255.255.255.0 dhcp-option=3,192.168.24.100 # router option, fix when this machine dials out dhcp-option=4,192.168.24.100 # time server is option 4 dhcp-option=5,192.168.24.100 # name server is option 5 dhcp-option=6,192.168.24.100 # dns option dhcp-option=19,0 # ip forwarding off dhcp-option=42,192.168.24.100 # ntp server is option 42 dhcp-option=44,192.168.24.100 # netbios over tcp/ip name server dhcp-option=45,192.168.24.100 # netbios over tcp/ip datagram distribution server option dhcp-option=46,8 # netbios over tcp/ip node type option dhcp-option=47 # netbios over tcp/ip scope option dhcp-option=252,"\n" # Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. |
Quote:
Edit: looks like this works indeed as announced. Thanks very much, Eric! |
Quote:
|
All times are GMT -5. The time now is 10:12 PM. |