This document explains how to use ftp (File Transfer Protocol) in the tcp/ip environment




Дата канвертавання19.04.2016
Памер24.91 Kb.

FTP


This document explains how to use FTP (File Transfer Protocol) in the TCP/IP environment.

Overview


FTP (File Transfer Protocol) is a standard TCP/IP protocol which allows a user to log-on to a remote host, and manipulate files on the host.

The Print Server can act as a FTP host, allowing FTP to be used for both configuration and printing. However, the following limitations apply:



  • Only one FTP user can connect to the Print Server.

  • Only “command line” FTP programs can be used. FTP programs which attempt to “browse” the file system are NOT supported.

Preparation


Because it supports dynamic IP Address allocation using DHCP, BOOTP, or RARP, the Print Server ships with an IP Address of 0.0.0.0. This is NOT a valid IP Address.

Therefore, you must do ONE of the following:



  • Check your DCHP server (if you have one), and determine the IP Address allocated to the Print Server.

  • Use BiAdmin or another Print Server utility to allocate a valid IP Address to the Print Server.

  • Add an entry to the arp table to associate the hardware address of the Print Server with the desired IP address, as follows:

arp -s IP_Address 00:c0:02:xx:xx:xx (Unix)

arp -s IP_Address 00-c0-02-xx-xx-xx (Windows)

Where:
IP_Address is the IP Address you wish to assign to the Print Server
00:c0:02:xx:xx:xx is the hardware address of the Print Server.

Example (Unix): arp -s 192.168.0.21 00:c0:02:12:34:56

Example (Windows): arp -s 192.168.0.21 00-c0-02-12-34-56

Note: The hardware address of the Print Server is shown on a sticker on the base of the device.

Using FTP


  1. Ensure that the Print Server is a valid device on your TCP/IP LAN.

  2. Start your FTP client from the command prompt (GUI interface FTP clients are NOT supported) and connect to the Print Server using its IP Address.

e.g. ftp 203.70.212.155

  1. The Print Server will respond with “Print Server Ready” and prompt for “Name”, as shown below:

Connected to 203.70.212.45
#220 Print Server Ready
Name (203.70.212.45:root):



Enter the name for this device. If you have not previously assigned a name, you must use the "Default name" (Server Name) shown on the sticker on the base of the unit. This name consists of 8 letters and/or digits.

  1. You will then be prompted for the password. If no password has been set, just press Enter.

  2. From the resulting prompt, you can manipulate the following files and use the following commands.

Files


The following files will appear on the Print Server when it is acting as an FTP host.

Filename

Purpose

Mode

CONFIG

Configuration file

Read/Write
(get, put)

DEFAULTC

Reset device to default configuration

Read (get)

PSINF

Device information

Read (get)

PASSRESET

Clear password

Read (get)

RESET

Reset device

Read (get)

SETIP

Save current IP address

Read (get)


Commands


Only the following commands are implemented. Commands are usually case sensitive. Where the command requires a parameter, the parameter is shown in italics.

dir

List files (as shown in the previous table).



get FILENAME

Retrieve a file. The only files that can be retrieved are CONFIG and PSINF. Using GET with the other “files” will activate a command, as follows:



get DEFAULTC

Set the Print Server back to its default configuration.

get RESET

Reset the Print Server. This also terminates the current connection.

get PASSRESET

Clear password (no password).

get SETIP

Set the current IP address as a static IP address.






Do NOT use the SETIP command if the device has an IP Address assigned by a DHCP server. This will cause an Address conflict.


put CONFIG

Copy the file CONFIG to the device, overwriting the existing CONFIG file. See the document for your model for details of the format of the CONFIG file.





After using the put CONFIG command to write a new configuration file to the device, you should issue a get RESET command. .

put PASSWORD

Copy the file PASSWORD to the Print Server, giving it a new password. Passwords can be up to 19 bytes in length.



put filename Ln

Copy the file filename to the printer connected to Logical Port n, where n is a Logical Port number. This will print the file.



quit

Terminate the current FTP session.



Other FTP Commands

The other FTP commands are not implemented, and will usually return the error message Invalid command.


Configuration using FTP


  1. Configure the Unix or Windows NT host so that the Print Server is recognized as a valid device on the LAN.

  2. Connect to the Print Server.

ftp NAME

  1. You will be prompted for Name, as shown below:

Connected to 203.70.212.45
#220 Print Server Ready
Name (203.70.212.45:root):



Enter the name for this device. If you have not assigned a name, you must use the "Default name" (Server Name) shown on the sticker on the base of the unit. This name consists of 8 letters and/or digits.

  1. You will then be prompted for the password. If no password has been set, just press Enter.

  2. Copy the configuration file CONFIG, to your system, then quit.

ftp>get CONFIG
ftp>quit

  1. Edit the CONFIG file to set parameters in the following four lines in the file.

0001 BOX_NAME:Name
4000 IP_ADDR:x.x.x.x
4001 GATEWAY:y.y.y.y
4002 MASK:z.z.z.z

Where
New_Name is the Print Server’s name.


x.x.x.x is the IP Address assigned to the Print Server.
y.y.y.y is the IP Address of your router, if you have one.
z.z.z.z is the network mask, if assigned.



You can set any configuration options by editing the CONFIG file. Refer to the Configuration File Format for your particular model for a detailed description of the CONFIG file.

  1. Copy the CONFIG file back to the Print Server, reset, and quit:

ftp NAME
ftp>put CONFIG
ftp>get RESET
ftp>quit

Printing using FTP


Connect to the Print Server, as explained above, then use the following syntax:

ftp>put FileName Ln

Where:

FileName is the file to be printed.
n is the number of the logical printer you wish to print to.

Example:


#ftp Marketing
ftp>put /etc/hosts L2

This example would print the file /etc/hosts to logical printer 2 on the Print Server named Marketing.



Printing using FTP is NOT recommended, (except for testing) because:

  • There can be only 1 FTP connection, so at any time only one user can print, even on multi-port models.

  • Print jobs are not spooled (queued).



Page


База данных защищена авторским правом ©shkola.of.by 2016
звярнуцца да адміністрацыі

    Галоўная старонка