You are here: Home > Knowledge Refreshers

KR editions 19 to 21 - FTP


KR-19 FTP 

A little about FTP this time: 

FTP (File Transfer Protocol) 

Did you know that we have an inbuilt FTP feature in Mainframes TSO . 

Just go to option 6 (Enter TSO or Workstation commands). On the command line type: 

    FTP ip-address 

Where ip-address is the server you want to connect to. We have the same FTP feature in DOS also. The mainframe’s FTP feature can also be invoked thro JCLs. We’ll have to execute the FTP program: 

EXEC PGM=FTP

followed by the SYSIN card where you can specify all your FTP commands.

In the next edition we’ll take a look at what FTP is?


KR-20 FTP

Hi everyone, 

A closer look at how servers server their clients (before that a little rhyme)
:

FTP, servers and clients 

File Transfer Protocol is a means of transferring files between 2 nodes (or 2 PCs on a network). Every PC in a network has an IP address. On every PC we also have something called as ports. The port identifies what sort of service the caller (i.e. the guest/client PC) wants from the receiver (i.e. the host/server PC). The host can provide a variety of services like Telnet, FTP, HTTP etc…. Now when the client connects to the server it’ll have to specify the IP address of the server (it is only through the IP address you can identify PCs on a network). But how will the server know what service the client wants? Or in other words how will the client request for a particular service from the server? To simplify this problem we have ‘ports’. They are basically a positive integer (generally a 16-bit number) which is mapped to particular services on the host machine. 

So, when the client (or guest) wants to connect to a server, the client will use an IP address followed by the port number. So if you send a request as: 

xxxx.xxxx.xxxx.xxxx : yy 

(where xxxx denotes the IP address and yy denotes the port number). 

the server receives this request and checks the port number. If port number is 21 then it’s an FTP request; if it’s 80 it’s a HTTP request (this is used to deliver webpages to the client) and so on…. 


KR-21 FTP

This is the last edition regarding basics of FTP. 

Have you ever wondered how a server can provide service to multiple clients at a time (and also provide different services)?
 

The host machine (the server) needs to have a program continuously running to monitor what requestsit receives. This is called the daemon. This program will receive requests and depending on the port number received it will invoke other progams to handle those requests (if 2 clients ask for the same service at the same time, then the daemon will invoke 2 instances of the same program to provide that service). If it’s port number 21 then the daemon will call the FTP program and ask it to handle the request. 

Some basic commands in FTP: 

FTP is a little like DOS. Once you connect into an FTP server you can navigate thro the server’s PC just like you would navigate on your own PC. 

cd dir-name 

        will take you to the directory specified by dir-name in the host 

cd .. 

        will take you to the parent directory (on the host machine) 

cd/ 

        will take you to the root directory (on the host machine) 

put local-file host-file-name 

        will copy the local-file to the server and name it as host-file-name 

get host-file local-file-name 

        does the reverse operation of put (get from server into our system) 

dir 

        lists the contents of the current directory 

lcd dir-name 

       change the directory on the local system (i.e. on client/our system)


Go back to the main contents page