View previous topic :: View next topic |
Author |
Message |
glc650 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Jun 2004 Posts: 23
|
Posted: Tue Jun 08, 2004 4:56 pm Post subject: dnsmasq |
|
|
Hello all,
Trying to get dnsmasq to function as both a DHCP and an internal DNS server. So far I got DHCP working, however, I cannot seem to get the hostnames of my computers to resolve to IPs.
Also, I'm not sure as to where this script (from the dnsmasq documentation) should go:
[quote]Automatic DNS server configuration with DHCP.
You need to get your DHCP client to write the addresse(s) of the DNS servers to a file other than /etc/resolv.conf. For dhcpcd, the dhcpcd.exe script gets run with the addresses of the nameserver(s) in the shell variable $DNS. The following bit of shell script uses that to write a file suitable for dnsmasq.
echo -n >|/etc/dhcpc/resolv.conf
dnsservs=${DNS//,/ }
for serv in $dnsservs; do
echo "nameserver $serv" >>/etc/dhcpc/resolv.conf
done
Remember to give dhcpcd the -R flag to stop it overwriting /etc/resolv.conf.
For other DHCP clients it should be possible to achieve the same effect.
TIA>
-g.
Last edited by glc650 on Tue Jun 08, 2004 5:37 pm; edited 2 times in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gmichels Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1983037634428a15090b5fc.jpg)
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Tue Jun 08, 2004 5:23 pm Post subject: |
|
|
Are you trying to setup internal dns resolution, like pinging the name of a lan workstation?
If so, you should instruct your client's dhcpcd to inform the hostname to the dhcp server. If they are using gentoo, edit /etc/conf.d/net and set dhcpcd_ethX="-h hostname" on each client. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
glc650 n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 04 Jun 2004 Posts: 23
|
Posted: Tue Jun 08, 2004 5:35 pm Post subject: |
|
|
gmichels wrote: | Are you trying to setup internal dns resolution, like pinging the name of a lan workstation?
If so, you should instruct your client's dhcpcd to inform the hostname to the dhcp server. If they are using gentoo, edit /etc/conf.d/net and set dhcpcd_ethX="-h hostname" on each client. | Yes, internal DNS resolution (computer names > IPs), but all my clients (3) are W2K. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
gmichels Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1983037634428a15090b5fc.jpg)
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Wed Jun 09, 2004 1:58 pm Post subject: |
|
|
glc650 wrote: | Yes, internal DNS resolution (computer names > IPs), but all my clients (3) are W2K. |
Weird... I have a mixed environment and all the windows clients give their hostname automatically. Check your leases file at /var/lib/misc/dnsmasq.leases, it should contain the timestamp, mac, ip, hostname and mac again. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|