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

Garry Knight garryknight at gmx.net
Wed Jan 24 04:19:14 UTC 2007


Derek Broughton wrote:

> What's in your /etc/resolv.conf?

Just what you'd expect:
nameserver 192.168.1.1

> then you need to be able to set your domain name on the router - what
> model is the router?  We should be able to figure out how you do that.

It's a Netgear WGT624 v3. And I'm now kicking myself because I'd looked all
through the WAN Setup page, the LAN IP Setup page, the Dynamic DNS page -
everything that looked like it might have an input box for a domain name -
and it turns out it was on the Basic Settings page all along.

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

[garry ~]$ ping ipaq.garry.org
PING ipaq.garry.org (192.168.1.4) 56(84) bytes of data.
64 bytes from ipaq.garry.org (192.168.1.4): ...

I then comment out the line in /etc/hosts:
#192.168.1.4            ipaq.garry.org ipaq pocketpc

And try another ping:

[garry ~]$ ping ipaq.garry.org
PING ipaq.garry.org (209.123.16.48) 56(84) bytes of data.
64 bytes from 209.123.16.48: ...

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.

If I just ping on the hostname alone:

[garry ~]$ ping ipaq
PING ipaq.garry.org (209.123.16.48) 56(84) bytes of data.
64 bytes from 209.123.16.48: icmp_seq=1 ttl=54 time=112 ms

it already knows the domain name so it concatenates it to the hostname, but
still goes out to the Internet for DNS.

Maybe I need to read more on how routers work...

> Then, you either need to use your own Internet domain name, or as
> suggested garry.local

I'll try garry.local tomorrow - it's already too late in the day. And I'll
get my own domain when I can think of a suitable one that hasn't already
been taken.

> - 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 as long as I've got a
sane /etc/hosts, I don't have a problem. Unless I want to use dynamic IPs,
that is.

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

By the way, thanks for your helpful comments so far.

-- 
Garry Knight
garryknight at gmx.net






More information about the ubuntu-users mailing list