The basic concept behind the distributed features in Dfptd is creating virtual
links (aliases) to other FTP servers. This is very similar to the concept of
virtual directory links. With virtual directory links you can create a
directory "/d-drive" that points to "D:\". In this case, if a client changes to
the "/d-drive" directory they will actually be seeing the "D:\" directory.
Creating remote aliases is basically the same thing except now you can create a
directory called "/petes-server" that point to "ftp.petes-server.com:21". Now
if a client changes to the "/petes-server" directory they will actually be
seeing a directory on the FTP server running on "ftp.petes-server.com:21".
When transferring files to/from remote (aliased) sites, a method similar to
FXP* is used. Therefore, only the control connections are
funneled through the central FTP server while data connections are made directly
between the client and remote (aliased) server (see Figure 1). This means that the
speed at which files can be transferred from the remote site does not depend on
the link speed of the home FTP server the client is connected to. This method
works regardless of whether the client is using active (PORT) or passive (PASV)
mode. However, the FTP servers being used for the remote sites must allow FXP*
-- data connections from IP addresses that are different than the control
connection. It should also be noted that active mode connections will usually
not work if the client is behind a firewall. This is because active mode
required that the FTP client act as a server when transferring data, which will
be blocked by the firewall.
Dftpd supports aliases, or links, to remote servers using two modes: generic
and Dftpd. A generic alias can be made to just about any FTP server that allows
FXP*. In this mode the Dftpd server uses a specified account to connect to the
remote server (on demand) and pools the connection among the Dftpd clients.
From the remote server's point of view the Dftpd server looks like a regular
client. When using generic mode, all the Dftpd clients share the connections to
the remote server. If more than one Dftpd client wants to get a file from the
remote server, the Dftpd server will create additional connections -- unless
the maximum number of connections is reached. Generic mode is the default when
a new alias is created.
In Dftpd mode, the user's state (Ex. credits, transfer rate, etc.) is preserved
across servers. This mode only works when the remote server is also a Dftpd
server. In this case, just like in generic mode, the central Dftpd server
creates a client connection to the remote server. However, rather than pooling
the connection, a new control connection is negotiated specifically for the
user (see Figure 2). From the remote server's point of view the user's connections
appears as a special remote login. A remote login is displayed in the form
<Username>$<HomeIP>$<HomePort> where the "HomeIP" and
"HomePort" are the address and port of the server the user was created on --
the server that contains the "user file" for the user. The master copy of a
user's properties is always the "user file" on the home server. All other
remote copies of a user's properties are treated as a cache and are
overwritten. Therefore, any permanent changes must be made on the user's home
machine. To enable Dftpd mode for an alias, the mode must explicitly be set to
Dftpd -- the default is generic mode.
Another distributed capability of Dftpd is to share users with other sites.
Using this method a user can login to a server other than the home server. To
make this work, the Dftpd server the user is trying to login to must have an
alias set up, with the "share_users" flag set, to the user's home site . Also,
the home site for the user must have an alias that points back to the server
the user is trying to login at. When setting this up it is important that the
IP and port for the alias on the home site be the same as the IP and port sent
by the remote server when the "shared user" login is attempted. When a shared
login is complete, the user will appear as a remote user, even though the user
is directly logged in (see Figure 3).
* FXP is the name given to the technique when a client connects to 2
FTP servers and negotiates a transfer directly between them -- without going
through the client.