2023年12月23日发(作者:)

JUNOS升级步骤

版本

日期:

1.0.5

2005年1月25日

JUNOS升级步骤

目录

1. 计划 ............................................................................. 2

1.1. 选择正确的版本 ................................................................. 2

1.2. 中断时间的估计 ................................................................. 2

2. 准备 ............................................................................. 2

3. 升级的步骤 ..................................................................... 5

3.1. 备份RE的升级步骤 ............................................................... 6

3.1.1.

在远程PC上,通过主RE登录备份RE ............................................ 6

3.1.2.

让现场工程师用串行线连接PC机到备份RE控制口 ................................ 6

3.1.3.

备份FLASH当前JUNOS和配置到硬盘上 .......................................... 6

3.1.4.

升级软件 .................................................................. 7

3.1.5.

启动这个RE以完成升级 ...................................................... 8

3.1.6.

登录到这个刚才完成升级的RE并检查RE是否正常启动 ........................... 13

3.1.7.

对硬盘进行重新分区 ....................................................... 13

3.1.8.

恢复mirror-flash-on-disk配置(如果原来无此配置,请忽略此步骤) ............ 16

3.1.9.

在双RE系统上切换升级了的备份RE到主用状态 ................................. 16

3.1.10.

确认现在作为主用的这个RE工作一切正常 ..................................... 16

3.1.11.

备份FLASH当前JUNOS和配置到硬盘上 ......................................... 17

3.2. 现在的备份RE(即原先的主RE)的升级步骤 .......................................... 17

3.3. 在双RE系统上去除“BACKUP

RE ACTIVE”告警 ........................................ 17

4. 备份和应急措施 ................................................................. 17

4.1. 如果需要退回到原先的版本 ...................................................... 18

4.2. 从FLASH启动失败 ............................................................... 18

4.3. RE切换不正常 .................................................................. 18

5. 各种路由器的面板图 ............................................................. 19

19

20

M40E .......................................................................... 21

22

T640/T320 ..................................................................... 22

5.1.

5.2.

5.3.

5.4.

5.5.

1

JUNOS升级步骤

1. 计划

1.1. 选择正确的版本

软件升级用于提供BUG的修正及支持新的功能(比如新的硬件或软件功能)。请查阅JUNOS Release Notes 以选择适当的JUNOS版本,并且检查Release Notes 中是否有关于该版本的特别的升级步骤。在这本资料中我们假定使用6.4。

1.2. 中断时间的估计

每个RE需要两次启动(在配置了“system mirror-flash-on-disk”的情况下需要4次)。每次启动需要约5分钟时间供RE和PFE启动完毕,再需另外几分钟时间供路由协议完全收敛。

对于单RE的系统,每次RE的启动都会造成中断,直至路由完全收敛。

对于双RE的系统,如果配置了“平滑RE切换”功能,则在RE之间切换时只会有很少或小于1分钟的中断。因为完成两个RE的升级只需要1次或2次切换,所以中断时间可以减少到最小。

2. 准备

升级将以网管中心远程方式为主,同时本地提供支持包括紧急情况下本地升级。如果升级过程中设备有任何不正常现象或屏幕上的结果有出错或报警,则必须立即停止操作并且通知支持工程师。除非步骤中标明是不适用于该设备的,否则不能跳过该步骤进入下一步。

本地需要提供:

 PC机,具有以太网卡和终端仿真软件(如Windows HyperTerminal)

 连接PC机的串口到路由器的控制口的串行线

 连接PC机以太网卡到路由器fxp0 端口的以太网交叉线

 PC机装有FTP 服务器软件,用于上载JUNOS和下载配置

 具有超级用户权限的用户帐号和口令(不是ROOT用户)

 ROOT用户的口令

 JUNOS软件上载到本地PC机上的FTP服务器

 现场工程师

 装有JUNOS的JUNIPER PCMCIA FLASH卡。(注 : JUNOS PCMCIA Flash

card是随设备一同到货,且每一台路由器附带1张。请各地市工程/网维人员认真查找。)

另外,在发起远程升级的网管中心也需要提供:

 PC机,具有以太网卡和终端仿真软件(如Windows HyperTerminal)

2

JUNOS升级步骤

 PC机装有FTP 服务器软件,用于上载JUNOS和下载配置

 具有超级用户权限的用户帐号和口令(不是ROOT用户)

 ROOT用户的口令

 JUNOS软件上载到网管中心PC机上的FTP服务器

以下我们假定对一个双RE的系统进行准备工件。如果是单RE的系统,则针对备份RE的操作(例如检查是否当前RE是备份RE)可以跳过不作。

1. 确认现场和远程的PC机上的终端仿真软件都设置为自动抓屏到一个日志文件中。

2. 让现场工程师用串行线连接他的PC机到主RE(对于单RE 的系统就是唯一的RE,以下同此)的控制口,并确认输入输出在屏幕上都是正常的

3. 对于双RE系统,如果“平滑RE切换”适用于该系统(6.0及以后的版本有这个功能,请检查JUNOS Release Notes以确认软件和硬件的要求)并且还没有配置这个功能,则可以配置这个功能,以取得最少的中断时间。

Set interface Fxp0

set interfaces fxp0 unit 0 family inet address 10.1.1.2/24

Set ftp sev

login: lab

Password:

--- JUNOS 6.3R2.2 built 2004-08-06 01:43:25 UTC

lab@m160> configure

Entering configuration mode

[edit]

lab@m160# show chassis redundancy graceful-switchover

 没有输出,即还没有配置这个功能

[edit]

lab@m160# delete chassis redundancy

[edit]

lab@m160# set chassis redundancy graceful-switchover enable

[edit]

lab@m160# commit synchronize

re0: configuration check succeeds

re1: commit complete

re0: commit complete

{master}[edit]

4. 从远程PC上,同步主RE上的配置到备份RE(如果是双RE系统)

{master}[edit]

lab@m160# commit synchronize

re0: configuration check succeeds

re1: commit complete

re0: commit complete

3

JUNOS升级步骤

5. 从现场PC或远程PC上,在主RE上显示配置,使得配置自动记录到日志文件中。再保存配置到RE上(作为RE上的一个本地文件),并且FTP上载到远程FTP服务器上。用远程FTP服务器要求的用户名、口令 和IP地址替换以下例子中的相应部分。

注意:升级时配置和一些其它附属文件会被自动保存,但存放在RE上的本地日志等文件可能会被删除。所以如果需要保存这些日志等文件请也在此时FTP这些文件到服务器上。

lab@m160# show | no-more

…….

{master}[edit]

lab@m160# save /var/tmp/config-before-6.4R2

Wrote 221 lines of configuration to '/var/tmp/config-before-6.4R2'

{master}[edit]

lab@m160# run file copy /var/tmp/config-before-6.4R2 ftp://username:password@IP-address/config-before-6.4R2

Transferring ftp://username:password@IP-address/config-before-6.4R2 (5554 bytes): 100%

5554 bytes transferred in 0.0 seconds (4.71 MBps)

{master}[edit]

Load re:0/var/tmp/config-before-6.4R2 重载配置文件

6. 从远程PC上,FTP 上载6.4R软件到主RE上。文件名类似“”。用远程FTP服务器要求的用户名、口令 和IP地址替换以下例子中的相应部分。

lab@m160# run file copy ftp://username:password@IP-address/ /var/tmp/

7. 从远程PC上,从主RE拷贝软件到备份RE,这里假定RE1是备份RE

lab@m160# run file copy /var/tmp/

re1:/var/tmp/

8. 如果需要的话,在现场准备JUNIPER路由器的PCMCIA FLASH卡。

创建JUNIPER PCMCIA FLASH卡的文件是另一个文件,文件名类似“install-media-6.4R2.4-export”。从远程PC上,FTP上载这个文件到主RE。用远程FTP服务器要求的用户名、口令 和IP地址替换以下例子中的相应部分。

lab@m160# run file copy ftp://username:password@IP-address/install-media-6.4R2.4-export

/var/tmp/install-media-6.4-20050107.0-export

然后让现场工程师将PCMCIA卡插入到主RE。插入后,在远程PC上作以下操作,命令执行完毕可能需要几分钟时间。

lab@m160# run start shell

% dd if=/dev/zero of=/dev/rad3 count=20

% dd if=/var/tmp/install-media-6.4-20050107.0-export of=/dev/rad3 bs=64k

4

JUNOS升级步骤

9. 让现场工程师按下PCMCIA卡旁边的释放按键弹出PCMCIA卡。确认任何RE上都没有插入PCMCIA卡。

10. 检查当前系统工作状态

检查系统当前工件状态,这包括但不限于:

• 硬件信息,机框、板卡环境状况

• 接口通断状态

• 路由表条数和流量大小

• IGP、BGP、MPLS接口和协议邻居状态

以下是一些常用命令:

show chassis hardware

show chassis environment

show chassis alarms

show chassis routing-engine

show chassis fpc

show interfaces terse

show route summary

show isis adjacency

show ospf neighbor

show bgp summary

show ldp neighbor

3. 升级的步骤

请按照下列步骤升级路由器。

对于双RE的系统将先升级备份RE。在升级备份RE后将切换RE使得原先的备份RE成为主RE。只有在确认了这个新的主RE一切正常后才会升级原先的主RE(即现在的备份RE)。这样即使出现问题我们仍可以退回到原先工件正常的主RE上。

确认你在操作的RE是主用或备份RE是非常重要的。你可以通过提示符或打命令确认这一点

{backup}

 如果使用了“平滑lab@m160-re1>

RE切换”,则会多出这个提示符显示RE状态

或者

lab@m160-re1> show chassis hardware

Aborted! This command can only be used on the master routing engine.

 这表明当前RE是备份RE

5

JUNOS升级步骤

对于单RE系统请执行步骤3.1.3至3.1.11(跳过步骤3.1.9,因为这一步不适用)。我们将用硬盘作为备份介质,如果FLASH升级出现问题则用硬盘退回到原先正常工作的JUNOS和配置。因为这是单RE系统,所以检查备份RE状态、切换主备等操作在这里不适用。

注意:如果以下任何步骤失败或出错,请停止操作并且立即通知爱立信工程师。在资料的最后部分也有一些紧急情况下的处理方法。

3.1. 备份RE的升级步骤

3.1.1. 在远程PC上,通过主RE登录备份RE

m160 (ttyp0)

login: lab

Password:

--- JUNOS 6.3R2.2 built 2004-08-06 01:43:25 UTC

{master}

lab@m160> request routing-engine login other-routing-engine

--- JUNOS 6.3R2.2 built 2004-08-06 01:43:25 UTC

{backup}

lab@m160-re1>

3.1.2. 让现场工程师用串行线连接PC机到备份RE控制口

3.1.3. 备份FLASH当前JUNOS和配置到硬盘上

3.1.3.1. 去除mirror-flash-on-disk配置

如果你在“system”之下有“mirror-flash-on-disk”配置,则在进行下一步之前必须去除这一配置。

lab@m160-re1# show system mirror-flash-on-disk

mirror-flash-on-disk;

{backup}[edit]

lab@m160-re1# delete system mirror-flash-on-disk

注意你必须使用“commit”,即使这是个双RE的系统,这是因为我们现在是在处理当前RE。

{backup}[edit]

lab@m160-re1# commit

warning: graceful-switchover is enabled, commit synchronize should be used

warning: graceful-switchover is enabled, commit on backup is not recommended

commit complete

然后你需要启动这个RE以完成配置的改动。你会失去这个RE的连接,或退回到主RE命令行界面(如果这是个双RE系统)。

{backup}[edit]

6

JUNOS升级步骤

lab@m160-re1# run request system reboot

Reboot the system ? [yes,no] (no)yes

当这个RE在几分钟内完成启动后,你又可以连接到这个RE了。在进行下一步操作之前,请确认你操作的是正确的RE。

3.1.3.2. 备份FLASH当前JUNOS和配置到硬盘上

lab@m160-re1> request system snapshot

Copying '/' to '/altroot' .. (this may take a few minutes)

Copying '/config' to '/altconfig' .. (this may take a few minutes)

The following filesystems were archived: / /config

3.1.4. 升级软件

lab@m160-re1> request system software add /var/tmp/

NOTICE: Validating configuration against .

NOTICE: Use the 'no-validate' option to skip this if desired.

Checking compatibility with configuration

Using jbase-6.3R2.2

Using /var/tmp/

Verified MD5 checksum of /var/validate/tmp/jinstall/

Using /var/validate/tmp/jinstall-signed/

Using /var/validate/tmp/jinstall/

Using /var/validate/tmp/jbundle/

Using /var/validate/tmp/jbundle/

Using /var/validate/tmp/jbundle/

Using /var/validate/tmp/jbundle/

Using /var/validate/tmp/jbundle/

Validating against /config/

mgd: commit complete

Validation succeeded

Installing package '/var/home/lab/' ...

Verified MD5 checksum of

WARNING: This package will load JUNOS 6.4R2.4 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/ ...

Saving state for rollback ...

{backup}

lab@m160-re1>

7

JUNOS升级步骤

3.1.5. 启动这个RE以完成升级

lab@m160-re1> request system reboot

Reboot the system ? [yes,no] (no) yes

Reboot consistency check bypassed - jinstall 6.4R2.4 will complete installation upon

reboot

shutdown: [pid 14375]

Shutdown NOW!

{backup}

lab@m160-re1>

*** FINAL System shutdown message from root@m160-re1 ***

System going down IMMEDIATELY

当这个RE在几分钟内完成启动后,你又可以连接到这个RE了。在进行下一步操作之前,请确认你操作的是正确的RE。

你可以让现场工程师通过RE控制口监视RE启动过程,启动过程示例如下。你也可在RE启动后登录到RE上,并用下一步骤中的命令检查RE启动的结果,检查时请确认你操作的是正确的RE。

Will try to boot from :

PCMCIA ATA Flash Card

Compact Flash

Primary IDE Hard Disk

Ethernet

Trying to Boot from PCMCIA ATA Flash Card

Trying to Boot from Compact Flash

Loading /boot/loader

Console: serial port

BIOS drive A: is disk0

BIOS drive C: is disk1

BIOS drive D: is disk2

BIOS 639kB/785344kB available memory

FreeBSD/i386 bootstrap loader, Revision 0.8

(************************.net,TueOct500:09:53GMT2004)Loading /boot/defaults/

/boot/installer text=0x227a40 data=0x2207c+0x27e34 syms=[0x4+0x2df80+0x4+0x361fa]

Hit [Enter] to boot immediately, or space bar for command prompt.

Booting [installer]...

Copyright (c) 1996-2001, Juniper Networks, Inc.

All rights reserved.

Copyright (c) 1992-2001 The FreeBSD Project.

Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

The Regents of the University of California. All rights reserved.

JUNOS 6.4R2.4 #0: 2004-10-05 00:11:59 UTC

************************.net:/build/harrekki-c/6.4R2.4/obj-i386/sys/compile/MFSTimecounter "i8254" frequency 1193182 Hz

Timecounter "TSC" frequency 331707300 Hz

CPU: Pentium II/Pentium II Xeon/Celeron (331.71-MHz 686-class CPU)

Origin = "GenuineIntel" Id = 0x66a Stepping = 10

8

JUNOS升级步骤

Features=0x183f9ff

real memory = 805240832 (786368K bytes)

sio0: gdb debugging port

avail memory = 775872512 (757688K bytes)

Preloaded elf kernel "installer" at 0xc0734000.

Preloaded md_image "/boot/mdimg" at 0xc07340a0.

DEVFS: ready for devices

Pentium Pro MTRR support enabled

md0: Preloaded image 3520512 bytes at 0xc03d6a74

md1: Malloc disk

DRAM Data Integrity Mode: ECC Mode with h/w scrubbing

npx0: on motherboard

npx0: INT 16 interface

pcib0: on motherboard

pci0: on pcib0

isab0: at device 7.0 on pci0

isa0: on isab0

atapci0: port 0xf000-0xf00f at device 7.1 on pci0

ata0: at 0x1f0 irq 14 on atapci0

pci0: at 7.2 irq 11

smb0: port 0x5000-0x500f at device 7.3 on pci0

pcic-pci0: mem 0xe8204000-0xe8204fff irq 15 at device

13.0 on pci0

pcic-pci0: TI12XX PCI Config Reg: [pci only]

pcic-pci1: mem 0xe8209000-0xe8209fff irq 12 at device

13.1 on pci0

pcic-pci1: TI12XX PCI Config Reg: [pci only]

fxp0: port 0xd800-0xd83f mem 0xe8100000-0xe81fffff,0xe8203000-0xe8203fff irq 12 at device 16.0 on pci0

pcib1: at device 17.0 on pci0

pci1: on pcib1

mcs0: mem 0xe5100000-0xe510ffff irq 12 at device 13.0

on pci1

fxp1: port 0xc000-0xc03f mem 0xe5000000-0xe50fffff,0xe5110000-0xe5110fff irq 10 at device 14.0 on pci1

fxp2: port 0xe000-0xe03f mem 0xe8000000-0xe80fffff,0xe8207000-0xe8207fff irq 10 at device 19.0 on pci0

ata2 at port 0x170-0x177,0x376 irq 15 on isa0

atkbdc0: at port 0x60,0x64 on isa0

vga0: at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff on isa0

sc0: at flags 0x100 on isa0

sc0: MDA <16 virtual consoles, flags=0x100>

pcic0: at port 0x3e0 iomem 0xd0000 irq 10 on isa0

pcic0: management irq 11

pcic0: Polling mode

pccard0: on pcic0

pccard1: on pcic0

sio0 at port 0x3f8-0x3ff irq 4 flags 0x90 on isa0

sio0: type 16550A, console

sio1 at port 0x2f8-0x2ff irq 3 on isa0

sio1: type 16550A

fxp0: Ethernet address 00:a0:a5:12:46:ab

fxp1: Ethernet address 02:00:00:00:01:01

fxp2: Ethernet address 00:a0:a5:12:46:aa

mastership: initial master_config 0x60 ch_prs 0x7c

DEVFS: ready to run

ad0: 91MB [734/8/32] at ata0-master using PIO1

ad1: 11513MB [23392/16/63] at ata0-slave using UDMA33

Mounting root from cd9660:/dev/md0c

Disabling watchdog

=================== Bootstrap installer starting ===================

9

JUNOS升级步骤

Initialized the environment

Routing engine model is RE-2.0

Sourcing /sbin/RE-2.0

Discovered that flash disk = ad0 , hard disk = ad1

Disk to install is wd0

Setting ospackage=jboot-6.4R2.4, configpackage=

Setting packlist=

Setting isupgrade=jboot-6.4R2.4

Packages and configurations copied to /tmp

10+0 records in

10+0 records out

5120 bytes transferred in 0.054924 secs (93220 bytes/sec)

******* Working on device /dev/wd0 *******

fdisk: invalid fdisk partition table found

fdisk: WARNING: adjusting start offset of partition 1

from 1 to 32, to fall on a head boundary

fdisk: WARNING: adjusting size of partition 1 from 187904 to 187872

to end on a cylinder boundary

Installing disk label on wd0

Running newfs

Warning: 544 sector(s) in last cylinder unallocated

/dev/wd0s1a: 163296 sectors in 40 cylinders of 1 tracks, 4096 sectors

79.7MB in 3 cyl groups (16 c/g, 32.00MB/g, 6656 i/g)

super-block backups (for fsck -b #) at:

32, 65568, 131104

Running newfs

/dev/wd0s1e: 24576 sectors in 6 cylinders of 1 tracks, 4096 sectors

12.0MB in 1 cyl groups (16 c/g, 32.00MB/g, 3072 i/g)

super-block backups (for fsck -b #) at:

32

Installing JUNOS

Making

Mounted jbase on /mnt/packages/mnt/jbase (/dev/vn0)

Adding ...

Requested space: 198394604 bytes, free space: 5482097664 bytes in /var/tmp/instmp.50gD4n

Running requirements file first for jbundle-6.4R2.4-export..

Running pre-install for jbundle-6.4R2.4-export..

extract: Package name is jbundle-6.4R2.4-export

extract: CWD to .

Running post-install for jbundle-6.4R2.4-export..

Verified SHA1 checksum of

Verified SHA1 checksum of jboot-6.4R2.4

Verified SHA1 checksum of

Verified SHA1 checksum of

Verified SHA1 checksum of

Verified SHA1 checksum of

Restoring backed

Unmounted /mnt/packages/mnt/jbase

otdev: disk -> compact-flash

24: Terminated

Waiting (max 60 seconds) for system process `bufdaemon' stopped

Waiting (max 60 seconds) for system process `syncer' stopped

Award Modular BIOS v4.51PG, An Energy Star Ally

Copyright (C) 1984-98, Award Software, Inc.

done

10

JUNOS升级步骤

TEKNOR APPLICOM T1023 BIOS Version 1.2 'DWD'

ata0: Spinning down devices.

11/29/2000-i440BX-SMC67X-2A69TU00C-00

PXE-M04: Initializing network boot device using

PXE-M04: Initializing network boot device using

PXE-M04: Initializing network boot device using

Intel LANDesk (R) Service Agent II, version 0.99k

Copyright (C) 1997,1998 Intel Corporation. All rights reserved.

PXE-E67: Invalid MAC address.

PXE-M0F: Exiting LANDesk (R) Service Agent II

Will try to boot from :

PCMCIA ATA Flash Card

Compact Flash

Primary IDE Hard Disk

Ethernet

Trying to Boot from Compact Flash

Loading /boot/loader

Console: serial port

BIOS drive A: is disk0

BIOS drive C: is disk1

BIOS drive D: is disk2

BIOS 639kB/785344kB available memory

FreeBSD/i386 bootstrap loader, Revision 0.8

(************************.net,TueOct500:09:53GMT2004)Loading /boot/defaults/

/kernel text=0x4c26d1 data=0x2c8bc+0x49f34 syms=[0x4+0x41710+0x4+0x4d988]

Hit [Enter] to boot immediately, or space bar for command prompt.

Booting [kernel]...

Copyright (c) 1996-2001, Juniper Networks, Inc.

All rights reserved.

Copyright (c) 1992-2001 The FreeBSD Project.

Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

The Regents of the University of California. All rights reserved.

JUNOS 6.4R2.4 #0: 2004-10-05 00:18:20 UTC

************************.net:/build/harrekki-c/6.4R2.4/obj-i386/sys/compile/JUNIPERTimecounter "i8254" frequency 1193182 Hz

Timecounter "TSC" frequency 331706083 Hz

CPU: Pentium II/Pentium II Xeon/Celeron (331.71-MHz 686-class CPU)

Origin = "GenuineIntel" Id = 0x66a Stepping = 10

Features=0x183f9ff

real memory = 805240832 (786368K bytes)

sio0: gdb debugging port

avail memory = 775933952 (757748K bytes)

Preloaded elf kernel "kernel" at 0xc06ca000.

DEVFS: ready for devices

11

JUNOS升级步骤

Pentium Pro MTRR support enabled

md0: Malloc disk

DRAM Data Integrity Mode: ECC Mode with h/w scrubbing

npx0: on motherboard

npx0: INT 16 interface

pcib0: on motherboard

pci0: on pcib0

isab0: at device 7.0 on pci0

isa0: on isab0

atapci0: port 0xf000-0xf00f at device 7.1 on pci0

ata0: at 0x1f0 irq 14 on atapci0

pci0: at 7.2 irq 11

smb0: port 0x5000-0x500f at device 7.3 on pci0

pcic-pci0: mem 0xe8204000-0xe8204fff irq 15 at device

13.0 on pci0

pcic-pci0: TI12XX PCI Config Reg: [pci only]

pcic-pci1: mem 0xe8209000-0xe8209fff irq 12 at device

13.1 on pci0

pcic-pci1: TI12XX PCI Config Reg: [pci only]

fxp0: port 0xd800-0xd83f mem 0xe8100000-0xe81fffff,0xe8203000-0xe8203fff irq 12 at device 16.0 on pci0

pcib1: at device 17.0 on pci0

pci1: on pcib1

mcs0: mem 0xe5100000-0xe510ffff irq 12 at device 13.0

on pci1

fxp1: port 0xc000-0xc03f mem 0xe5000000-0xe50fffff,0xe5110000-0xe5110fff irq 10 at device 14.0 on pci1

fxp2: port 0xe000-0xe03f mem 0xe8000000-0xe80fffff,0xe8207000-0xe8207fff irq 10 at device 19.0 on pci0

ata2 at port 0x170-0x177,0x376 irq 15 on isa0

atkbdc0: at port 0x60,0x64 on isa0

vga0: at port 0x3b0-0x3bb iomem 0xb0000-0xb7fff on isa0

sc0: at flags 0x100 on isa0

sc0: MDA <16 virtual consoles, flags=0x100>

pcic0: at port 0x3e0 iomem 0xd0000 irq 10 on isa0

pcic0: management irq 11

pcic0: Polling mode

pccard0: on pcic0

pccard1: on pcic0

sio0 at port 0x3f8-0x3ff irq 4 flags 0x90 on isa0

sio0: type 16550A, console

sio1 at port 0x3e8-0x3ef irq 5 on isa0

sio1: type 16550A

sio2 at port 0x2f8-0x2ff irq 3 on isa0

sio2: type 16550A

sio3: configured irq 7 not in bitmap of probed irqs 0

fxp0: Ethernet address 00:a0:a5:12:46:ab

fxp1: Ethernet address 02:00:00:00:01:01

fxp2: Ethernet address 00:a0:a5:12:46:aa

mastership: initial master_config 0x60 ch_prs 0x7c

DEVFS: ready to run

ad0: 91MB [734/8/32] at ata0-master using PIO1

ad1: 11513MB [23392/16/63] at ata0-slave using UDMA33

rd0: ATA SW-RAID configuring 1 subdisks

rd0: stripe 0: subdisk rad0 mirrordisk rad1

Mounting root from ufs:/dev/ad0s1a

Mounted jbase package on /

Mounted jkernel package on /

Mounted jpfe package on /

Mounted jdocs package on /

Mounted jroute package on /

swapon: adding /dev/ad1s1b as swap device

12

JUNOS升级步骤

Automatic reboot

/dev/ad0s1a: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/ad0s1a: clean, 45047 free /dev/ad0s1e: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/ad0s1e: clean, 11859 free (15 frags, 5629 blocks, 0.0% fragmentation)

(3 frags, 1482 blocks, 0.0% fragmentation)

(15 frags, 5629 blocks, 0.0% fragmentation)

/dev/ad1s1f: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/ad1s1f: clean, 6240275 free (939 frags, 779917 blocks, 0.0% fragmentation)

tunefs: soft updates set

Creating d: commit complete

Setting initial options: debugger_on_panic=NO debugger_on_break=NO.

Enable PC-card:PCCARD Memory address set to 0xd4000

.

Doing initial network setup:.

Initial interface configuration:

TNP: adding neighbor 5 to interface fxp1.

TNP: adding neighbor 255 to interface fxp1.

TNP: adding neighbor 5 to interface fxp2.

TNP: adding neighbor 255 to interface fxp2.

additional daemons: syslogd.

checking for

savecore: Router rebooting after a

Additional routing options:.

Doing additional network setup:.

Starting final network daemons:.

setting ldconfig path: /usr/lib

starting standard daemons: cron.

Initial rc.i386 initialization: microcode kld.

rc.i386 configuring syscons:.

Local package initialization:.

starting local daemons:.

Fri Jan 21 16:45:15 CST 2005

m160-re1 (ttyd0)

login:

3.1.6. 登录到这个刚才完成升级的RE并检查RE是否正常启动

lab@m160-re1> show system boot-messages

lab@m160-re1> show log messages

lab@m160-re1> show configuration

3.1.7. 对硬盘进行重新分区

注意:这需要再次启动RE。

lab@m160-re1> request system partition hard-disk

WARNING: The hard disk is about to be partitioned. The contents

WARNING: of /altroot and /altconfig will be saved and restored.

WARNING: All other data is at risk. This is the setup stage, the

WARNING: partition happens during the next reboot.

Setting up to partition the hard disk ...

WARNING: A REBOOT IS REQUIRED TO PARTITION THE HARD DISK. Use the

WARNING: 'request system reboot' command when you are ready to proceed

13

JUNOS升级步骤

WARNING: with the partitioning. To abort the partition of the hard disk

WARNING: use the 'request system partition abort' command.

lab@m160> request system reboot

Reboot the system ? [yes,no] (no) yes

shutdown: [pid 8474]

Shutdown NOW!

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

System going down IMMEDIATELY

当这个RE在几分钟内完成启动后,你又可以连接到这个RE了。在进行下一步操作之前,请确认你操作的是正确的RE。

你可以让现场工程师通过RE控制口监视RE启动过程,启动过程示例如下。你也可在RE启动后登录到RE上,并用步骤3.1.6中的命令检查RE启动的结果,检查时请确认你操作的是正确的RE。

Will try to boot from :

PCMCIA ATA Flash Card

Compact Flash

Primary IDE Hard Disk

Ethernet

Trying to Boot from PCMCIA ATA Flash Card

Trying to Boot from Compact Flash

Console: serial port

BIOS drive A: is disk0

BIOS drive C: is disk1

BIOS drive D: is disk2

BIOS 639kB/523200kB available memory

FreeBSD/i386 bootstrap loader, Revision 0.8

(**************************.net,FriAug601:31:09GMT2004)Loading /boot/defaults/

/kernel text=0x495fd6 data=0x2bb6c+0x473b8 syms=[0x4+0x3ff90+0x4+0x4b7c3]

Loader Quick Help

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

The boot order is PCMCIA or floppy -> Flash -> Disk -> Lan ->

back to PCMCIA or floppy. Typing reboot from the command prompt will

cycle through the boot devices. On some models, you can set the next

boot device using the nextboot command: nextboot compact-flash | disk

For more information, use the help command: help

Hit [Enter] to boot immediately, or space bar for command prompt.

Booting [kernel]...

Copyright (c) 1996-2001, Juniper Networks, Inc.

All rights reserved.

Copyright (c) 1992-2001 The FreeBSD Project.

Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994

The Regents of the University of California. All rights reserved.

JUNOS 6.3R2.2 #0: 2004-08-06 01:43:25 UTC

**************************.net:/build/jormungand-c/6.3R2.2/obj-i386/sys/compile/JUNIPER

Timecounter "i8254" frequency 1193182 Hz

14

JUNOS升级步骤

Timecounter "TSC" frequency 332522778 Hz

CPU: Pentium II/Pentium II Xeon/Celeron (332.52-MHz 686-class CPU)

Origin = "GenuineIntel" Id = 0x66a Stepping = 10

………

Saving contents of /altroot

Saving contents of /altconfig

Partitioning ad1 ... (here is it to partition the H/D)

******* Working on device /dev/ad1 *******

fdisk: invalid fdisk partition table found

fdisk: WARNING: adjusting start offset of partition 1

from 1 to 63, to fall on a head boundary

fdisk: WARNING: adjusting size of partition 1 from 23579136 to 23579073

to end on a cylinder boundary

Running newfs

Warning: 544 sector(s) in last cylinder unallocated

/dev/ad1s1a: 163296 sectors in 40 cylinders of 1 tracks, 4096 sectors

79.7MB in 3 cyl groups (16 c/g, 32.00MB/g, 6656 i/g)

super-block backups (for fsck -b #) at:

32, 65568, 131104

Running newfs

/dev/ad1s1e: 24576 sectors in 6 cylinders of 1 tracks, 4096 sectors

12.0MB in 1 cyl groups (16 c/g, 32.00MB/g, 3072 i/g)

super-block backups (for fsck -b #) at:

32

Restoring contents of /altroot

Restoring contents of /altconfig

Partition of ad1 done.

swapon: adding /dev/ad1s1b as swap device

Automatic reboot

/dev/rd0s1e: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/rd0s1e: clean, 11859 free (11 frags, 1481 blocks, 0.1% fragmentation)

/dev/ad1s1f: FILESYSTEM CLEAN; SKIPPING CHECKS

/dev/ad1s1f: clean, 9722725 free (565 frags, 1215270 blocks, 0.0% fragmentation)

tunefs: soft updates set

Creating d: commit complete

Setting initial options: debugger_on_panic=NO debugger_on_break=NO.

Enable PC-card:PCCARD Memory address set to 0xd4000

.

Doing initial network setup:.

Initial interface configuration:

TNP: adding neighbor 4 to interface fxp1.

TNP: adding neighbor 255 to interface fxp1.

TNP: adding neighbor 4 to interface fxp2.

TNP: adding neighbor 255 to interface fxp2.

additional daemons: syslogd.

checking for savecore: Router rebooting after a

Additional routing options:.

Doing additional network setup:.

Starting final network daemons:.

setting ldconfig path: /usr/lib

starting standard daemons: cron.

Initial rc.i386 initialization: microcode kld.

rc.i386 configuring syscons:.

Local package initialization:.

starting local daemons:.

Fri Jan 21 17:08:36 CST 2005

m160-re1 (ttyd0)

login:

15

JUNOS升级步骤

3.1.8. 恢复mirror-flash-on-disk配置(如果原来无此配置,请忽略此步骤)

如果你需要恢复或添加“mirror-flash-on-disk”配置,则你应该在这时操作。否则请直接执行下一步。

{backup}[edit]

lab@m160-re1# set system mirror-flash-on-disk

注意你必须使用“commit”,即使这是个双RE的系统,这是因为我们现在是在处理当前RE。

{backup}[edit]

lab@m160-re1# commit

warning: graceful-switchover is enabled, commit synchronize should be used

warning: graceful-switchover is enabled, commit on backup is not recommended

commit complete

然后你需要启动这个RE以完成配置的改动。你会失去这个RE的连接,或退回到主RE命令行界面(如果这是个双RE系统)。

{backup}[edit]

lab@m160-re1# run request system reboot

Reboot the system ? [yes,no] (no)yes

当这个RE在几分钟内完成启动后,你又可以连接到这个RE了。在进行下一步操作之前,请确认你操作的是正确的RE。

3.1.9. 在双RE系统上切换升级了的备份RE到主用状态

如果升级了的备份RE现在一切仍然都正常,则可以切换这个RE到主用状态。

{backup}

lab@m160-re1> request chassis routing-engine master acquire no-confirm

Complete. The local routing engine becomes the master.

{master}

lab@m160-re1>

如果在切换后你看到有黄色的报警灯并且从“show chassis alarms ”命令中看到是“Backup RE active”的告警,则这个告警会在步骤3.3中处理,现在你可以忽略它并且继续执行下一步。

3.1.10. 确认现在作为主用的这个RE工作一切正常

你应该用步骤2.10中的命令作对比检查,以确认这个升级了的RE现在工作一切正常。

16

JUNOS升级步骤

3.1.11. 备份FLASH当前JUNOS和配置到硬盘上

如果你没有在步骤3.1.8中配置“mirror-flash-on-disk ”,则你现在可以备份FLASH当前JUNOS和配置到硬盘上。

lab@m160-re1> request system snapshot

Copying '/' to '/altroot' .. (this may take a few minutes)

Copying '/config' to '/altconfig' .. (this may take a few minutes)

The following filesystems were archived: / /config

3.2. 现在的备份RE(即原先的主RE)的升级步骤

请执行步骤3.1.1至3.1.8,然后跳过步骤3.1.9 和 3.1.10,直接执行步骤3.1.11。

3.3. 在双RE系统上去除“Backup RE active”告警

在步骤3.1.9切换RE后,系统可能会报警“Backup RE active”。这是因为“chassis”配置中指定某个RE(缺省是RE0)为主用,但现在另外一个RE是主用。可以通过设置当前的主RE为缺省主RE来去除这个报警,以下的例子中RE1是当前的主RE。

{master}[edit]

lab@m160-re1# set chassis redundancy routing-engine 1 master

{master}[edit]

lab@m160-re1# commit synchronize

re1: configuration check succeeds

re0: commit complete

re1: commit complete

也可以通过再次切换RE去除这个报警。但是这样会造成再一次设备中断,所以不建议这个方法。

{master}

lab@m160-re1> request chassis routing-engine master release no-confirm

Complete. The other routing engine becomes the master.

{backup}

lab@m160-re1>

4. 备份和应急措施

以下是在升级不成功或需要中断升级的情况下可以采取的一些措施。

注意:最好的作法是只在紧急情况下使用这些措施。如果在升级过程中出现问题,请立即联系爱立信工程师。这些措施列在这里仅供在紧急情况下使用。

17

JUNOS升级步骤

4.1. 如果需要退回到原先的版本

如果因为新版本工作不正常或者是在升级过程中遇到其它问题,需要退回到原先的版本,则你可以重新安装自动保存在/var/sw/pkg 目录下的原先的版本。命令格式与升级操作是一样的,只是文件名不一样。

lab@m160-re1> request system software add /var/sw/pkg/

lab@m160-re1> request system reboot

4.2. 从FLASH启动失败

如果升级后系统无法从FLASH启动,则系统会自动从硬盘启动,硬盘上保存有原先的JUNOS版本和配置。

我们需要RE启动时本地控制口的日志以确认RE启动失败的原因。

4.3. RE切换不正常

如果RE切换后主RE工作不正常,需要切回备份RE,可以在主RE本地控制口上执行以下命令:

lab@m160-re1> request chassis routing-engine master release no-confirm

18

JUNOS升级步骤

5. 各种路由器的面板图

以下是设备的面板图,以帮助识别路由引擎 (Routing Engine) RE的物理位置。

5.1. M320

AXI520-8(M320) 机箱背面图

19

JUNOS升级步骤

5.2. M160

AXI580(M160) 机箱背面图

20

JUNOS升级步骤

5.3. M40e

AXI580-3(M40e) 机箱后视图

21

JUNOS升级步骤

5.4. M20

AXI520-4(M20) 机箱背面图

5.5. T640/T320

22

JUNOS升级步骤

T320机箱背面图

23

JUNOS升级步骤

T640机箱背面图

24