[Contents] [Prev] [Next] [Index] [Report an Error]


Transferring Files

You may need to transfer files between the following locations:

There are two ways of transferring files: using the copy command and using the system's FTP server. Table 26 shows the types of files that you can transfer between the locations using the copy command, which activates a hidden FTP client on the E-series router.

The system's FTP server allows the transfer of files between a network host and the user space. When a firewall separates the E-series router from the network host, you must use the FTP server to transfer files to the user space. You can then install the files from the user space to the system space using the copy command. However, if there is no firewall between the E-series router and the network host, you can use the copy command or the FTP server to transfer files.

For example, you can transfer a file from a network host to an E-series router through FTP, and then transfer the file through the copy command from the E-series router to other E-series routers. See Figure 25.


Figure 25: Transferring System Files to the E-series Router

Using the copy Command

Table 26 shows the types of files that you can transfer between the locations by using the copy command.




Table 26: File Types You Can Transfer Using the copy Command 
Destination
Source

System

User Space

(linked files and unlinked files)

Network Host Within a Firewall

Standby SRP Module

System

*.cnf

*.hty (excluding reboot.hty)

*.log (excluding system.log)

*.mac

*.scr

*.txt

*.cnf

*.hty

*.log

*.mac

*.pub

*.scr

*.txt

*.cnf

*.dmp

*.hty

*.log

*.mac

*.pub

*.scr

*.sts

*.txt

None

User Space

*.cnf

*.mac

*.rel

*.scr

*.txt

*.cnf

*.hty

*.log

*.mac

*.pub

*.rel ( *.rel file only, not files associated with the *.rel file)

*.scr

*.txt

Nonsystem files

None

None

Network Host Within a Firewall

*.cnf

*.mac

*.rel

*.scr

*.txt

None

None

None

Standby SRP Module

system.log

reboot.hty

system.log

reboot.hty

*.dmp

system.log

reboot.hty

*.dmp

None

To transfer files using the copy command between the system space and a network host:

  1. Check whether there is a route to the network host, and create one if necessary. See JUNOSe Routing Protocols Configuration Guide, Vol. 1, Chapter 5, Configuring IP.
  2. Configure the network host as an FTP server.

    NOTE: This command takes place in the context of the current virtual router (VR) rather than the default VR. You must configure the FTP server so that any traffic destined for the VR can reach the VR; typically, you configure the FTP server to reach the default address of the E-series router, which will always be able to reach the VR.


  3. Add the FTP server to the static host table, so that the E-series router can access the network host.
  4. (Optional) Specify a source interface to use in FTP packets leaving the router.
  5. Copy the files.

copy

host

ip ftp source-address

This entry also appears in the output if you delete an interface or change its IP address after issuing the ip ftp source-interface command, in which case the IP address is the one that was configured on the interface before you issued the ip ftp source-interface command

ip ftp source-interface

For information about interface types and specifiers, see JUNOSe Command Reference Guide, About This Guide.

Configuring the FTP Server

To transfer files by the system's FTP server, you must configure the FTP server and ensure that FTP client software is installed on the network host.

Although you can transfer any type of file by FTP to the E-series router, the principal aim of this feature is to allow the transfer of system files to NVS. You can transfer files by FTP to the user space. You can then install files from the user space onto the system using the copy command. It is not possible to access the system files directly through FTP operations.

FTP sessions on the E-series router use the vty lines. The E-series router divides its vty resources between Telnet, SSH, and FTP services. Each FTP session requires one vty line. The FTP service uses the authentication method configured for the vty lines.

Features

The system supports the following FTP features:

FTP Passive Mode

Normally, when a client connects to an FTP server, the client establishes the control channel with the server, and the server responds by opening a data channel to the client. However, when the FTP client and server are on opposite sides of a firewall that prohibits inbound FTP connections, the server cannot open a data channel to the client.

FTP passive mode overcomes this connection limitation. In passive mode, the client opens a control channel to the server, tells the server it wants to operate in passive mode, and opens the data channel to the server. This method of establishing the FTP connection allows both the control channel and the data channel to pass through the firewall in the allowed direction.

Configuring Authentication

Before you enable the FTP server, configure the authentication procedure for the vty lines, as follows:

  1. Configure host access lists.
  2. Configure user authentication methods.
  3. Configure the vty lines to use the host access lists and user authentication methods.

You can specify authentication by a RADIUS server or by password checking. If you choose no authentication service, any client can access the FTP server. For information about authentication on vty lines, see
Chapter 7, Passwords and Security.

Configuration Tasks

FTP is disabled by default. You must enable the FTP server with the ftp-server enable command before the system allows FTP clients to connect.

ftp-server enable

Configuration Example

Figure 26 shows the scenario for this configuration example.


Figure 26: FTP Configuration Example

In this example, two FTP lines are required for administrators on the data center subnet, and two more lines are required for users on the POP subnet. The system verifies passwords of administrators on the data center subnet through either a RADIUS server or through simple line authentication if the RADIUS server is unreachable. However, the system verifies passwords of users on the POP subnet only through the RADIUS server.

The following example shows all steps for configuring this scenario, from specifying a RADIUS server to enabling the FTP line:

  1. Configure the RADIUS server.
  2. host1(config)#radius authentication server 10.6.131.51
    
    host1(config-radius)#key abc123
    
    host1(config-radius)#udp-port 1645
    
    
    
  3. Configure two access lists; one named "DataCenter," permitting only the data center subnet, and one named "Pops," permitting only the POP subnet.
  4. host1(config)#access-list DataCenter permit 10.6.128.0 255.255.128.0
    
    host1(config)#access-list DataCenter deny any
    
    host1(config)#access-list Pops permit 199.125.128.0 255.255.128.0
    
    host1(config)#access-list Pops deny any
    
    
    
  5. Configure two authentication method lists, named "RadiusAndLine" and "RadiusOnly."
  6. host1(config)#aaa new-model
    
    host1(config)#aaa authentication login RadiusAndLine radius line
    
    host1(config)#aaa authentication login RadiusOnly radius
    
    
    
  7. Configure two FTP lines to be used by data center administrators.
  8. host1(config)#line vty 0 1
    
    host1(config-line)#password foobar
    
    host1(config-line)#access-class DataCenter in
    
    host1(config-line)#login authentication RadiusAndLine
    
    
    
  9. Configure the remaining FTP lines to be used by POP administrators.
  10. host1(config)#line vty 2 4
    
    host1(config-line)#password foobar
    
    host1(config-line)#access-class Pops in
    
    host1(config-line)#login authentication RadiusOnly
    
    
    
  11. Enable the FTP server.
  12. host1(config)#ftp-server enable
    
    
    

Monitoring the FTP Server

Use the dir command to monitor files on the FTP server. Use the show ftp-server and show users commands to monitor settings of the FTP server.

show ftp-server

show users

Copying Partial Releases

You can shorten the time it takes to copy a release from a server and reduce the amount of storage needed for a release. At the default setting, all subsystems are included when you copy a release from a server. Use the exclude-subsystem command to specify subsystems that you do not want to copy from the server. Use the show subsystems command to verify which files are included and excluded when you copy a release from a server. Follow this example:

  1. Determine which subsystems are included in the release on the server.
  2. host1#show subsystems file m:/x/images/x-y-z.rel
    
    
    
  3. Exclude any subsystems in the release that you do not need for the configuration.
  4. host1#(config)#exclude-subsystem ct1
    
    host1#(config)#exclude-subsystem coc12
    
    host1#(config)#exclude-subsystem oc12s
    
    
    
  5. (Optional) Remove a subsystem from the exclude list.
  6. host1#(config)#no exclude-subsystem oc12s
    
    
    
  7. (Optional) Verify the subsystems that will be included and excluded in future release copies.
  8. host1#show configuration
    
    ...
    
    exclude-subsystem ct1
    
    exclude-subsystem coc12
    
    
    
  9. (Optional) After copying a release, view which subsystems were excluded.
  10. host1#show subsystems file x8.rel
    
    
    
  11. (Optional) Determine whether the currently running software is a result of a copy with excluded subsystems. The word "Partial" indicates that subsystems were excluded.
  12. host1#show version
    
    Juniper Networks, Inc. Operating System Software
    
    Copyright (c) 200X Juniper Networks, Inc. All rights reserved.
    
    System Release: x-y-z.rel Partial
    
    
    

exclude-subsystem

show subsystems


[Contents] [Prev] [Next] [Index] [Report an Error]