LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   ppp, dnsmasq, dhcp: a triple chicken-and-egg problem (http://www.linuxquestions.org/questions/linux-networking-3/ppp-dnsmasq-dhcp-a-triple-chicken-and-egg-problem-718859/)

hujuice 04-13-2009 04:16 PM

ppp, dnsmasq, dhcp: a triple chicken-and-egg problem
 
This issue is so simple to make me laugh. :scratch:
It is a 'home' problem, born amongst simple 'home' solutions.
It is a triple chicken-and-egg problem.

I connect to the Internet via ppp (via a WCDMA modem) and my box has naturally the usepeerdns directive set to on: the ppp process overwrite the /etc/resolv.conf file when connected.

I have also a laptop and, as a laptop, I want to keep it as dhcp client. dnsmasq is a perfect solution to give dhcp addresses and /etc/hosts and DNS forwarding.

But lap can be connected to the wired network (faster, to distcc, I'm a Gentoo user) or to the wifi network (comfortable, to relax on the sofa).
Since the eth network and the wlan network are separated, my box doesn't know the lap IP address (it isn't in the /etc/hosts file).

dnsmasq does know it (dnmasq gave it), but I cannot give localhost as dns server to the box, because ppp will overwrite it. And I cannot disable the usepeerdns directive, because it is my Internet DNS.

Using OpenDNS is a solution, but not what I like.

At this moment, I changed the /etc/ppp/ip-up.d/40-dns.sh file (a startup service file), but it is a rough patch, it should be a configuration task.

Am I stupid?
Any ideas to solve it better?

Regards,
HUjuice

rweaver 04-14-2009 01:37 PM

Quote:

Originally Posted by hujuice (Post 3507745)
Am I stupid?
Any ideas to solve it better?

No, but it might just be easier to bridge the networks and assign a static ip instead of dhcp for the laptop.


All times are GMT -5. The time now is 11:50 PM.