Bug 167408 - telnet <IP Address> takes a long time if nameserver is not reachable
telnet <IP Address> takes a long time if nameserver is not reachable
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: telnet (Show other bugs)
4
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-02 09:48 EDT by Abhijeet Udas
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-05-15 04:53:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Abhijeet Udas 2005-09-02 09:48:28 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
My 
say IP address is 192.168.0.42
my default gateway is 192.168.0.1
& in the /etc/resolv.conf
i specify nameserver as 123.123.123.123 { Non reachable IP }
& if i try
telnet 192.168.0.1
it takes a while for it to get telnet. 
The same thing with everything commented out in /etc/resolv.conf is almost instantaneous.

why should telnet do a dnslookup when i give the IP address of a machine to connect to ?

Version-Release number of selected component (if applicable):
telnet-0.17-35

How reproducible:
Always

Steps to Reproduce:
1.Edit resolv.conf and remove all entries & add nameserver 123.123.123.123 { non reachable machine }
2.try telnet <IP address> , it takes a while for u to get telnet prompt from the machine.
3.Now comment every thing in the /etc/resolv.conf
4.Try telnet <IP address> , its almost instant.
  

Actual Results:  Certain time lag before telnet actually connects to the target device.

Expected Results:  Instant connection to the telnet target.

Additional info:

telnet-0.17-35 - Telnet version.
Kernel Version 2.6.11-1.1369_FC4

This problem also persistant in FC 3.
Comment 1 Harald Hoyer 2005-09-02 10:20:51 EDT
it seems, it does a reverse host lookup for the hostname... dunno why, has been
so for years, cause nothing changed that behaviour.
Comment 2 Abhijeet Udas 2005-09-02 15:12:01 EDT
(In reply to comment #1)
> it seems, it does a reverse host lookup for the hostname... dunno why, has been
> so for years, cause nothing changed that behaviour.

Yeah i spent a whole day trying to figure out this wiered problem,
& funnily it was never discoverd all this while!


All it should do is connect to the IP address and not do a name lookup. 
Comment 3 Karsten Hopp 2006-05-15 04:53:32 EDT
This has been fixed in the meantime. I've tested this on Rawhide and telnet
doesn't try look up hostnames anymore when you give it an IP address.

Note You need to log in before you can comment on or make changes to this bug.