Re: telnet on local LAN question



Tim:
That's a rather complex explanation, which sounds like you're giving
each machine a unique hosts file, where their own hostnames are written
differently than the other machines on the LAN. I wouldn't do that.

Andre Speelmans:
It sounds to me quite normal what he says.
Every host has a hosts-file where all other machines are listed as
<ip> <fqdn> <short name>
And the local machine has its name added to the 127.0.0.1 line.

The complex part I was referring to wasn't about the local loopback
addresses, but the name.localdomain versus othername.localdomain
descriptions, and the two subnets:

"For the other machines, its name is removed in the 192.168.10.x
list and 192.168.2.13 <name>.localdomain <name> is added"

Generally speaking, it's better to give specific examples of what you're
doing, rather than trying to boil it down to something generic. Some
important details may get lost in the translation. And it makes it
harder to give advice; and that advice will need translation into your
specifics, too.

I don't see any problem with a machine that has the same name on
different addresses. One of our servers actually does have 10 NIC's,
of which some are bonded and some have aliases, leaving it with about
a dozen IP-adresses. It still has only one hostname. Depending on who
or what is talking to it, it will know which IP to use. (Of course,
you know that.)

It depends on what use you're making of the hostname. If you're merely
trying to say that "fred" is this box, and "george" is that box, no
problem. But if you're trying access a box through a particular
interface, but are addressing it by a /name/ that doesn't have a
correlation to a specific interface, /that/ may be a problem.

You don't need to put hostnames into specific interface configuration
files. The computer *works* *out* its host name from its IP.

Normally the hostname is put into the file /etc/sysconfig/network.

May be... May not be. You can also have differences where /you/ may
set up your computer, and call it "fred." But, as far as the LAN is
concerned, the DHCP server has assigned IPs, and the DNS server says
that IP will be referred to as george. In that case, working name
resolution is very important as to how other computers access it. A
computer can call itself whatever it cares to, but how the /other/
computers know it is important for networking.

And regarding the working out the hostname: it does not even need to
know its own name to send or receive data. All it needs to know is the
IP-address of the remote machine. It will not do reverse or any
look-up to resolve its own hostname to do a telnet to a remote server.

It depends on the network activity. Reverse lookups are used to work
out hostnames and domain names, when they're not preset in some other
way.

The original poster isn't trying to "telnet," they're using the the
telnet client as a diagnostic tool for other services. A mail
server /is/ one of those services that does do forward and reverse name
look-ups, particularly if you configure things to minimise being used as
a spam service.

Ping works great between all of the machines for both <otherX> and
<otherX>.localdomain, lists the 192.168.10.x address like a happy camper
should

This part from OP is a dead give-away that his hosts file are
apparently working fine, that his network configuration is okay and he
has packets going out and being received. Name resolving, gateways,
whatever has no part of it. If that would be the case, ping would not
work.

Partially... Remember that he had two subnets (192.168.10 and
192.168.2)

He is not doing any MX-queries, he is telnetting to the mailserver.

Now... But, later, if he wants to do full email service between all
machines, it may be important to do everything properly.

You might want to expand upon *why* you're wanting to use different
FQDNs for machines. That may point out where the snag is.

As far as I see, he is not.

It looked to me like he was. But his original post was far from clear.

It does sound like IP and name resolution is your prime problem.

No, after all he can ping them by name. Name resolving works. And
reverse lookups by the mail server are done after it has made a
connection.

That /is/ part of name resolution.

For anything more than about three machines I prefer using DNS than
hosts files. It gets a pain having to synchronise changes across
several computers, particularly if you experiment and change names and
IPs around.

DNS is indeed the way to go for a larger environment. Three computers?
I would probably use hosts files.

Been there, done that, don't want to do it again.

I've found that /three/ computer networks tends to be the boundary.
When you get to that level, people start using servers, or things
between the computers (rather than just using a computer as a solo
machine, or accessing the internet). Some servers are better with
proper DNS. And you may find that such LANs /normally/ have three
computers, but /occasionally/ more get connected.

But then, you tell you switch the IP's often. And although off topic I
really wonder: why?? A servers IP-address is about one of the most
static things I can think of.

Not me, but it's the sort of thing I see happening. And this is one the
cases where using the hosts file is a big problem: People using a LAN
with a DHCP server that automatically doles out IP addresses without
specific rules (so the same machines always get the same IPs), such as
their modem/router. They try setting names and IPs in their hosts file,
that don't accord with how their LAN is actually set up.

/Sometimes/ I occasionally change IPs to test things, such as plugging
in a test computer using different IPs so you can test firewall rules.

Then you have things, like a laptop, which has wireless interface and a
wired interface, either of which may be used at different times.
They'll have different IPs, if left to automatic configuration. They'll
only have the same IP if you have custom configurations (either on the
client, or the DHCP server). They'll have to have different IPs if both
interfaces are connected simultaneously.

And it's certainly been with things like a laptop where I've noticed
that name resolution rears its ugly head.

e.g. If my laptop is usually 192.168.1.10 wired or 192.168.1.11, and the
hostname is tied to one of them, but the laptop is booted up with that
interface offline, you'd have things like logging in taking forever and
day, because of some NFS issue, or X wanting to that hostname's
interface to be alive.

I want to make clear to the OP that name resolving is *not* his
primary problem, seeing he can ping by name.

From subsequent postings, that would appear to be the case. But not
originally. And it does still look like there's some strangeness to the
network (or certainly lack of detail that makes it clear).

--
[tim@localhost ~]$ uname -r
2.6.27.25-78.2.56.fc9.i686

Don't send private replies to my address, the mailbox is ignored. I
read messages from the public lists.



--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines