2.3. FTP Commands

2.3.1. ftp

Command Purpose

To exchange files between local and remote ftp server, use the ftp command in Privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ftp ( mgmt-if | ) host ( port PORTNUM | )

Parameter

Parameter Description

Parameter Value

mgmt-if

Management port

-

HOST

IPv4, IPv6 address or name of the remote host

Support IPv4/IPv6 address or hostname

PORTNUM

port of remote ftp server

1-65535

Command Mode

Privileged EXEC

Default

None

Usage

Use the ftp command to upload and download files from remote ftp server.

Examples

The following example shows how to connect ftp server by ipv4 address:

Switch# ftp mgmt-if 10.10.29.160

Connected to 10.10.29.160.
220---------- Welcome to Pure-FTPd ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:00. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name (10.10.29.160:root): root
331 User root OK. Password required
Password:
230-User root has group access to:  wheel  disk  adm   sys  daemon
230- bin   root
230 OK. Current directory is /root
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

The following example shows how to connect ftp server by ipv6 address:

Switch# ftp mgmt-if 2001:1000::2


Connected to 2001:1000::2 (2001:1000::2).
220 Serv-U FTP Server v10.2 ready...
Name (2001:1000::2:root): Username
331 User name okay, need password.
Password:
230 User logged in, proceed.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

2.3.2. ftp vrf

Command Purpose

To exchange files between local and remote ftp server in VPN, use the ftp vrf command in Privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ftp vrf WORD

Parameter

Parameter Description

Parameter Value

WORD

VPN Routing/Forwarding instance name

A string with 1-15 characters

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

Switch# ftp vrf testvrf

Related Commands

None

2.3.3. ftp passive

Command Purpose

To set the FTP mode in passive mode, use the ftp passive command in Global Config. To restore the configuration to the default, use no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

ftp passive

no ftp passive

Command Mode

Global Config

Default

FTP works in Active mode.

Usage

None

Examples

The following example sets the ftp mode to passive:

Switch# configure terminal
Switch(config)# ftp passive

Related Commands

ftp username

ftp password

2.3.4. show ftp

Command Purpose

To display the ftp configurations, use show ftp command in Privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show ftp

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following example displays the ftp configurations:

Switch# show ftp

ftp passive mode: on
ftp username: root
ftp password: unencrypted abc
Switch#

Related Commands

ftp username

ftp password

2.3.5. copy GFILENAME GURLNAME

Command Purpose

Use this command to copy local file to ftp server.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

copy GFILENAME ( vrf VRF_NAME | ) ( mgmt-if | -a SRC_ADDR | -si SRC_INTF ) GURLNAME

Parameter

Parameter Description

Parameter Value

mgmt-if

Management port

-

vrf WORD

VPN Routing/Forwarding instance

A string with 1-15 characters

GFILENAME

Copy from local file

The full path and file name, up to 255 characters

GURLNAME

Copy to local file

The full path and file name, up to 255 characters

-a SRC_ADDR

Copy with assigned IP

-

-si SRC_INTF

Copy with assigned Interface

-

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

This is a sample output from the command displaying how to copy local file to ftp server:

Switch# copy flash:/test.c ftp:/username:password@1.1.1.1:21/running-config

Related Commands

None

2.3.6. copy GURLNAME GFILENAME

Command Purpose

Use this command to copy file from ftp server to local.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

copy ( vrf VRF_NAME | ) ( mgmt-if | -a SRC_ADDR | -si SRC_INTF ) GURLNAME GFILENAME

Parameter

Parameter Description

Parameter Value

mgmt-if

Management port

-

vrf WORD

VPN Routing/Forwarding instance

A string with 1-15 characters

GURLNAME

Copy from URL

The full path and file name, up to 255 characters

GFILENAME

Copy to local file

The full path and file name, up to 255 characters

-a SRC_ADDR

Copy with assigned IP

-

-si SRC_INTF

Copy with assigned Interface

-

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

This is a sample output from the command displaying how to copy file from ftp server to local:

Switch# copy ftp://username:password@1.1.1.1:21/test.c flash:test1.c

get file from ftp://username:password@1.1.1.1:21/test.c
.
Received 225 bytes in 0.3 seconds

Related Commands

None