Re: [SLUG] hostname resolution wackiness

From: Chad Perrin (perrin@apotheon.com)
Date: Sun Jul 11 2004 - 00:46:38 EDT


Paul M Foster wrote:

>
> Forget the fact that your Windows machines can talk to each other.
> Doesn't have anything to do with it. They're using Windows crap to
> figure out each other.
>
> Your Linux boxen can't talk to each other because they can't equate the
> hostname you're giving them with the IP they have to have to find each
> other. The fact that you can ping by IP means the network infrastructure
> is working.
>
> There are several ways to allow machines to resolve names. First is to
> assign fixed IPs to machines in each machine's /etc/hosts file. For each
> machine on the network, the /etc/hosts file will host the names, aliases
> and IPs of all the other machines on the network. Someone else explained
> this elsewhere on this thread. But this won't work if you're assigning
> IPs via DHCP.
>
> The other way to do this is with an internal DNS server. Equating IPs
> with hostnames is exactly what the DNS does, both on the internet and
> internally on your network.
>
> The problem is that you're dynamically assigning IPs via DHCP. I'm told
> that some DNS servers can compensate for this DHCP practice, but I don't
> know how to do it, nor do I know which DNS servers will do it.
>
> A better idea might be this: When each machine comes up, it can be
> configured to have a specific IP address and hostname. This is done on
> Debian via the /etc/network/interfaces file (I can send you a sample
> one). Make sure that each machine configures itself for a different IP
> address. Note that these are _fixed_ IPs. Now set up a DNS server that
> knows all these IP-hostname translations.
>
> Bottom line is that if you insist on dynamic IPs on your LAN, you're
> going to have a difficult time getting your machines to recognize each
> other by hostname. It will be easier to make the IPs fixed.
>

The fact that my Windows machines can talk to each other is actually relevant,
however. I need my Linux machines to be able to contact the Windows machines by
hostname. That is one of the things I'm trying to accomplish. Thus, the fact
that the Windows machines are talking to each other means that there's at least
some kind of WINS or NetBIOS broadcast going on in the network. Additionally, I
can resolve by hostname from the Linux boxen when using nmblookup. It's ping
that's falling flat on its face, along with some other (more actually useful for
reasons other than diagnostics) utilities/applications.

The reason I need dynamic IPs involves the fact that computers tend to enter and
leave this network regularly. This network, among other things, must accomodate
the computers of clients when they're being worked on. It would be nice, from
time to time, to be able to contact said comeputers from a Linux machine without
having to change the network configuration on each Linux machine when I connect
the computer to the network. I'd rather do it "right".

It seems that if Samba can handle resolution of NetBIOS names using nmblookup, I
should be able to get name resolution through other utilities like ping as well.
  It might be "easier" to use fixed IPs, but that would neuter the network's
effectiveness for my purposes. In other words, that's a non-solution in this case.
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:23:22 EDT