network

JunOS Upgrade

For some reason, JunOS 12.1X46-D65.4 on SRX platform can’t validate any update it takes me several attempts before figure out to run the upgrade with the “no-validate” option.

root> request system configuration rescue save 
root> request system autorecovery state save   
root> request system storage cleanup              

List of files to delete:

         Size Date         Name
    11B Dec 29 22:35 /cf/var/jail/tmp/alarmd.ts
 142.6M Dec 29 22:38 /cf/var/jail/tmp/install/junos-srxsme-12.1X46-D82-domestic.tgz
   420B Dec 29 22:36 /cf/var/jail/tmp/jweb-users.xml
   128B Dec 29 22:40 /cf/var/log/interactive-commands.0.gz
   175B Dec 29 22:40 /cf/var/log/messages.0.gz
    27B Dec 29 22:32 /cf/var/log/wtmp.0.gz
Delete these files ? [yes,no] (no) yes 


root> 


root> request system software add /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz             
NOTICE: Validating configuration against junos-srxsme-12.3X48-D40.5-domestic.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Verified manifest signed by PackageProductionEc_2016 method ECDSA
veriexec: cannot bless /packages/junos-12.1X46-D65.4-domestic: Authentication error
Verified junos-12.1X46-D65.4-domestic signed by PackageProductionEc_2016 method ECDSA
Using /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz
Checking junos requirements on /
Available space: 181112 require: 211214

WARNING: The /packages filesystem is low on free disk space.
WARNING: This package requires 211214k free, but there
WARNING: is only 181112k available.

WARNING: This installation attempt will be aborted.
ERROR: validate-config: junos/+REQUIRE fails for /
WARNING: Current configuration not compatible with /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz

root> request system storage cleanup                                                     

List of files to delete:

         Size Date         Name
   474B Dec 29 19:44 /cf/var/log/install.0.gz
   134B Dec 30 04:41 /cf/var/log/interactive-commands.0.gz
  1815B Dec 30 04:41 /cf/var/log/messages.0.gz
    27B Dec 29 22:45 /cf/var/log/wtmp.0.gz
    27B Dec 29 22:40 /cf/var/log/wtmp.1.gz
  4821B Dec 30 04:36 /cf/var/tmp/cleanup-pkgs.log
 173.7M Dec 29 22:43 /cf/var/tmp/junos-srxsme-12.3X48-D40.5-domestic.tgz
Delete these files ? [yes,no] (no) yes 


root> show version 
Model: srx110h2-va
JUNOS Software Release [12.1X46-D65.4]

root> request system software add /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz    
NOTICE: Validating configuration against junos-srxsme-12.1X46-D66.1-domestic.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Verified manifest signed by PackageProductionEc_2016 method ECDSA
veriexec: cannot bless /packages/junos-12.1X46-D65.4-domestic: Authentication error
Verified junos-12.1X46-D65.4-domestic signed by PackageProductionEc_2016 method ECDSA
Using /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz
ERROR: Unsupported platform srx110h2-va for 12.1X46 releases after 12.1X46-D65.
ERROR: validate-config: junos/+REQUIRE fails
WARNING: Current configuration not compatible with /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz

root> request system software delete-backup 
Delete backup system software package [yes,no] (no) yes 


root> show chassis routing-engine              
Routing Engine status:
    Temperature                 58 degrees C / 136 degrees F
    Total memory              2048 MB Max   635 MB used ( 31 percent)
      Control plane memory    1088 MB Max   435 MB used ( 40 percent)
      Data plane memory        960 MB Max   202 MB used ( 21 percent)
    CPU utilization:
      User                       4 percent
      Background                 0 percent
      Kernel                    12 percent
      Interrupt                  0 percent
      Idle                      84 percent
    Model                          RE-SRX110H2-VA
    Start time                     2017-01-15 02:45:57 UTC
    Uptime                         9 hours, 32 minutes, 48 seconds
    Last reboot reason             0x200:normal shutdown
    Load averages:                 1 minute   5 minute  15 minute
                                       0.24       0.50       0.41

root> request system reboot 
Reboot the system ? [yes,no] (no) yes 

Shutdown NOW!
[pid 4875]

root>                                                                                
*** FINAL System shutdown message from root@ ***                             

System going down IMMEDIATELY                                                  

Password:
--- JUNOS 12.1X46-D65.4 built 2016-12-30 01:34:30 UTC

root@% cli
root> request system software add /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz     
NOTICE: Validating configuration against junos-srxsme-12.1X46-D66.1-domestic.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Verified manifest signed by PackageProductionEc_2016 method ECDSA
veriexec: cannot bless /packages/junos-12.1X46-D65.4-domestic: Authentication error
Verified junos-12.1X46-D65.4-domestic signed by PackageProductionEc_2016 method ECDSA
Using /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz
ERROR: Unsupported platform srx110h2-va for 12.1X46 releases after 12.1X46-D65.
ERROR: validate-config: junos/+REQUIRE fails
WARNING: Current configuration not compatible with /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz

root> request system software add /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz no-validate 
Formatting alternate root (/dev/ad0s2a)...
/dev/ad0s2a: 630.0MB (1290204 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 157.50MB, 10080 blks, 20224 inodes.
super-block backups (for fsck -b #) at:
 32, 322592, 645152, 967712
Extracting /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz ...
saving package file in /var/sw/pkg ...
Installing package '/altroot/cf/packages/install-tmp/junos-12.1X46-D66.1-domestic' ...
Verified junos-boot-srxsme-12.1X46-D66.1.tgz signed by PackageProductionEc_2017 method ECDSA
Verified junos-srxsme-12.1X46-D66.1-domestic signed by PackageProductionEc_2017 method ECDSA
Verified junos-boot-srxsme-12.1X46-D66.1.tgz signed by PackageProductionEc_2017 method ECDSA
Verified junos-srxsme-12.1X46-D66.1-domestic signed by PackageProductionEc_2017 method ECDSA
ERROR: Unsupported platform srx110h2-va for 12.1X46 releases after 12.1X46-D65.
ERROR: junos-12.1X46-D66.1-domestic fails requirements check
Installation failed for package '/altroot/cf/packages/install-tmp/junos-12.1X46-D66.1-domestic'

root> request system storage cleanup                                                                 

List of files to delete:

         Size Date         Name
    96B Dec 30 04:58 /cf/var/crash/flowd_octeon_hm.log..0
   131B Dec 30 05:13 /cf/var/log/interactive-commands.0.gz
  3726B Dec 30 05:13 /cf/var/log/messages.0.gz
   136B Dec 30 04:59 /cf/var/log/wtmp.0.gz
    27B Dec 30 04:41 /cf/var/log/wtmp.1.gz
 142.4M Dec 30 05:10 /cf/var/sw/pkg/junos-12.1X46-D66.1.tgz
  4821B Dec 30 05:04 /cf/var/tmp/cleanup-pkgs.log
     0B Dec 30 04:57 /cf/var/tmp/eedebug_bin_file
 124.0K Dec 30 04:57 /cf/var/tmp/gres-tp/env.dat
     0B Dec 30 04:57 /cf/var/tmp/gres-tp/lock
     4B Dec 30 04:58 /cf/var/tmp/idp_license_info
 142.4M Oct 26 17:00 /cf/var/tmp/junos-srxsme-12.1X46-D66.1-domestic.tgz
   155B Dec 30 04:58 /cf/var/tmp/krt_gencfg_filter.txt
    30B Dec 30 04:58 /cf/var/tmp/policy_status
     0B Dec 30 04:57 /cf/var/tmp/rtsdb/if-rtsdb
     0B Dec 30 04:56 /cf/var/tmp/spu_kmd_init
     0B Dec 30 04:58 /cf/var/tmp/vpn_tunnel_orig.id
Delete these files ? [yes,no] (no) yes 


root> request system software add /cf/var/tmp/junos-srxsme-12.3X48-D105.4-domestic.tgz no-validate                              
Formatting alternate root (/dev/ad0s2a)...
/dev/ad0s2a: 630.0MB (1290204 sectors) block size 16384, fragment size 2048
        using 4 cylinder groups of 157.50MB, 10080 blks, 20224 inodes.
super-block backups (for fsck -b #) at:
 32, 322592, 645152, 967712
Extracting /cf/var/tmp/junos-srxsme-12.3X48-D105.4-domestic.tgz ...
saving package file in /var/sw/pkg ...
Installing package '/altroot/cf/packages/install-tmp/junos-12.3X48-D105.4-domestic' ...
Verified junos-boot-srxsme-12.3X48-D105.4.tgz signed by PackageProductionECP256_2020 method ECDSA
Verified junos-srxsme-12.3X48-D105.4-domestic signed by PackageProductionECP256_2020 method ECDSA
Verified junos-boot-srxsme-12.3X48-D105.4.tgz signed by PackageProductionECP256_2020 method ECDSA
Verified junos-srxsme-12.3X48-D105.4-domestic signed by PackageProductionECP256_2020 method ECDSA
Verified junos-boot-srxsme-12.3X48-D105.4.tgz signed by PackageProductionECP256_2020 method ECDSA
Verified junos-srxsme-12.3X48-D105.4-domestic signed by PackageProductionECP256_2020 method ECDSA
JUNOS 12.3X48-D105.4 will become active at next reboot
WARNING: A reboot is required to load this software correctly
WARNING:     Use the 'request system reboot' command
WARNING:         when software installation is complete
Saving state for rollback ...

root> request system reboot 
Reboot the system ? [yes,no] (no) yes 

Shutdown NOW!
[pid 2578]

root>                                                                                
*** FINAL System shutdown message from root@ ***                             

System going down IMMEDIATELY                                                  

                           

Linux – Removing all IP information from an interface

If an interface has already had IP addresses assigned to it, and all of the addresses need to be removed (along with their routes), there is one handy command to accomplish all of these tasks. ip address flush takes an interface name as an argument. Let’s look at the output of ip address show just before and just after removing all IPs.

[root@logistic]# ip address show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:80:c8:f8:4a:51 brd ff:ff:ff:ff:ff:ff
inet 192.168.99.35/24 brd 192.168.99.255 scope global eth0
inet 192.168.99.37/24 brd 192.168.99.255 scope global secondary eth0:0
[root@logistic]# ip address flush
Flush requires arguments.
[root@logistic]# ip address flush dev eth0
[root@logistic]# ip address show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 100
link/ether 00:80:c8:f8:4a:51 brd ff:ff:ff:ff:ff:ff

Windows – Change IP from command line

Yes, is possibile don’t make lot of click to reconfigure network interfaces under Windows, using “netsh” command like this:

For set up static address and metric 1 gateway:

netsh interface ip set address name=”Local Area Connection” static ip.ip.ip.ip 255.255.255.0 gw.gw.gw.gw 1

For set up static dns:

netsh interface ip set dns “Local Area Connection” static xx.xx.xx.xx
netsh add dns “Local Area Connection” addr=xx.xx.xx.xx index=2

For setup ip by dhcp:

netsh interface ip set address name=”Local Area Connection” source=dhcp
netsh interface ip set dns name=”Local Area Connection” source=dhcp