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

Garry Knight garryknight at gmx.net
Mon Jan 22 16:47:21 UTC 2007


Derek Broughton wrote:

> That seems odd.
...
> You _shouldn't_ have to specify the host names anywhere but on the
> computer that uses that name - it sends its name to the DHCP server, the
> DHCP server adds that name to its table of hosts, and returns an IP.

It's very odd. My router is set up to use DHCP to assign IPs, but to assign
the same IP to each machine according to its MAC. My /etc/hosts currently
looks like this:

127.0.0.1              localhost
192.168.1.2            pc.garry.org pc garry
192.168.1.3            thinkpad.garry.org thinkpad laptop
192.168.1.4            ipaq.garry.org ipaq pocketpc

So I can ping each machine by IP or by name. Now, if I comment out lines 2
and 3, I get the following:

[garry ~]$ ping pc
PING pc.garry.org (209.123.16.48) 56(84) bytes of data.
64 bytes from gateway.visual.com (209.123.16.48): ...
...
[garry ~]$ ping thinkpad
PING thinkpad.garry.org (209.123.16.48) 56(84) bytes of data.
64 bytes from gateway.visual.com (209.123.16.48): ...

[garry ~]$ host 209.123.16.48
48.16.123.209.in-addr.arpa domain name pointer gateway.visual.com.

So whichever host on the LAN I ping, it's routed to 209.123.16.48 even
though it seems to get the domain name right. Very odd.

And this is happening when I'm pinging from thinkpad which is on a wireless
link to the router. And 'route' on thinkpad shows this:
Destination     Gateway         Genmask         Flags Metric Ref    Use
Iface
192.168.1.0     *               255.255.255.0   U     35     0        0 ra0
169.254.0.0     *               255.255.0.0     U     35     0        0 ra0
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    35     0        0 ra0


I should apologise for hijacking the thread, by the way, especially as I
haven't got round to installing Ubuntu onto the laptop yet, so it's
actually the Mandriva 2007 software that's handling the ping, though I
doubt that that should make a difference.

-- 
Garry Knight
garryknight at gmx.net






More information about the ubuntu-users mailing list