telnet/ftp is slow


I use Debian as Linux server and I run ftpd on it.

Then from Windows machine I telnet or ftp to this debian server,
everytime when I logon, it is always slow, takes about 1 minute before
it prompts me to input username and password.

Also, when I put/get files thru ftp, seems it is slow.

I guess something is wrong with the configuration?
Or maybe Linux does this intentionally for security reasons?

Anybody helps me? thanks
codenamecharlieAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

noondayCommented:
Check the DNS configuration on the Linux server.
0
leisnerCommented:
ftping on any account or a specific account?
anonymous?
A useful way to diagnose this is to monitor what's happening remotely via ethereal (i.e.
logging in may be causing nfs mounts, which may time out or something else surprising).

0
noondayCommented:
If it is slow to connect through telnet and it seems ok once you get connected, that's typically something wrong with DNS configuration. Just saw you also mentioned the get/put also seems slow after gets connected, you may want to investigate the more on network side.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Gabriel OrozcoSolution ArchitectCommented:
I agree with noonday

also please check

a) the wire. both from client to hub/switch, and the one from linux to hub/switch it should be a CAT5 wire.
b) the lan card. if it is failing it will throw many irq and other problems to the /var/log /messages or /var/log/syslog logs
c) the speed. just check if your card is 100mbits or 10mbits. with a simple ifconfig you should be able to see.
0
xDamoxCommented:
Hi,

Whats the FTP deamon you are using? also I would suggest removing the telnet deamon and replacing it
with the ssh deamon, the reason for this is because telnet is insecure.
0
sheetbirdCommented:
Also check to see that you not mixing duplexing between the switch/hub and both machines.  I've seen exactly what you're describing before.  This day and age everything should be full duplex, on linux you can probably use either mii-tool or mii-diag to see what duplex you're using.
0
Gabriel OrozcoSolution ArchitectCommented:
well... full duplex can only be used if you are using switches. hubs simply doesn't support it.

but if you can, as sheetbird says, go full duplex. not having it, it's like having a car but keep using a bicicle instead =)
0
kiffneyCommented:
the debian machine doesn't know the hostname of your windows machine and is trying to look it up in DNS.  If you put the windows machine name
in the debian machine's /etc/hosts file, like this:

192.168.1.100     windowsmachinename

then the one-minute lag after logging in should stop.

You can find out the windows hostname by opening a dos command box and typing
ipconfig /all
and look for the hostname line.
0
codenamecharlieAuthor Commented:

Thanks for your comments. Maybe I did not explain the problem clearly. Okay, here we go.  
My debian machine is 192.168.1.100 and my Windows XP machine is 192.168.1.200,
subnet mask is 255.255.255.0, so they are in the same subnet, I think there is no need
for DNS or Gateway, right?  Below is what happened when I tried to telnet to Debian machine
from my Windows XP machine:

$ telnet 192.168.1.100 -l jsmith
Trying 192.168.1.100...
Connected to 192.168.1.100.
Escape character is '^]'.
-----------HERE, IT WAITED for 20 seconds before promts for password----------
Password: ******
Last login: Mon Apr  3 04:56:33 2006 from 192.168.1.200 on pts/0
Linux debian.home.com 2.4.27-2-386 #1 Mon May 16 16:47:51 JST 2005 i686 GNU/Linu

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
jsmith@debian:~$

What puzzles me is that why it waited for so long (20 seconds) before prompting
for password??? The debian "deb file" I used to install this telnet daemon is
telnetd_0.17-29_i386.deb which I downloaded from http://packages.debian.org/stable/net/telnetd
0
codenamecharlieAuthor Commented:
BTW, forgot to mention, these two machines are just my home PCs
and they are just connected thru a hub, very simple & straightforward,
no complicated networking here.

-codenamecharlie
0
kiffneyCommented:
The debian machine waited so long because it was trying to find the name of the machine you were logging into.  After a timeout period it gives up and lets you log in.  Doesn't matter if the machines are on the same subnet or not - that's irrelevant to name lookup.  You see the line

Last login: Mon Apr  3 04:56:33 2006 from 192.168.1.200 on pts/0

that 192.168.1.200 would normally have the DNS name of your windows machine.  Try what I told you and see if that doesn't make the lag go away.
0
kiffneyCommented:
And you didn't give the IP addresses first time, I was just guessing what the IP addresses were.  S So what you do is put in the debian machine /etc/hosts file

192.168.1.200   windowsmachinename

substituting what you see under hostname when you do ipconfig /all on the windows machine for the word 'windowsmachinename'.

Next time you telnet in you should get logged in right away.  If it doesn't work, post the output of ipconfig /all from the windows machine, and the contents of /etc/hosts and /etc/resolv.conf from the debian machine.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gabriel OrozcoSolution ArchitectCommented:
Problem is correctly described by kiffney. teknet daemon is allowing you to login only *after* the timeout trying to resolve your ip address to a domain name.

solution can be a little more tricky, in my experience.

this is becase *maybe* you have your debian to resolve first using dns, and if timeout, then hosts file.

if you want to change this, edit the file /etc/host.conf to have something like
multi on
order hosts,bind

so you know telnetd will try to reslv first using hosts, and only if t fails, try bind (dns system)

if you have that, then you should do what kiffney wrote in his previous post
0
codenamecharlieAuthor Commented:
Great, I did what kiffney told me to do, and it worked!

Just add one line in /etc/hosts, that's it!

Also thanks other guys who posted comments.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.