Juniper模拟器JUNOS升级指南

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 �Cl  /* 显示当前目录下文件的详细信息,可以看到升级文件已经下载到本地 */
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 的软件版本,写个文档记录一下升级的关键步骤,接下来会琢磨一下新版本的特性是否有自己用的上的地方。

你可能感兴趣的:(职场,模拟器,休闲,juniper,版本升级)