Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dnsmasq
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
glc650
n00b
n00b


Joined: 04 Jun 2004
Posts: 23

PostPosted: Tue Jun 08, 2004 4:56 pm    Post subject: dnsmasq Reply with quote

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


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Tue Jun 08, 2004 5:23 pm    Post subject: Reply with quote

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


Joined: 04 Jun 2004
Posts: 23

PostPosted: Tue Jun 08, 2004 5:35 pm    Post subject: Reply with quote

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


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Jun 09, 2004 8:22 am    Post subject: Reply with quote

Does the leases file contain the hostnames?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
gmichels
Guru
Guru


Joined: 20 Jun 2003
Posts: 480
Location: Brazil

PostPosted: Wed Jun 09, 2004 1:58 pm    Post subject: Reply with quote

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
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