Re: telnet localhost slow, telnet 127.0.0.1 ok

From: Kevin Buhr (buhr_at_telus.net)
Date: 08/30/03

  • Next message: Brendan & Jennifer Smith: "dist-upgrade -vs- apache -vs- newbie"
    To: r.levene@lancaster.ac.uk
    Date: 29 Aug 2003 17:25:33 -0700
    
    

    r.levene@lancaster.ac.uk writes:
    >
    > If I run telnet localhost 22 then I have to wait 15-30 seconds before it
    > connects; with telnet 127.0.0.1 22 it connects at once. I have the same
    > results using other open ports.

    Does

            telnet -4 localhost

    give the same delay? If not, then the problem is IPv6 support. Even
    though all your resolution configuration files are set up correctly,
    "telnet" is using "getaddrinfo()" to grab *both* IPv4 and IPv6
    addresses for "localhost". The former gets looked up in the "hosts"
    file, but the latter goes out to your nameserver. If you want, you
    can add "localhost" to the "::1" line in "/etc/hosts" like so:

            ::1 ip6-localhost ip6-loopback localhost

    and that'll allow you to do "telnet localhost" without delay. That
    may cause problems with other programs, though, which might try to use
    IPv6 addresses in preference to IPv4 addresses without falling back if
    they can't connect to the IPv6 address.

    And, if the nameserver you're using always chokes on IPv6 queries (not
    just for "localhost"), then "telnet anyhostname" will always give the
    same delay, and you're better off aliasing "telnet" to "telnet -4".

    -- 
    Kevin <buhr@telus.net>
    -- 
    To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Brendan & Jennifer Smith: "dist-upgrade -vs- apache -vs- newbie"

    Relevant Pages

    • Re: TCPIP programming (sockaddr_in question)
      ... me too (Specifically Telnet); ... INET6 socket so that all the progeny get IPv6 capabilities. ... Most TCP/IP stacks that support both IPv6 and IPv4 allow a service to listen ... The request for a sockaddr returns an IPv6 ...
      (comp.os.vms)
    • Re: Transmission problems on 64 bit AMD processors but not 32 bit AMD processors
      ... The thing is that I send raw data and recieve it with telnet. ... And the server is a 32 bit application running on 32 bit windows on ... If I put a delay in the send-loop, ...
      (microsoft.public.win32.programmer.networks)
    • Re: telnet localhost slow, telnet 127.0.0.1 ok
      ... telnet, lynx and links all suffer from a delay. ... a slow machine and a slow nameserver is exposing an odd bug in these ...
      (Debian-User)
    • Re: Network service startup time
      ... I can telnet to the services from the localhost with no delay. ... >Subject: Network service startup time ... To unsubscribe, ...
      (freebsd-questions)
    • Re: inetd.conf -- IPv6 telnet
      ... > just wondering about this thing i just noticed in 4-stable that telnet ... > comes default running under IPv6 in inetd.conf. ... > someone would exploit over IPv6, but i was wondering about consistancy in ... > relation to what's being done already for IPv4? ...
      (FreeBSD-Security)