Switching

Expand all | Collapse all

Virtual-chassis auto-sw-update scenario on Master Switch in Virtual chassis

Jump to Best Answer
  • 1.  Virtual-chassis auto-sw-update scenario on Master Switch in Virtual chassis

    Posted 03-14-2019 13:29

    Hi everyone.

    Let say we have  three switches  VC , SW1 is the master. SW1 has following JUNOS pacakages  in var/tmp folder:

    jinstall-ex-2200-12.3R12.4-domestic-signed.tgz

    jinstall-ex-2200-12.3R11.2-domestic-signed.tgz

     

    SW is booted from jinstall-ex-2200-12.3R12.4-domestic-signed.tgz

    If we use "Virtual-chassis auto-sw-update" without specifying particular JUNOS image, what software will be downloaded to a new member switch if there is mismatch of JUNOS?

    #########################

     

     

    2) I noticed when I uploaded JUNOS into var/tmp/ folder from my FTP server,  and reboot the EX 2200 Switch , the installtion pacakage is not retained in /var/tmp folder once the  sw is booted. Is there any we can retain the installation package in VAR/TMP folder on EX200 switch?

     

    Thanks have a good day!!

     

     



  • 2.  RE: Virtual-chassis auto-sw-update scenario on Master Switch in Virtual chassis
    Best Answer

     
    Posted 03-14-2019 20:46

    Hi Sarah, answers inline.

     


    @sarahr202 wrote:

    Hi everyone.

    Let say we have  three switches  VC , SW1 is the master. SW1 has following JUNOS pacakages  in var/tmp folder:

    jinstall-ex-2200-12.3R12.4-domestic-signed.tgz

    jinstall-ex-2200-12.3R11.2-domestic-signed.tgz

     

    SW is booted from jinstall-ex-2200-12.3R12.4-domestic-signed.tgz

    If we use "Virtual-chassis auto-sw-update" without specifying particular JUNOS image, what software will be downloaded to a new member switch if there is mismatch of JUNOS?

    #########################333

    [ANS] Its better to specify the intended package-name to install with the auto-sw-update i.e.:

    set virtual-chassis auto-sw-update package-name

     

    2) I noticed when I uploaded JUNOS into var/tmp/ folder from my FTP server,  and reboot the EX 2200 Switch , the installtion pacakage is not retained in /var/tmp folder once the  sw is booted. Is there any we can retain the installation package in VAR/TMP folder on EX200 switch?

    [ANS]  Clearing /var/tmp/ is default FreeBSD behavior.  This is for the safe operation of the device.  Yes it's possible to toggle this behavior for a particular file by marking the immutable bit, but you should manage it properly i.e. clear the bit when you don't need the file anymore.

     

    start shell user root
    chflags schg /var/tmp/<file name> -------------> Makes the file permanent/persistent over a reboot

     

    Note that even root user won't be able to delete it.  For example:

    root@Juniper-EX2200:RE:0% rm /var/tmp/jinstall-ex-4500-15.1R7.9-domestic.tgz
    override rw-r--r-- root/field schg for /var/tmp/jinstall-ex-4500-15.1R7.9-domestic.tgz? no
    root@Juniper-EX2200:RE:0% ls /var/tmp/jinstall-ex-4500-15.1R7.9-domestic.tgz
    jinstall-ex-4500-15.1R7.9-domestic.tgz

     

    To restore normal behavior (clear upon installation/reboot):

    chflags noschg /var/tmp/<file name>
     

    Other than this, think there's a cheat way of keeping the file if you make the filename start with a dot (.) :), but I haven't tried that.

     

    Thanks have a good day!!

     

     


    Hope this helps.

     

    Regards,
    -r.

    --------------------------------------------------

    If this solves your problem, please mark this post as "Accepted Solution."
    Kudos are always appreciated :).



  • 3.  RE: Virtual-chassis auto-sw-update scenario on Master Switch in Virtual chassis

    Posted 03-15-2019 12:47

    Hi Sarah,

     

    As far as I understand the EX will not upgrade the new member to match the Version of  the VC, that should be a manual step:

    ..."For a standalone EX4200 switch to join an existing Virtual Chassis configuration, it must be running the same version of Junos OS that is running on the Virtual Chassis master. If the software version on the new switch is not the same as the version running on the master, the master keeps the new switch in the inactive state"...

     

    Source: https://www.juniper.net/documentation/en_US/junos/topics/example/virtual-chassis-ex4200-software-automatic-update.html 

     

    As for your next question, from shell you can change the permissions of the file and set the "Inmutable flag" with chmod like this:

     

    root@switch% pwd
    /var/tmp
    root@switch% ls -l -o
    total 32
    drwxr-xr-x 2 root wheel - 512 Dec 31 07:40 .schema-cache
    -rw-r--r-- 1 root field - 2158 Dec 28 07:00 JJJJJJJ
    drwxr-xr-x 2 root field - 512 Dec 28 06:57 gres-tp
    drwxrwxrwx 2 root wheel - 512 Dec 28 06:57 install
    drwxrwxrwx 2 root wheel - 512 Dec 28 06:57 pics
    drwxr-xr-x 2 root field - 512 Dec 28 06:58 rtsdb
    drwxrwxrwt 2 root wheel - 512 Dec 28 06:57 vi.recover

    root@switch% chflags simmutable JJJJJJJ
    root@switch% ls -l -o
    total 32
    drwxr-xr-x 2 root wheel - 512 Dec 31 07:40 .schema-cache
    -rw-r--r-- 1 root field schg 2158 Dec 28 07:00 JJJJJJJ
    drwxr-xr-x 2 root field - 512 Dec 28 06:57 gres-tp
    drwxrwxrwx 2 root wheel - 512 Dec 28 06:57 install
    drwxrwxrwx 2 root wheel - 512 Dec 28 06:57 pics
    drwxr-xr-x 2 root field - 512 Dec 28 06:58 rtsdb
    drwxrwxrwt 2 root wheel - 512 Dec 28 06:57 vi.recover

     

     

    then remove it with chflags nosimmutable 

     

    hope it helps!