[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Local address lookup (SOLVED!)



I found the answer to the question why telnet to a local machine involves the DNS in the outside world.

The version of telnet which comes with woody apparently does *not* do a straightforward gethostbyname(). What it *does* do, I do not know because I haven't looked at the source. But I did make a small test program with gethostbyname() and that does not call the outside DNS for local addresses.

However it *is* possible to avoid DNS lookup with telnet if you use the option -4, which forces IPv4 address resolution. So now I made telnet -4 an alias for telnet. Maybe this will lead to problems later on, but so far it works fine. In particular, there is no delay in telnetting to a local box when the Internet connection is down.

I wonder if this (to me) unexpected behaviour of telnet should be counted as a bug (to be reported), or as a feature.

Regards, Jan




Reply to: