Junos OS

last person joined: 2 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  File copy with source and destination address in VRF

    Posted 10-23-2013 10:56

    How can I specify the local VRF that needs to be used to resolve the destination and source IP addresses when trying to copy a file from one router to another?

    For example:

    The route to 10.1.1.1 and 11.1.1.1 resolves via VRF UBER-SECRET.inet.0.

    file copy <file> scp://10.1.1.1/<destination location>/<file>
    ssh: connection to host 10.1.1.1 port 22: No route to host

    file copy <file> scp://10.1.1.1/<destination location>/<file> source-address 11.1.1.1
    bind: 11.1.1.1 : Can't assign requested address
    ssh: connection to host 10.1.1.1 port 22: Can't assign requested address



  • 2.  RE: File copy with source and destination address in VRF

    Posted 10-25-2013 04:26

    Hello,

    You have to drop to shell to do that and use SCP with -JU option:

     

    aarseniev@mx480> start shell 
    % cd /var/tmp
    % scp
    usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
               [-l limit] [-o ssh_option] [-P port] [-S program]
               [-JU routing_instanse]
               [[user@]host1:]file1 ... [[user@]host2:]file2

     

    HTH

    Thanks

    Alex



  • 3.  RE: File copy with source and destination address in VRF

    Posted 12-12-2019 03:28

    Still broken as of today on 17.4 with ftp... "file copy" doesn't map the given source-address with the appropriate routing instance and thus fails Smiley Sad

    It would be nice to have either a fix of the command or an added attribute to specify a routing instance.



  • 4.  RE: File copy with source and destination address in VRF

     
    Posted 12-12-2019 09:53

    I think you have already figure out the solution from my other post. Pasting over here for completion:

    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

    Example:

     

    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

    start shell

    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.