Solved

Any Solution to FTP Client's Weird Behavior?

Posted on 1998-03-26
5
254 Views
Last Modified: 2013-12-23
I have a question regarding FTP Timeout.

During FTP session, if some problems has happened within the IP network,
and if such problems has lasted for a certain duration of time,
FTP server (ftpd) close the session, however it SEEMS that FTP client
 (ftp) has no way to detect that the session is out of service UNTIL
FTP client tries another command after the network has been recovered.
As far as we have examined, before the network is recovered,
FTP client even needs to be killed by hand.

From the point of TCP/IP protocol, both TCP server and client is able
 to detect how long any packets has not been transmitted during its
TCP session and then to close the session if no transmission is
done for a duration of time, which was specified by Time-out parameter.
It seems extremely weird that FTP client has no way to close the
session at its own convenience.

I would like to know the way to make FTP client CLOSE the session
 or to make FTP find the fact that the concerned file transmission
 has failed.  Anybody can help me out?  Await for your response!
0
Comment
Question by:guo
5 Comments
 

Expert Comment

by:atheneyc
ID: 1583203

Try the passive mode of FTP.
Since the data session (port 20) of ftp is initiated from the server, so the client needs to time-out rather than giving up when the server disappeared on the network.
The passive mode (hopefully supported by yours) gets around this because the data session is also initiated from the client. This mode is also used when setting up packet filtering in firewall.
0
 

Expert Comment

by:vkg063097
ID: 1583204

Use hash command in ftp. This will print # for each 4096 byte
it receive from the server or viceversa.
0
 
LVL 1

Accepted Solution

by:
mrausch earned 100 total points
ID: 1583205
If you have the means to recompile your FTP client, try setting
the socket option SO_KEEPALIVE on the FTP control connections;
see the manual page to the syscall setsockopt() on your unix
system for more information. The client sets some socket options
on his connections anyway, so with a little knowledge of C it should be no problem to do this.
This will send keep-alive packets on the TCP connection (a bit like ICMP pings), and the OS on the client side will care about
the remote not answering anymore, and thus shutting down the connection.

0
 

Author Comment

by:guo
ID: 1583206
Thanks for your answer.
We are planning to use Solaris 2.6. Would you please tell me whether Soloris supports passive ftp, how to confirm and how to use it?

0
 

Expert Comment

by:atheneyc
ID: 1583207
Unfortunately, the ftp on my Solaris 2.6 does not support passive mode. To check yours, simply type ftp. Then in the ">" prompt, type "?" to see if there is any "passive" command show up.

Normally, I don't find any ftp bundled with the original OS (e.g. AIX 3.2.5, SCO, Solaris 2.5.1/2.6, IRIS, Windows 95, etc.) supporting passive mode ftp EXCEPT Linux!!

Therefore, you may download one and comply by yourself. Try the following URL:

http://hobbes.cdrom.com/pub/linux/tsx-11/packages/net/telnet+ftp/

and choose the wu-ftp-2.4-fixed.tar.gz

You may search other site for the wu-ftp and you may probably find a pre-complied Solaris 2.6 package. However, I prefer to comply by myself.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
I had an issue with InstallShield not being able to use Computer Browser service on Windows Server 2012. Here is the solution I found.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now