[Dnsmasq-discuss] Static IP client question

Chris Green cl at isbd.net
Sun Aug 7 16:36:11 BST 2016


On Sun, Aug 07, 2016 at 05:25:24PM +0200, Albert ARIBAUD wrote:
> Chris Green <cl at isbd.net> a écrit:
> > On Sat, Aug 06, 2016 at 08:57:43PM -0400, Edward Crosby wrote:
> > >    I've implemented Dnsmasq on a Raspberry Pi 3 running Ubuntu Mate
> > > 16.04 on my home LAN. I have configured it as a DHCP server also. I
> > > have quite a few clients on my LAN, most of them are DHCP clients.
> > > I have one PC, my personal PC, that has a static IP address. This
> > > PC does not resolve host names of other host on my LAN, it doesn't
> > > even resolve the hostname of the Dnsmasq DNS server, even though I
> > > have the Dnsmasq server IP as my DNS server.  
> > 
> > I'm doing almost exactly the same as you.
> > 
> > What I do is fix the IP address of my desktop machine by getting
> > dnsmasq to always give it the same address.  So leave your desktop
> > with a dynamic IP in its configuration and have something like the
> > following to your /etc/hosts file on the pi:-
> > 
> >     127.0.0.1       localhost
> >     #
> >     #
> >     # These have fixed IP for various reasons, so dnsmasq serves
> > their IP from here       
> >     #
> >     192.168.1.1     vigor
> >     192.168.1.2     pi.zbmc.eu raspberrypi  pi
> >     192.168.1.3     esprimo.zbmc.eu zbmc.eu
> >     192.168.1.5     maxinexp
> >     192.168.1.6     ben
> >     192.168.1.40    mikrotik
> >     192.168.1.60    fonera
> > 
> > My desktop machine is esprimo.
> 
> Hi Chris and Edward,
> 
> I don't have many Windows machines around my dnsmasq managed,
> statically attributed LAN, but at least one is used daily, and I just
> ran a test on it, which makes me ask a question to Edward:
> 
> How did you (both) test that the machine does not resolve?
> 
> Here's why I'm asking:
> 
> I've tested the following with a Windows machine (let's call it romulus)
> and my Linux machine (let's call it remus). From the command prompt on
> romulus, I ran the following:
> 
> 	ping remus
> 
> 	=> romulus complains that it could not find host remus.
> 
> 	nslookup remus
> 
> 	=> This resolves immediately to remus' fixed IP address.
> 
> 	ping remus.  (note the dot at the end!)
> 
> 	=> This works.
> 
> If I'd believed the first ping, I might have concluded that the
> resolution did not work, while it actually does; the issue is with
> how romulus handles domainless names.
> 
> Hence my question re: how exactly the issue was tested.
> 
I've not used nslookup in years, it's deprecated now.  I use 'host' or
'dig' if something else doesn't work (e.g. an ssh to somewhere).

I'm not sure why you get the symptoms you're seeing though Albert, I
don't think I've ever noticed anything like that.  If I try 'ssh
something' and it doesn't work then 'host something' doesn't work
either! :-)

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list