Supporting File Transfer from USB on NFX Series Devices
Starting from Junos OS Release 21.1R1, you can transfer VNF images, NFX software, or any user scripts from USB to NFX devices by enabling the USB pass-through feature. By default, the USB pass-through feature is disabled.
Note:
Built-in LTE functionality does not work after you enable the USB pass-through feature.
To enable USB pass-through to Junos and mount a USB:
- Log in to the JCP CLI and enter configuration mode:
root@host% cli root@host> configure
-
Configure the USB pass-through feature:
root@host# set system services usb-pass-through root@host# commit
- Restart the device to enable the USB pass-through feature.
-
Verify whether the USB pass-through feature is enabled:
root@host# run show system services usb-pass-through
USB pass through Information
-------------------------------------
Mode: Enabled
-
Mount a USB device on an NFX device. This is helpful if network connectivity is
unavailable and you need to copy files to or from the device.
Note:
It is recommended to use a USB with the FAT32 format.
Enter the shell prompt as a root user:
root@host> root@host> start shell user root Password: root@host%
-
Before inserting the USB device, perform the following:
root@host:~ # ls -l /dev/da*
ls: No match. -
Insert the USB drive in the USB port. An output similar to the following is
displayed:
root@% umass1: TOSHIBA TransMemory, rev 2.00/1.00, addr 3 da2 at umass-sim1 bus 1 target 0 lun 0 da2: <TOSHIBA TransMemory 5.00> Removable Direct Access SCSI-0 device da2: 40.000MB/s transfers da2: 983MB (2013184 512 byte sectors: 64H 32S/T 983C) root@:~ # ls -l /dev/da* crw-r----- 1 root operator 0x93 Feb 4 04:22 /dev/da0 crw-r----- 1 root operator 0x94 Feb 4 04:22 /dev/da0p1
In the sample output,/dev/da0p1
is the USB drive. If the device supports multiple USBs, use the right file that is corresponding to the attached USB. If the console session is not available while inserting the USB, check the messages var log file for logs related toda
(for example,show log messages | match da
). It logs the same four lines as shown on console if the USB is inserted. -
Create a directory for the USB drive to mount to:
root@host% mkdir /var/tmp/usb
-
Mount the USB drive to the /var/tmp/usb directory:
Note:
ls /var/tmp/usb directory shows all files that are present in the USB drive.
root@host% mount_msdosfs /dev/da0p1 /var/tmp/usb root@host% ls /var/tmp/usb
images.tgz -
Unmount the USB drive after the file is completely copied:
root@host% umount /var/tmp/usb