Ethereal-users: Re: [Ethereal-users] 3 TCP Connections Instead of 2

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: fonte fonte <fonte_monte@xxxxxxxxx>
Date: Sat, 11 Mar 2006 23:33:51 -0800 (PST)
Thanks guys for useful info. Yes I can avoid the extra connection using command line ftp.

Andreas Fink <afink@xxxxxxxxxxxxxxxxxx> wrote:

On 08.03.2006, at 16:28, fonte fonte wrote:

Hi Tom

Thanks a lot for the info!

Is there anyway I can avoid this extra data connection and have only one data connection throughout the download? I don't know what I've done in the past when I managed to have only 1 data connection per download. Reason is I want to calculate total data throughput per download and by having 2 data connections, I'm not sure whether I should add up both throughputs or ignore the first connection (request of directory listing).  It's only a few packets with few bytes.


This is a question of the FTP client.
The FTP client opens a connection to the FTP server. So this is connection #1.
The FTP client then could start the download on the connection #2 right away.
Some clients might however fist check if the file exists by using a "ls" command on the FTP server.

If you do it on the command line you most probably will have 2 connections. If you do it on a GUI tool, it will have 1 connection followed by two connections, first  atransfer of the output of the "ls" command and a second one for the file itself.

try using "wget" or the command line tool "ftp".

Thanks

Heyligen Tom <Tom.Heyligen@xxxxxxxxxxx> wrote:
Fonte,

Whenever a FTP client requests a directory listing, this creates a new TCP connection. This connection is commonly referred to as a data connection, although the "data" it contains is a list of files/directories. This explains why you noticed ASCII mode and the "ls" (dir) command.

By default, graphical FTP clients like FileZilla automatically request a server directory listing for you, hence explaining a data connection even when not up/downloading any "real" files yet.

Hope this answers your question.

Best regards,
Tom Heyligen.



-----Original Message-----
From: ethereal-users-bounces@xxxxxxxxxxxx [mailto:ethereal-users-bounces@xxxxxxxxxxxx]On Behalf Of fonte fonte
Sent: woensdag 8 maart 2006 11:41
To: ethereal-users@xxxxxxxxxxxx
Subject: [Ethereal-users] 3 TCP Connections Instead of 2


Hi list

Another question from me. Why do I see 3 TCP (1 control and 2 data) connections for my FTP download instead of the usual 2 connections (1 control and 1 data)?

This is what I usually get from my captures:

On control connection (port 21):
Login to server
Access file folder
Request for file download etc

The last command I get before data connection takes over is 'FTP response 150 opening binary mode data connection for ftp_sco_com.tar'. Then right after that on data connection (port 20), the download begins after handshake.

So I only have 2 TCP connections.

However, of late, there's always an extra data connection created everytime I did the download.

On control connection everything was fine, however, I noticed that the last command I got before the first data connection took over was 'FTP response 150 opening ASCII mode for /bin/ls'. Then the first data connection took o ver, managed to send 56 bytes of data then immediately sent a FIN (and ACK,FIN by client). The content of data was the file name ftp_sco_com.tar.

After this happened, control connection continued to request for the file download and I finally got the 'FTP response 150 opening binary mode data connection for ftp_sco_com.tar'. The second data connection took over and the download beg un as normal (on different client port).

So I have 3 TCP connections.

I don't have a clue why the extra data connection was created, and why it was on ASCII mode etc. To me, this data connection was a little bit 'premature', it seemed to be interrupting the process.

Hope anyone can give any ideas. By the way I set the transfer type to Auto in FileZilla.

Thanks
_______________________________________________
Ethereal-users mailing list
Ethereal-users@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-users



Yahoo! Mail
Use Photomail to share photos without annoying attachments.
_______________________________________________
Ethereal-users mailing list


Andreas Fink
Fink Consulting GmbH

---------------------------------------------------------------
Tel: +41-61-6666332 Fax: +41-61-6666331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
---------------------------------------------------------------

ICQ: 101946485 MSN: msn1@xxxxxx AIM: smsrelay Skype: andreasfink
Yahoo: finkconsulting SMS: +41792457333
PGP9: 0714 DF2B A189 A760 6201  5CBD D040 3E71 4DAF 68BB




Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.