HP 6125G HP 6125G & 6125G/XG Blade Switches Fundamentals Configuration - Page 77

Configuring FTP, Using the device as an FTP client, Establishing an FTP connection

Page 77 highlights

Configuring FTP File Transfer Protocol (FTP) is an application layer protocol based on the client/server model. It is used to transfer files from one host to another over a TCP/IP network. FTP server uses TCP port 20 to transfer data and TCP port 21 to transfer control commands. For more information about FTP, see RFC 959. FTP supports the following transfer modes: • Binary mode-Used to transfer image files, such as .bin files. • ASCII mode-Used to transfer text files, such as .txt, .bat, and .cfg files. FTP can operate in either of the following modes: • Active mode (PORT)-The FTP server initiates the TCP connection. This mode is not suitable when the FTP client is behind a firewall, for example, when the FTP client resides in a private network. • Passive mode (PASV)-The FTP client initiates the TCP connection. This mode is not suitable when the server does not allow the client to use a random unprivileged port greater than 1024. The FTP operation mode varies depending on the FTP client program. The device can act as the FTP client or FTP server: Figure 35 FTP application scenario Using the device as an FTP client To connect to an FTP server or enter FTP client view, make sure the following requirements are met: • You have level-3 (Manage) user privileges on the device. In FTP client view, whether a directory or file management command can be successfully executed depends on the authorization set on the FTP server. • The device and the FTP server can reach each other. • You have a user account (including the username, password, and authorization) on the FTP server. If the FTP server supports anonymous FTP, you can directly access the FTP server without a username and password. Establishing an FTP connection To access an FTP server, use the ftp command in user view or use the open command in FTP client view to establish a connection to the FTP server. You can use the ftp client source command to specify a source IP address or source interface for the FTP packets sent by the device. If a source interface (typically a loopback interface) is specified, its primary IP address is used as the source IP address for the FTP packets sent by the device. The source interface setting and the source IP address setting overwrite each other. 71

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135

71
Configuring FTP
File Transfer Protocol (FTP) is an application layer protocol based on the client/server model. It is used to
transfer files from one host to another over a TCP/IP network.
FTP server uses TCP port 20 to transfer data and TCP port 21 to transfer control commands. For more
information about FTP, see RFC 959.
FTP supports the following transfer modes:
Binary mode
—Used to transfer image files, such as
.bin
files.
ASCII mode
—Used to transfer text files, such as
.txt
,
.bat
, and
.cfg
files.
FTP can operate in either of the following modes:
Active mode (PORT)
—The FTP server initiates the TCP connection. This mode is not suitable when
the FTP client is behind a firewall, for example, when the FTP client resides in a private network.
Passive mode (PASV)
—The FTP client initiates the TCP connection. This mode is not suitable when
the server does not allow the client to use a random unprivileged port greater than 1024.
The FTP operation mode varies depending on the FTP client program.
The device can act as the FTP client or FTP server:
Figure 35
FTP application scenario
Using the device as an FTP client
To connect to an FTP server or enter FTP client view, make sure the following requirements are met:
You have level-3 (Manage) user privileges on the device. In FTP client view, whether a directory or
file management command can be successfully executed depends on the authorization set on the
FTP server.
The device and the FTP server can reach each other.
You have a user account (including the username, password, and authorization) on the FTP server.
If the FTP server supports anonymous FTP, you can directly access the FTP server without a username
and password.
Establishing an FTP connection
To access an FTP server, use the
ftp
command in user view or use the
open
command in FTP client view
to establish a connection to the FTP server.
You can use the
ftp client source
command to specify a source IP address or source interface for the FTP
packets sent by the device. If a source interface (typically a loopback interface) is specified, its primary
IP address is used as the source IP address for the FTP packets sent by the device. The source interface
setting and the source IP address setting overwrite each other.