Slow connection establishment using telnet

Slow connection establishment using telnet

Post by André He?lin » Fri, 28 Feb 2003 04:05:03



Hi!

I am using Linux (Red Hat 8.0 with Kernel 2.4.20) on a second computer.
It's going online using WinRoute on a Windows computer (NAT).

The Linux PC has IP address 192.168.1.103 (name: linux)
The Windows PC has IP address 192.168.1.100 (name: andre)

Gateway and /etc/resolv.conf are configured correctly.

Everything works fine but when I want to establish a connection with
telnet on the Linux computer for example to google.com, the
establishment lasts about 10 sec.
But then it works fast.

The command is:
telnet google.com 80

The resolve via "host google.com" is usual fast.
And if I telnet the IP address of Google instead of the hostname, it
works fine, too.

The routingtable is:
Ziel            Router          Genmask         Flags Metric Ref    Use
Iface
192.168.1.0     *               255.255.255.0   U     0      0        0
eth0
127.0.0.0       *               255.0.0.0       U     0      0        0
lo
default         andre           0.0.0.0         UG    0      0        0
eth0

/etc/resolv.conf:
nameserver 192.168.1.100

/etc/hosts:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
192.168.1.103           localhost.localdomain linux
192.168.1.100           andre

I assume that there is a problem/timeout resolving hostnames.
There is no such a problem under X for example in Mozilla or XChat.
It only seem to be programs that work under the shell (like telnet or
Lynx).

The delay also occurs when I do a "telnet localhost 22".
In the logfile of WinRoute I see that the computer does a reverse lookup
even when I say localhost.
I think that this is wrong.

So what can I do?

Thank you very much!

--
Regards,
Andr

 
 
 

Slow connection establishment using telnet

Post by Snowba » Fri, 28 Feb 2003 07:42:48



> The delay also occurs when I do a "telnet localhost 22".
> In the logfile of WinRoute I see that the computer does a reverse lookup
> even when I say localhost.
> I think that this is wrong.

Try putting:
search localdomain

as the first line in /etc/resolv.conf

 
 
 

Slow connection establishment using telnet

Post by Rennie deGra » Fri, 28 Feb 2003 08:47:11


.
.
.

Quote:> /etc/resolv.conf:
> nameserver 192.168.1.100

> /etc/hosts:
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1               localhost.localdomain localhost
> 192.168.1.103           localhost.localdomain linux
> 192.168.1.100           andre

I take it that you have a DNS server running on the Windows box?  
Does it respond quickly to locally-generated queries?

Quote:> The delay also occurs when I do a "telnet localhost 22".
> In the logfile of WinRoute I see that the computer does a reverse lookup
> even when I say localhost.
> I think that this is wrong.

Check /etc/nsswitch.conf.  Under "hosts", make sure that "files" is
listed before "dns", and that you don't have "nis", "nisplus", "ldap",
or anything else mentioned (unless you are using one of these
services, of course).

Rennie deGraaf
System Administrator
Verano <www.verano.com>

 
 
 

Slow connection establishment using telnet

Post by Godwin Stewar » Fri, 28 Feb 2003 20:37:08



> Everything works fine but when I want to establish a connection with
> telnet on the Linux computer for example to google.com, the
> establishment lasts about 10 sec.
> But then it works fast.

Looks like the machine connected to the web doesn't have a reverse DNS
resolveable IP address. Your ISP should set up PTR records in their
in-addr.arpa zone so that hosts checking up on incoming connections can
find the hostname of the machine trying to connect.

--
G. Stewart   --   gstewart at bonivet dot net
                  gstewart at spamcop dot net
Registered Linux user #284683

GnuPG key  : BA3D01C6 (pgp.mit.edu)
Fingerprint: C3DF C686 6572 6E59 E3E4  0F40 2B9A 2218 BA3D 01C6
---------------------------------------------------------------
Before you criticize someone, you should walk a mile in
their shoes. That way, when you criticize them, you're
a mile away and you have their shoes.

 
 
 

Slow connection establishment using telnet

Post by André He?lin » Fri, 28 Feb 2003 21:35:23



> Looks like the machine connected to the web doesn't have a reverse DNS
> resolveable IP address. Your ISP should set up PTR records in their
> in-addr.arpa zone so that hosts checking up on incoming connections can
> find the hostname of the machine trying to connect.

My IP address is 80.130.112.27 at the moment.
If I do a lookup of this address using host 27.112.130.80.in-addr.arpa,
nothing happens:


On the Windows box the same.

If my ISP really doesn't have a reverse DNS resolveable IP address, can
I fix this delay or is there no workaround?

Thanks!

--
Regards,
Andr

 
 
 

Slow connection establishment using telnet

Post by André He?lin » Fri, 28 Feb 2003 21:37:43



> I take it that you have a DNS server running on the Windows box?  
Yes.
> Does it respond quickly to locally-generated queries?

Yes.

Quote:> Check /etc/nsswitch.conf.  Under "hosts", make sure that "files" is
> listed before "dns", and that you don't have "nis", "nisplus", "ldap",
> or anything else mentioned (unless you are using one of these
> services, of course).

I did it but it doesn't help.

--
Regards,
Andr

 
 
 

Slow connection establishment using telnet

Post by André He?lin » Fri, 28 Feb 2003 21:38:58



> Try putting:
> search localdomain

> as the first line in /etc/resolv.conf

Unfortunately this doesn't fix my problem either.

--
Regards,
Andr

 
 
 

Slow connection establishment using telnet

Post by enri.. » Sat, 01 Mar 2003 00:25:25




> > I take it that you have a DNS server running on the Windows box?  
> Yes.
> > Does it respond quickly to locally-generated queries?
> Yes.

> > Check /etc/nsswitch.conf.  Under "hosts", make sure that "files" is
> > listed before "dns", and that you don't have "nis", "nisplus", "ldap",
> > or anything else mentioned (unless you are using one of these
> > services, of course).

> I did it but it doesn't help.

> --
> Regards,
> Andr

You said telnetting to the explicit IP address is fast, telnetting the
domain name is slow even if resolving the domain name with 'hosts' is
fast.

I doubt it is related to reverse address lookup, telnetting the
explicit IP address would be just as slow.

Having no better idea, you could strace or ltrace telnet to see what
telnet is doing. You could also use ethereal to see if there are some
strange queries going out the wires and no responses coming back.

Regards, Enrique

 
 
 

Slow connection establishment using telnet

Post by Seth H Holme » Sat, 01 Mar 2003 03:21:14





>> > I take it that you have a DNS server running on the Windows box?  
>> Yes.
>> > Does it respond quickly to locally-generated queries?
>> Yes.

>> > Check /etc/nsswitch.conf.  Under "hosts", make sure that "files" is
>> > listed before "dns", and that you don't have "nis", "nisplus", "ldap",
>> > or anything else mentioned (unless you are using one of these
>> > services, of course).

>> I did it but it doesn't help.

>> --
>> Regards,
>> Andr

> You said telnetting to the explicit IP address is fast, telnetting the
> domain name is slow even if resolving the domain name with 'hosts' is
> fast.

> I doubt it is related to reverse address lookup, telnetting the
> explicit IP address would be just as slow.

> Having no better idea, you could strace or ltrace telnet to see what
> telnet is doing. You could also use ethereal to see if there are some
> strange queries going out the wires and no responses coming back.

Based on the fact you said you could not resolve 80.130.112.27 to a
hostname AND what this gentleman above stated, I would presume you
are having a DNS issue on your local system.

        [1:20pm][~]>>host 80.130.112.27
        Name: p5082701B.dip.t-dialin.net
        Address: 80.130.112.27

So I can resolve the reverse just fine.

--
Seth H Holmes

 
 
 

Slow connection establishment using telnet

Post by André He?lin » Sat, 01 Mar 2003 04:29:25


Quote:> Based on the fact you said you could not resolve 80.130.112.27 to a
> hostname AND what this gentleman above stated, I would presume you
> are having a DNS issue on your local system.

>    [1:20pm][~]>>host 80.130.112.27
>    Name: p5082701B.dip.t-dialin.net
>    Address: 80.130.112.27

The problem is solved. It was the nameserver of my Windows box.
It seems that the DNS module of WinRoute is not so fine, maybe in the
fact that reverse lookup doesn't work properly.
Now I'm using the nameserver of my provider in /etc/resolv.conf and now
there is no delay.

Thanks again!

--
Regards,
Andr

 
 
 

1. Slow TCP connection establishment

I've just established a new site to a customers WAN, ISDN using Cisco
routers.  When I try to establish a TCP connection(Telnet, POP, SMTP),
the connection takes approx. 75-90 seconds before any login prompts or
banners appear.  This only seems to be happening when I connect to the
servers, SCO Openserver5.  Other devices such as other routers or
servers( i.e.. printer servers) do not display this.  I've sniffed the
packets and can see the SYN, SYN-ACK and ACK packets setting up the
initial TCP connection, then there is a 75-90 delay till any other
options are negotiated and the login appears.  The ISDN connection is
the same as another site, same router and configuration and the ISDN B
channels are set to stay up indefinitely.  I've talked to Cisco and they
don't believe this is an issue with the routers.  Has anybody had a
similar experience?

Denny

2. PCI Modem troubles... 4.5-release

3. TCP connection establishment question (send to self)

4. Mansfield Ohio Person

5. Does anybody know ? : EADDRNOTAVAIL after 255 connection establishments

6. es1370 - where is the sequencer/midi driver ?

7. asynchronous I/O & non-blocking connection establishment

8. Looking for linld.com

9. telnet/ftp connection damn slow

10. Slow Internet connection or sluggishness cause Telnet session timeouts

11. routing problem? slow telnet connections.

12. Slow Telnet Connections

13. Why FTP/Telnet connection to Linux box is very slow ?