Recently i've had the need to patch a few of our EX3400 switches, but with an issue where the FTP server is only reachable in a routing-instance there is no option to specify this under "Request system software add...".
So the only option is to 'ftp host routings-instance instance" and then download the .tgz to /var/tmp/ and then request add software from the local dir.
I've done it sucessfully on a couple of switches but have recieved a strange bugg on 2 EX3400's with different junos OS version.
Both EX3400 with version 18.1R3 and 15.1 displays this error when specifying anything but 'ftp host-adress'. root@XXX-SW01> ftp host routing-instance instance ftp: illegal option -- J usage: ftp [-46AadefginpRtVv] [-N netrc] [-o outfile] [-P port] [-q quittime] [-r retry] [-s srcaddr] [-T dir,max[,inc]] [[user@]host [port]] [host:path[/]] [file:///file] [ftp://[user[:pass]@]host[:port]/path[/]] [http://[user[:pass]@]host[:port]/path] [...] ftp -u URL file [...]
I've had to resolve this with starting the FTP-service on the switches and then adding files from my computer via WINScp, but does anyone know what this error could be the case of?
Please check the is your system is running FreeBSD11 (OCCAM) kernel or Legacy (non-OCCAM) kernel. FTP with routing-instance is not supported on Occam based devices
start shell user root
root@e11-42:~ # what `which ftp`
/usr/bin/ftp: FTP built by builder on 20180730.152300 feyrith.juniper.net:/volume/build/junos/occam/gcc/freebsd/stable_11/20180725.182919_builder_stable_11.2cd3a6e/obj/amd64/usr.bin/ftp <<<< this is ocaam
FTP release 18.4R1.8 built by builder on 2018-12-17 04:25:48 UTC svl-junos-p001:/volume/build/junos/18.4/release/18.4R1.8/obj/i386/bsd/usr.bin/ftp << this is non-occam
You can use following method to do FTP via the instance:
show route forwarding-table table instance_name extensive | match "Routing table" Routing table: instance_name.inet [Index 10009] < get the istance index
setfib -F 10009 ftp 10.219.57.21 <<< it will allow you to do ftp via routing-instance
PS: Please accept my response as solution if it answers your query. Kudos are appreicated too.