Solved

Any Solution to FTP Client's Weird Behavior?

Posted on 1998-03-26
5
253 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Some time ago I was asked to set up a web portal PC to put at our entrance. When customers arrive, they could see a webpage 'promoting' our company. So I tried to set up a windows 7 PC as a kiosk PC.......... I will spare you all the annoyances I…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

705 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

12 Experts available now in Live!

Get 1:1 Help Now