.:tutorialsM300FTP:home: Difference between revisions

From ADPAA
Jump to navigation Jump to search
(Created page with "=== Tutorial: Transferring Files using FTP === To transfer data from the M300 Data Acquisition System to another computer is possible using the FTP protocol (network port 21). The M300 will be referred to as the "client" and the other computer is the "server". ==Server Configuration== We will use a Linux computer for the FTP server. See https://ubuntu.com/server/docs/set-up-an-ftp-server for information on settin...")
 
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:


==Server Configuration==
==Server Configuration==
We will use a Linux computer for the FTP server.  See [[https://ubuntu.com/server/docs/set-up-an-ftp-server|https://ubuntu.com/server/docs/set-up-an-ftp-server]] for information on setting up vsftp on Ubuntu Linux.
We will use a Linux computer for the FTP server.  See [https://ubuntu.com/server/docs/set-up-an-ftp-server set-up-an-ftp-server] for information on setting up vsftp on Ubuntu Linux.  
 
To test that the vsftp server is installed:
  which vsftpd
  /usr/sbin/vsftpd
 
To check that the vsftp server is running and the ftp port is open, locally:
  nmap -p 21 localhostStarting Nmap 7.80 ( https://nmap.org ) at 2024-12-12 04:55 CST
  Nmap scan report for localhost (127.0.0.1)
  Host is up (0.00014s latency).
  PORT  STATE SERVICE
  21/tcp open  ftp
 
To check that the vsftp server is running and the ftp port is open, remotely:
  nmap -p 21 999.999.999.999
  Nmap scan report for 999.999.999.999
  Host is up (0.21s latency).
  PORT  STATE SERVICE
  21/tcp open  ftp
 
where 999.999.999.999 is the IP address of the vsftp server.
 
==Client (M300) Configuration==
 
To test the ftp client is installed on the M300 system
  which ftp
  /usr/ucb/ftp
 
Check that the network is up on the M300 system, which has an IP address of 192.168.11.225
  ping 192.168.11.225
  PING 192.168.11.225 (192.168.125.225): 56 data bytes
  64 bytes from 192.168.11.225:  icmp_seq=0 ttl=255 time=0 ms
  64 bytes from 192.168.11.225:  icmp_seq=0 ttl=255 time=0 ms
  64 bytes from 192.168.11.225:  icmp_seq=0 ttl=255 time=0 ms
 
Check that the network local ftp server is reachable, which has an IP address of 192.168.11.137
  ping 192.168.11.137
  PING 192.168.11.137 (192.168.125.137): 56 data bytes
  64 bytes from 192.168.11.137:  icmp_seq=0 ttl=255 time=0 ms
  64 bytes from 192.168.11.137:  icmp_seq=0 ttl=255 time=0 ms
  64 bytes from 192.168.11.137:  icmp_seq=0 ttl=255 time=0 ms
 
Check that the network is reachable from the local Linux client, which has an IP address of 192.168.11.137
  ping 192.168.11.225
  PING 192.168.11.225 (192.168.11.225) 56(84) bytes of data.
  64 bytes from 192.168.11.225: icmp_seq=1 ttl=255 time=0.216 ms
  64 bytes from 192.168.11.225: icmp_seq=2 ttl=255 time=0.292 ms
  64 bytes from 192.168.11.225: icmp_seq=3 ttl=255 time=0.299 ms
 
==Transfer Data on Local Network==
Need to be in directory where file is located. Note that a ftp user should be setup on the server. In the below example und is the user and password is not shown
 
  ftp 192.168.11.137
  Connected to 192.168.11.137.
  220 (vsFTPd 3.0.5)
  Name (192.168.11.137:und): und
  331 Please specify the password.
  Password:
  230 Login successful.
  Remote system type is UNIX.
  Using binary mode to transfer files.
  ftp> !ls
  aimmsdownheader.csv    nasanetout              opcdownheader.csv      radio.csv              wcmlink.csv
  aimmsdownlink.csv      nasaout.txt            opcdownlink.csv        wcm-input
  ftp> put opcdownheader.csv
  local: opcdownheader.csv remote: opcdownheader.csv
  200 PORT command successful. Consider using PASV.
  150 Ok to send data.
  226 Transfer complete.
  575 bytes sent in 0 seconds (0.562 Kbytes/s)
 
Note by default upload files are stored in the ftp user's home directory, for example /home/und

Latest revision as of 12:16, 12 December 2024

Tutorial: Transferring Files using FTP

To transfer data from the M300 Data Acquisition System to another computer is possible using the FTP protocol (network port 21). The M300 will be referred to as the "client" and the other computer is the "server".

Server Configuration

We will use a Linux computer for the FTP server. See set-up-an-ftp-server for information on setting up vsftp on Ubuntu Linux.

To test that the vsftp server is installed:

 which vsftpd
 /usr/sbin/vsftpd

To check that the vsftp server is running and the ftp port is open, locally:

 nmap -p 21 localhostStarting Nmap 7.80 ( https://nmap.org ) at 2024-12-12 04:55 CST
 Nmap scan report for localhost (127.0.0.1)
 Host is up (0.00014s latency).
 PORT   STATE SERVICE
 21/tcp open  ftp

To check that the vsftp server is running and the ftp port is open, remotely:

 nmap -p 21 999.999.999.999
 Nmap scan report for 999.999.999.999
 Host is up (0.21s latency).
 PORT   STATE SERVICE
 21/tcp open  ftp

where 999.999.999.999 is the IP address of the vsftp server.

Client (M300) Configuration

To test the ftp client is installed on the M300 system

 which ftp
 /usr/ucb/ftp

Check that the network is up on the M300 system, which has an IP address of 192.168.11.225

 ping 192.168.11.225
 PING 192.168.11.225 (192.168.125.225): 56 data bytes
 64 bytes from 192.168.11.225:  icmp_seq=0 ttl=255 time=0 ms 
 64 bytes from 192.168.11.225:  icmp_seq=0 ttl=255 time=0 ms
 64 bytes from 192.168.11.225:  icmp_seq=0 ttl=255 time=0 ms

Check that the network local ftp server is reachable, which has an IP address of 192.168.11.137

 ping 192.168.11.137
 PING 192.168.11.137 (192.168.125.137): 56 data bytes
 64 bytes from 192.168.11.137:  icmp_seq=0 ttl=255 time=0 ms 
 64 bytes from 192.168.11.137:  icmp_seq=0 ttl=255 time=0 ms
 64 bytes from 192.168.11.137:  icmp_seq=0 ttl=255 time=0 ms

Check that the network is reachable from the local Linux client, which has an IP address of 192.168.11.137

 ping 192.168.11.225
 PING 192.168.11.225 (192.168.11.225) 56(84) bytes of data.
 64 bytes from 192.168.11.225: icmp_seq=1 ttl=255 time=0.216 ms
 64 bytes from 192.168.11.225: icmp_seq=2 ttl=255 time=0.292 ms
 64 bytes from 192.168.11.225: icmp_seq=3 ttl=255 time=0.299 ms

Transfer Data on Local Network

Need to be in directory where file is located. Note that a ftp user should be setup on the server. In the below example und is the user and password is not shown

 ftp 192.168.11.137
 Connected to 192.168.11.137.
 220 (vsFTPd 3.0.5)
 Name (192.168.11.137:und): und
 331 Please specify the password.
 Password:
 230 Login successful.
 Remote system type is UNIX.
 Using binary mode to transfer files.
 ftp> !ls
 aimmsdownheader.csv     nasanetout              opcdownheader.csv       radio.csv               wcmlink.csv 
 aimmsdownlink.csv       nasaout.txt             opcdownlink.csv         wcm-input
 ftp> put opcdownheader.csv
 local: opcdownheader.csv remote: opcdownheader.csv
 200 PORT command successful. Consider using PASV.
 150 Ok to send data.
 226 Transfer complete.
 575 bytes sent in 0 seconds (0.562 Kbytes/s)

Note by default upload files are stored in the ftp user's home directory, for example /home/und