Re: telnet localhost slow, telnet 127.0.0.1 ok
Shyamal Prasad <shyamal.prasad@sbcglobal.net> wrote:
> "Rupert" == RUPERT LEVENE <levene@unix.lancs.ac.uk> writes:
> Rupert> Antony Gelberg <antony@antgel.co.uk> wrote:
> >> On Sat, Aug 16, 2003 at 12:25:16AM +0100,
> >> r.levene@lancaster.ac.uk wrote:
> >>> Running strace telnet localhost 22 shows that it's trying to
> >>> resolve the hostname localhost by querying the nameserver. I
> >>> thought that shouldn't happen with my setup, though.
> >> Does your /etc/host.conf contain order hosts,bind
> Rupert> Yes, it does.
> I did not see the original post, but the other thing you must have is
> that /etc/hosts must resolve local host to 127.0.0.1 too
Yes, I have this. Here is another list of things I think could be
relevant.
Rupert
/etc/hosts
127.0.0.1 localhost
192.168.0.205 deb150desktop
/etc/resolv.conf
nameserver 192.168.0.1
/etc/hostname
deb150desktop
/etc/nsswitch.conf
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
/etc/hosts.conf
order hosts,bind
multi on
deb150desktop:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:4F:4C:03:38:75
inet addr:192.168.0.205 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:29528 errors:0 dropped:0 overruns:0 frame:0
TX packets:26981 errors:0 dropped:0 overruns:0 carrier:0
collisions:13 txqueuelen:100
RX bytes:3027177 (2.8 MiB) TX bytes:8676934 (8.2 MiB)
Interrupt:11 Base address:0x300
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:634 errors:0 dropped:0 overruns:0 frame:0
TX packets:634 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:224937 (219.6 KiB) TX bytes:224937 (219.6 KiB)
deb150desktop:~# host localhost
localhost has address 127.0.0.1
Reply to: