Why is adding a new Ubuntu PC to an existing LAN such a pain?

Derek Broughton news at pointerstop.ca
Wed Jan 24 13:56:29 UTC 2007


Garry Knight wrote:

> Derek Broughton wrote:
> 
>> What's in your /etc/resolv.conf?
> 
> Just what you'd expect:
> nameserver 192.168.1.1

Good.
> 
> However, it doesn't seem to change anything. After entering "garry.org"
> and telling it to update the configuration, I try a ping with this line
> in /etc/hosts:
> 
> 192.168.1.4            ipaq.garry.org ipaq pocketpc
... 
> I then comment out the line in /etc/hosts:
> #192.168.1.4            ipaq.garry.org ipaq pocketpc
> 
> And try another ping:

Try nslookup or dig.  You _really_ picked a bad name, because they have a
DNS that returns an IP no matter what hostname you prefix it with.  If you
choose a random host at my domain you'll get:
 derek at othello:~$ nslookup derek.pointerstop.ca
 Server:         142.2.13.34
 Address:        142.2.13.34#53

 ** server can't find derek.pointerstop.ca: NXDOMAIN
from my DNS.

Note the "Server" line, there.  That's the DNS that returned the address. 
If yours doesn't say 192.168.1.1 there's still a problem in your
configuration.

Note, with dig you can specify "dig pc.garry.org" and 
"dig pc.garry.org @192.168.1.1", which might potentially show different
results (indicating that your DNS lookups aren't going to your router -
though I don't think that's the case).
 
> So even though I've told it the LAN's domain name and the name of the
> device (the ipaq) and its fixed IP, it goes to a non-local DNS server to
> get the IP. I would expect it to check the domain name passed by ping,
> notice it's that of the LAN, check the hostname, find the IP that it had
> assigned to that host and just return it.

It _should_ do that - but have you reconnected that device to the lan since
you reset the domain?  Your router should have a page that shows its DNS
entries.  Those entries get created only when your device requests an IP
from DHCP, so it won't have an entry for PC.GARRY.ORG unless you've run
dhclient from your PC since getting GARRY.ORG into the router settings.

>> - you can't use someone else's domain and expect it to work
> 
> Since I'm only using it on a LAN behind a router/firewall (or so I
> thought), I didn't expect to have these problems.

And mostly you won't, but any time your router fails to resolve the address
it kicks the problem upstairs - and then you see situations like this where
your address is resolving when you would really prefer it didn't.

>> You can even get a host name at no-ip.com ...
> 
> I don't think it's worth going to that much trouble. I'll make sure my
> local DNS works sanely and/or get a proper domain.

It was insanely easy to set that up :-)
> 
> By the way, thanks for your helpful comments so far.
> 
You're welcome.
-- 
derek





More information about the ubuntu-users mailing list