IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

IP Addresses and Services Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

File transfer services

Want to summarize with AI?

Log in

Explains how FTP, TFTP, rcp, and SCP locate and transfer files, and provides tasks for configuring clients, operating a TFTP server, and copying individual files securely.


File transfer services are resource managers and file-system interfaces that

  • use URLs to identify files on routers or remote servers

  • move configuration files, software images, core dumps, and other files between systems, and

  • provide different authentication, security, and server behaviors through FTP, TFTP, rcp, and SCP.

Protocol characteristics

This table compares the file transfer services.

Table 1. File transfer protocols

Protocol

Primary characteristic

Use case

FTP

TCP/IP file transfer defined in RFC 959

Transfers files and supports configurable client behavior.

TFTP

Simplified file transfer, usually without client authentication

Transfers files and can serve files from router storage.

rcp

Remote copy client

Can save a core dump to a remote server.

SCP

Authenticated transfer over SSHv2

Securely transfers one file between a local and a remote device.


FTP connections

An FTP connection is a TCP/IP file transfer session that

  • moves files between network nodes

  • can use passive client behavior and an anonymous-user password, and

  • can use a configured router interface as its source.

FTP is defined in RFC 959.


Configure FTP client connections

Set the FTP client characteristics used for file transfers.

Procedure

  1. Configure the FTP client settings and commit the configuration.

    Example:

    Router# configure
    Router(config)# ftp client passive
    Router(config)# ftp client anonymous-password xxxx
    Router(config)# ftp client source-interface HundredGigE 0/0/0/0
    Router(config)# commit
  2. Verify each FTP client setting.

    Example:

    Router# show running-config ftp client passive
    Router# show running-config ftp client anonymous-password xxxx
    Router# show running-config ftp client source-interface HundredGigE 0/0/0/0

TFTP connections

A TFTP connection is a simplified file transfer session that

  • moves files between networked systems

  • usually operates without a username and password, and

  • can use either a router client or a router-based server.


Configure TFTP client connections

Select a consistent source interface for TFTP client traffic.

Procedure

  1. Configure and commit the TFTP client source interface.

    Example:

    Router# configure
    Router(config)# tftp client source-interface HundredGigE 0/0/0/0
    Router(config)# commit
  2. Verify the client configuration and service registration.

    Example:

    Router# show running-config tftp client source-interface HundredGigE 0/0/0/0
    tftp client source-interface HundredGigE 0/0/0/0
    Router# show cinetd services
    Vrf Name Family  Service  Proto Port     ACL max_cnt  curr_cnt  wait   Program Client Option     
    default  v4      tftp     udp    69  				unlimited  0       wait   tftpd    sysdb disk0:         
    default  v4      telnet   tcp    23  				10         0       nowait telnetd  sysdb   

TFTP servers

A router-based TFTP server is a file service that

  • responds to requests from reachable TFTP client routers

  • provides files such as system images or configurations from router storage, and

  • reduces the need for a dedicated server on each network segment.

Table 2. Feature History Table

Feature Name

Release Information

Feature Description

TFTP Server support in Router

Release 7.5.4

You can now configure the Cisco 8000 Series Router as a TFTP server to serve requests from client routers. This capability reduces costs and time delays in your network by eliminating the redundancy of having a machine that acts only as a server on every network segment.

This feature introduces the following commands:


Configure a router as a TFTP server

Provide files to TFTP clients from a router storage directory.

Before you begin

  • Verify reachability between the server and client routers with ping.

  • Create any destination file before a client sends a write request.

Procedure

  1. Configure the TFTP server home directory and commit the configuration.

    Example:

    Router# configure
    Router(config)# tftp ipv4 server homedir disk0:
    Router(config)# commit
  2. Verify the server configuration.

    Example:

    Router# show running-config tftp ipv4 server homedir disk0:
    tftp vrf default ipv4 server homedir disk0:
    
  3. Verify that Cisco inetd registered the TFTP service.

    Example:

    Router# show cinetd services
    Vrf Name Family Service     Proto Port ACL  max_cnt  curr_cnt wait  Program Client Option        
    default  v4       tftp        udp   69      unlimited 0       wait   tftpd   sysdb disk0:         
    default  v4       telnet      tcp   23      10        0       nowait telnetd sysdb 
    

SCP transfers

Secure Copy Protocol (SCP) is a file transfer protocol that

  • uses SSHv2 to provide secure and authenticated transfers

  • supports both client and server operations on Cisco IOS XR devices, and

  • copies one file between a local device and a remote device.

A device acts as an SCP server when it receives an SCP request. The SSH server starts a new SCP server instance for each incoming subsystem request.

A device acts as an SCP client when it sends a file transfer request to another device.

SCP transfer limitations

SCP transfers have these limitations.

  • SCP transfers one file at a time.

  • SCP cannot copy a file directly between two remote devices.

  • The SSH server process must run on a destination that acts as the SCP server.


How SCP transfers files

SCP uses an authenticated SSHv2 connection to transfer a file between a local device and a remote device.

Summary

The process uses these roles.

  • Client: Starts the SSH connection and requests the file transfer.

  • Server: Starts a new SCP instance for each incoming subsystem request.

  • Source: Reads the file from its local directory and sends it to the destination.

  • Sink: Receives the file at the destination.

Workflow

These stages describe how SCP transfers a file.

  1. The client starts an SSHv2 connection to the remote device and requests a file transfer.

  2. The SSH server starts an SCP server instance for the incoming request.

  3. The device that provides the file operates in source mode, and the receiving device operates in sink mode.

  4. The source reads the file from its local directory and sends it through the authenticated connection to the sink.

Result

The file is available on the selected local or remote destination.


Transfer a file with SCP

Securely copy an individual file to or from a remote device.

Before you begin

Ensure that the SSH server process runs on a destination that acts as the SCP server.

SCP cannot transfer multiple files or copy a file directly between two remote devices.

Procedure

  1. Copy the local file to the remote destination and enter the remote password when prompted.

    Example:

    Router# scp /harddisk:/test123.txt user@192.0.2.10:/remote/test123.txt
    Connecting to 192.0.2.10...
    Password:
  2. Verify that the destination contains the file.

    Example:

    remote-host:/remote> ls -altr test123.txt

The specified file exists at the remote destination.