Juniper
模擬器
JUNOS
升級指南
Maa
2007-8-19
NJ
引言
對VMWare虛擬機下的Juniper模擬器進行軟件版本升級,從版本8.1R1.5升級到版本8.3R2.8。
升級準備
VMware 5.5模擬器軟件:運行版本8.1R1.5的JUNOS;
Named Pipe TCP Proxy軟件:提供終端控制檯和模擬器之間的登錄方式;
終端控制檯:登錄模擬器,通用的終端控制檯便可;
WFTPD:提供ftp server功能;
待升級版本:jinstall-8.3R2.8-export-signed.tgz。
首先打開VMWare的模擬器,將其中的一塊網卡和虛擬網卡關聯起來,這樣模擬器就能夠經過該虛擬網卡和windows操做系統通訊了,以下圖所示,我將模擬器的網卡和虛擬網卡VMnet2關聯起來:
同時配置VMnat2的ip地址以下圖所示:
而後啓動WFTPD軟件,並設置好相關的用戶賬號,並將待升級文件拷貝到用戶賬號指定的目錄下,以下圖所示:
這樣,升級前準備工做就完成了。
軟件升級
啓動Named Pipe TCP Proxy和虛擬機,並經過終端登錄上Juniper的模擬器,詳細內容能夠參考文檔《Juniper模擬器使用指南》,此處略過。
Juniper模擬器啓動完畢後,經過下面的命令咱們能夠看到當前的JUNOS版本仍是8.1R1.5。
root@R1> show version
Hostname: R1
Model: olive
JUNOS Base OS boot [8.1R1.5]
JUNOS Base OS Software Suite [8.1R1.5]
JUNOS Kernel Software Suite [8.1R1.5]
JUNOS Packet Forwarding Engine Support (M/T Common) [8.1R1.5]
JUNOS Packet Forwarding Engine Support (M20/M40) [8.1R1.5]
JUNOS Online Documentation [8.1R1.5]
JUNOS Routing Software Suite [8.1R1.5]
root@R1>
這時退出模擬器的cli模式,將當前目錄切換到/var/tmp下,通常都習慣於將升級文件統一下載到這個目錄下,這只是一個習慣,你們能夠根據本身的實際狀況選擇存放JUNOS升級文件的目錄,而後經過ftp方式訪問VMnet2網卡,並下載jinstall-8.3R2.8-export-signed.tgz文件到虛擬機的操做系統上,以下所示:
root@R1> exit /*
退出
cli
模式
*/
root@R1% pwd /*
顯示當前目錄
*/
/root
root@R1% cd /var/tmp/ /*
切換當前目錄到
/var/tmp/
下
*/
root@R1%
root@R1% ls /*
顯示當前目錄下的文件
*/
dcd.core-tarball.1.tgz dcd.core.4
dcd.core-tarball.2.tgz install
dcd.core-tarball.3.tgz jbundle-7.4R1.7-export.tgz
dcd.core-tarball.4.tgz jbundle-8.1R1.5-export.tgz
dcd.core.0 jinstall-8.1R1.5-export-signed.tgz
dcd.core.1 preinstall_boot_loader.conf
dcd.core.2 sampled.pkts
dcd.core.3 vi.recover
root@R1% pwd
/var/tmp
root@R1% ftp 80.1.3.254 /*ftp
到
VMnet2
網卡,下載升級版本文件
*/
Connected to 80.1.3.254.
220 WFTPD 2.0 service (by Texas Imperial Software) ready for new user
Name (80.1.3.254:root): mafm
331 Give me your password, please
Password:
230 Logged in successfully
Remote system type is MSDOS.
ftp> bin
200 Type is Image (Binary)
ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp>
ftp>
ftp> get jinstall-8.3R2.8-export-signed.tgz
local: jinstall-8.3R2.8-export-signed.tgz remote: jinstall-8.3R2.8-export-signez
200 PORT command okay
150 "C:\DOWNLOADS\jinstall-8.3R2.8-export-signed.tgz" file ready to send (94927e
################################################################################
226 Transfer finished successfully.
94927919 bytes received in 16.09 seconds (5.63 MB/s)
ftp>
ftp> quit
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye
root@R1%
root@R1% pwd
/var/tmp
root@R1% ls –l /*
顯示當前目錄下文件的詳細信息,能夠看到升級文件已經下載到本地
*/
total 680180
-rw------- 1 root wheel 54307 Dec 5 2006 dcd.core-tarball.1.tgz
-rw------- 1 root wheel 54280 Dec 5 2006 dcd.core-tarball.2.tgz
-rw------- 1 root wheel 54246 Dec 5 2006 dcd.core-tarball.3.tgz
-rw------- 1 root wheel 68820 Aug 18 22:49 dcd.core-tarball.4.tgz
-rw-rw---- 1 root wheel 1142784 Dec 5 2006 dcd.core.0
-rw-rw---- 1 root wheel 1171456 Dec 5 2006 dcd.core.1
-rw-rw---- 1 root wheel 1171456 Dec 5 2006 dcd.core.2
-rw-rw---- 1 root wheel 1171456 Dec 5 2006 dcd.core.3
-rw-rw---- 1 root wheel 1200128 Aug 18 22:49 dcd.core.4
drwxrwxrwx 2 root wheel 512 Dec 5 2006 install
-rw-r--r-- 1 root wheel 66165025 Dec 5 2006 jbundle-7.4R1.7-export.tgz
-rw-r--r-- 1 root wheel 88831302 Dec 5 2006 jbundle-8.1R1.5-export.tgz
-rw-r--r-- 1 root wheel 91914211 Dec 5 2006 jinstall-8.1R1.5-export-signedz
-rw-r--r-- 1 root wheel 94927919 Aug 18 22:51 jinstall-8.3R2.8-export-signedz
-rw-r--r-- 1 root wheel 57 Dec 5 2006 preinstall_boot_loader.conf
-rw-r----- 1 root wheel 12816 Aug 18 22:49 sampled.pkts
drwxrwxrwt 2 root wheel 512 Aug 17 20:10 vi.recover
root@R1%
此時進入JUNOS的cli模式,經過命令添加升級文件包,該添加過程會對整個升級文件進行一系列的檢查,好比CRC校驗、版本一致性對比、配置文件一致性對比等等,以下所示:
root@R1% cli /*
進入
JUNOS
的
cli
模式
*/
root@R1> request system software add /var/tmp/jinstall-8.3R2.8-export-signed.tgz force
/*
添加升級文件包,下面顯示的內容爲執行該命令後的輸出信息
*/
NOTICE: Validating configuration against jinstall-8.3R2.8-export-signed.tgz.
NOTICE: Use the 'no-validate' option to skip this if desired.
Checking compatibility with configuration
Initializing...
Using jbase-8.1R1.5
Verified manifest signed by PackageProduction_8_1_0
Using /var/tmp/jinstall-8.3R2.8-export-signed.tgz
Verified jinstall-8.3R2.8-export.tgz signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jinstall-signed/jinstall-8.3R2.8-export.tgz
Using /mfs/validate/tmp/jinstall/jbundle-8.3R2.8-export.tgz
Checking jbundle requirements on /
Using /mfs/validate/tmp/jbundle/jbase-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jkernel-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jpfe-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M10-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M120-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M160-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M320-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M40-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-M7i-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-T-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-X960-8.3R2.8.tgz
Verified SHA1 checksum of jpfe-common-8.3R2.8.tgz
WARNING: hw.product.model='unknown' using jpfe-M40
Using /mfs/validate/tmp/jbundle/jdocs-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Using /mfs/validate/tmp/jbundle/jroute-8.3R2.8.tgz
Verified manifest signed by PackageProduction_8_3_0
Hardware Database regeneration succeeded
Validating against /config/juniper.conf.gz
mgd: error: schema: dbs_remap_daemon_index: could not find daemon name 'kmd'
mgd: error: schema: dbs_remap_daemon_index: could not find daemon name 'kmd'
Routing protocols process: task_get_port: getservbyname("ldp", "tcp") failed, u6
Routing protocols process: task_get_port: getservbyname("ldp", "udp") failed, u6
Logical router multiplexer process: task_get_port: getservbyname("ldp", "tcp") 6
Logical router multiplexer process: task_get_port: getservbyname("ldp", "udp") 6
mgd: commit complete
Validation succeeded
Installing package '/var/tmp/jinstall-8.3R2.8-export-signed.tgz' ...
Verified jinstall-8.3R2.8-export.tgz signed by PackageProduction_8_3_0
./+INSTALL: /sbin/x509-exts: not found
Adding jinstall...
WARNING: The /var filesystem is low on free disk space.
WARNING: This package requires 717696k free, but there
WARNING: is only 533440k available.
Verified manifest signed by PackageProduction_8_3_0
WARNING: This package will load JUNOS 8.3R2.8 software.
WARNING: It will save JUNOS configuration files, and SSH keys
WARNING: (if configured), but erase all other files and information
WARNING: stored on this machine. It will attempt to preserve dumps
WARNING: and log files, but this can not be guaranteed. This is the
WARNING: pre-installation stage and all the software is loaded when
WARNING: you reboot the system.
Saving the config files ...
Installing the bootstrap installer ...
WARNING: A REBOOT IS REQUIRED TO LOAD THIS SOFTWARE CORRECTLY. Use the
WARNING: 'request system reboot' command when software installation is
WARNING: complete. To abort the installation, do not reboot your system,
WARNING: instead use the 'request system software delete jinstall'
WARNING: command as soon as this operation completes.
Saving package file in /var/sw/pkg/jinstall-8.3R2.8-export-signed.tgz ...
Saving state for rollback ...
root@R1>
root@R1>
至此整個升級文件的添加過程就進行完畢了,此時須要重啓JUNOS,重啓以後就完成了整個軟件版本的升級過程,經過以下命令重啓JUNOS:
root@R1> request system reboot /*
重啓
JUNOS
,後面不粘貼重啓過程的詳細輸出,不必
*/
Reboot the system ? [yes,no] (no) yes
Shutdown NOW!
Reboot consistency check bypassed - jinstall 8.3R2.8 will complete installationt
[pid 8149]
root@R1>
*** FINAL System shutdown message from root@R1 ***
System going down IMMEDIATELY
Aug 18 22:56:33 init: syslogd (PID 2918) exited with status=0
Normal
Exit
重啓完成以後驗證版本是否升級成功:
root@R1%
root@R1% 8.3R2.8 built 2007-07-07 00:23:06 UTC
root@R1%
root@R1% cli
root@R1> show version
Hostname: R1
Model: olive
JUNOS Base OS boot [8.3R2.8]
JUNOS Base OS Software Suite [8.3R2.8]
JUNOS Kernel Software Suite [8.3R2.8]
JUNOS Packet Forwarding Engine Support (M/T Common) [8.3R2.8]
JUNOS Packet Forwarding Engine Support (M20/M40) [8.3R2.8]
JUNOS Online Documentation [8.3R2.8]
JUNOS Routing Software Suite [8.3R2.8]
能夠看到,JUNOS已經成功升級到8.3R2.8版本,先寫到這吧,由於是本身第一次升級JUNOS的軟件版本,寫個文檔記錄一下升級的關鍵步驟,接下來會琢磨一下新版本的特性是否有本身用的上的地方。