升级或重新安装 Junos OS 演化版之前
升级或重新安装 Junos OS 演化版之前,必须保存一些系统信息,确保有足够的磁盘空间可用,并备份当前的软件和配置。
您需要收集并保存有关系统当前状态的信息,以便可以比较升级前后的状态,以确保系统配置正确且正常运行。在升级之前,您还需要拍摄系统软件和配置的快照,以便在必要时能够恢复系统。
- 要检查是否有足够的磁盘空间可用于安装,请使用
show system storage
作模式命令。各种目录存储已安装的软件版本和数据文件,如日志文件和核心文件。如果(/soft、 /var 或 /data)目录的容量达到或超过 90%,则设备没有足够的存储空间来安装软件包。如果这些目录没有足够的空间,软件安装可能会失败。
我们建议您在设备上存储的软件版本不超过 5 个。请使用
request system software delete
作模式命令删除较旧或未使用的软件版本。要删除除当前版本和回滚版本之外的所有软件,请使用request system software delete archived
作模式命令。request system storage cleanup
如果存储区域(/var 目录)已满,请使用作模式命令。建议在将新映像复制到 /var/tmp 目录之前发出此命令,因为如果 /var 分区空间不足,此命令可能会删除映像。有关详细信息,请参阅 确保有足够的磁盘空间进行升级。
示例输出显示有关设备文件系统中 FPC 和路由引擎的可用磁盘空间量的统计信息。
user@host> show system storage fpc0: -------------------------------------------------------------------------- Filesystem Size Used Avail Capacity Mounted on /dev/root 30M 30M 0 100% /run/initramfs /dev/ram1p2 4.9G 586M 4.0G 13% /soft /dev/ram1p5 93M 19M 68M 22% /data /dev/ram1p7 2.7G 66M 2.4G 3% /var /dev/loop0 379M 2.3M 353M 1% /data/var/external devtmpfs 16G 0 16G 0% /dev [...output truncated...] fpc1: -------------------------------------------------------------------------- Filesystem Size Used Avail Capacity Mounted on /dev/root 30M 30M 0 100% /run/initramfs /dev/ram1p2 4.9G 586M 4.0G 13% /soft /dev/ram1p5 93M 19M 68M 22% /data /dev/ram1p7 2.7G 42M 2.5G 2% /var /dev/loop0 379M 2.3M 353M 1% /data/var/external devtmpfs 16G 0 16G 0% /dev [...output truncated...] re0: -------------------------------------------------------------------------- Filesystem Size Used Avail Capacity Mounted on /dev/root 34M 34M 0 100% /run/initramfs /dev/sda2 32G 10G 21G 34% /soft /dev/sda5 3.0G 179M 2.6G 7% /data /dev/sda7 145G 4.5G 134G 4% /var /dev/loop0 15G 38M 14G 1% /data/var/external devtmpfs 32G 0 32G 0% /dev /tmp 32G 0 32G 0% /run/initramfs/uswitch/tmp /dev/loop1 517M 517M 0 100% /run/initramfs/uswitch/data/hashes/8e6065a478c593473cd390245274128f1a5885e8 /dev/loop2 29M 29M 0 100% /run/initramfs/uswitch/data/hashes/244e2161887b001792709ec078f864c966baca88 /dev/loop3 36M 36M 0 100% /run/initramfs/uswitch/data/hashes/4cad203feb9c1bd4a903f03503a6777509e4031d /dev/loop4 10M 10M 0 100% /run/initramfs/uswitch/data/hashes/5f9454b8d26e33715373f621d16c9c752e3ff57b /dev/loop5 46M 46M 0 100% /run/initramfs/uswitch/data/hashes/182901abd18cefe6f63397bcbb6f2a8238d38a9b /dev/loop6 9.8M 9.8M 0 100% /run/initramfs/uswitch/data/hashes/c08bb2c69ae7ff2446bdcb32011a03a4a53c5585 /dev/loop7 58M 58M 0 100% /run/initramfs/uswitch/data/hashes/c92e70dc394c01bf5a2a9d06ffcc25ba673286d1 /dev/loop8 34M 34M 0 100% /run/initramfs/uswitch/data/hashes/90fdfeec1bab47c19641d636598a4205bbb7949d /dev/loop9 8.2M 8.2M 0 100% /run/initramfs/uswitch/data/hashes/3874cf9fea904b2d5d3f6920671864bdc05130a2 /dev/loop10 34M 34M 0 100% /run/initramfs/uswitch/data/hashes/35afa8ff63aded42bd23444b672dcd33b922898c /dev/loop11 7.0M 7.0M 0 100% /run/initramfs/uswitch/data/hashes/15684de48b2a621a98afaf9619026dd81cdf74bd /dev/loop12 4.5M 4.5M 0 100% /run/initramfs/uswitch/data/hashes/2d75968c5d882c86b38015fc93fe9e148e226407 /dev/loop13 148M 148M 0 100% /run/initramfs/uswitch/data/hashes/ccb0c8af3d4b26bddf9ccc047aa7e76d34e31387 uswitchd 7.0M 7.0M 0 100% /run/initramfs/uswitch/data/junos-evo-install-ptx-x86-64-21.2I20210315015050-EVO__cd-builder/uswitch unionfs 3.0G 186M 2.6G 7% / /dev/sda1 196M 19M 178M 10% /boot /dev/sda6 984M 1.5M 916M 1% /data/config /tmp 32G 68K 32G 1% /tmp tmpfs 32G 28M 32G 1% /run tmpfs 32G 123M 32G 1% /dev/shm tmpfs 32G 0 32G 0% /sys/fs/cgroup tmpfs 6.3G 0 6.3G 0% /run/user/0 re1: -------------------------------------------------------------------------- Filesystem Size Used Avail Capacity Mounted on /dev/root 34M 34M 0 100% /run/initramfs /dev/sda2 32G 10G 21G 34% /soft /dev/sda5 3.0G 321M 2.5G 12% /data /dev/sda7 145G 3.0G 135G 3% /var /dev/loop0 15G 38M 14G 1% /data/var/external devtmpfs 32G 0 32G 0% /dev [...output truncated...]
- 要保存系统软件信息,请使用
show version detail | save filename
和show system software list
作模式命令。该save filename
选项将信息保存在一个文件中,供您以后在升级系统后查看,以便与当前状态进行比较。- 发出
show version detail | save filename
命令。user@host> show version detail | save /var/tmp/swversion.old Wrote 3274 lines of output to '/var/tmp/swversion.old'
示例输出显示已保存文件的内容:主机名、设备型号、当前软件包名称、各种 Junos OS 演化版进程及其版本号。
Hostname: host-02-re0 Model: ptx10008 Junos: junos-evo-install-ptx-x86-64-20.4R1.17-EVO.iso Yocto: 2.2.1 Linux Kernel: 4.8.28-WR2.2.1_standard-g65c1491 JUNOS-EVO OS 64-bit [junos-evo-install-ptx-x86-64-20.4R1.17-EVO.iso] aapl_25x release 67 accountd release 20 accountd-app-config release 20 accountd-policy release 4 accounting_module release 95 accounting_module-evl release 95 action-scripts release 1 addrwatch_module release 34 addrwatch_module-evl release 34 aft-sysinfo-policy release 3 [...output truncated...]
- 发出
show system software list | save filename
命令。user@host> show system software list | save /var/tmp/swlist.old Wrote 39 lines of output to '/var/tmp/swlist.old'
示例输出显示已保存文件的内容:系统中路由引擎上持久性存储中的所有软件版本以及 FPC 上运行的当前软件版本。FPC 不能存储多个版本,因为 FPC 不包含任何持久性存储介质。
------------------------------- node: fpc0 ------------------------------- Active boot device is primary: /dev/ram1 List of installed version(s) : '-' running version '>' next boot version after upgrade/downgrade '<' rollback boot version - junos-evo-install-ptx-x86-64-20.4-202103151929.0-EVO - [2021-03-17 12:18:07] ------------------------------- node: re0 ------------------------------- Active boot device is primary: /dev/sda List of installed version(s) : '-' running version '>' next boot version after upgrade/downgrade '<' rollback boot version < junos-evo-install-ptx-x86-64-20.4-202103121629.0-EVO - [2021-03-17 11:22:40] - junos-evo-install-ptx-x86-64-20.4-202103151929.0-EVO - [2021-03-17 10:50:39] junos-evo-install-ptx-x86-64-20.4-202103131143.0-EVO - [2021-03-16 16:12:38] junos-evo-install-ptx-x86-64-20.4-202103141559.0-EVO - [2021-03-15 17:26:42] ------------------------------- node: re1 ------------------------------- Active boot device is primary: /dev/sda List of installed version(s) : '-' running version '>' next boot version after upgrade/downgrade '<' rollback boot version < junos-evo-install-ptx-x86-64-20.4-202103121629.0-EVO - [2021-03-17 11:25:03] - junos-evo-install-ptx-x86-64-20.4-202103151929.0-EVO - [2021-03-17 10:50:39] junos-evo-install-ptx-x86-64-20.4-202103131143.0-EVO - [2021-03-16 16:14:55] junos-evo-install-ptx-x86-64-20.4-202103141559.0-EVO - [2021-03-15 17:57:05]
- 发出
- 要保存设备上的活动配置(即最后一个提交的配置),请使用
show configuration | save filename
作模式命令。如果需要在安装软件包之前对配置进行更改,那么在捕获有关系统的任何其他信息之前,现在是执行此作的好时机。更改配置并提交后,将其副本保存在 /var/tmp 目录中。
user@host> show configuration | save /var/tmp/config.old Wrote 345 lines of output to '/var/tmp/config.old'
- 要保存有关系统报警的信息,请使用
show system alarms | save filename
作模式命令。user@host> show system alarms | save /var/tmp/alarms.old Wrote 14 lines of output to '/var/tmp/alarms.old'
示例输出显示已保存文件的内容:有关活动警报的信息。
Alarm time Class Description 2021-03-31 17:22:10 PDT Minor CB 0 Temp Sensor Fail 2021-04-01 10:51:01 PDT Minor FAN 1 Power Sensor Fail 2021-03-31 01:36:38 PDT Major PSM 0 Input1 Failed 2021-03-31 01:36:38 PDT Major PSM 0 Input2 Failed 2021-03-31 01:36:13 PDT Major PSM 1 Input2 Failed 2021-03-31 01:36:38 PDT Major PSM 2 Input1 Failed 2021-03-31 01:36:38 PDT Major PSM 2 Input2 Failed 2021-03-31 01:36:13 PDT Major PSM 3 Input2 Failed 2021-03-31 01:36:13 PDT Major PSM 4 Input2 Failed 2021-03-31 01:36:13 PDT Major PSM 5 Input2 Failed 2021-04-01 10:22:58 PDT Minor RE 0 Secure boot disabled or not enforced 2021-03-31 01:35:52 PDT Minor RE 1 Secure boot disabled or not enforced 2021-04-01 10:46:18 PDT Major chassis No Redundant Power
- 要保存有关系统中节点的信息,请使用
show system nodes | save filename
作模式命令。user@host> show system nodes | save /var/tmp/nodes.old Wrote 47 lines of output to '/var/tmp/nodes.old'
示例输出显示已保存文件的内容:有关系统中 FPC 和路由引擎的节点信息。
Node: fpc0 Node Id : 2201170739216 Node Nonce : 3051624042 Status : online, apps-ready Attributes : ASICS (Active), BT (Active), FABRIC_PFE (Active), FPC (Active), PIC (Active), TIMINGD_FPC (Active), MSVCSD (Active), SFLOWD (Active) Node: fpc1 Node Id : 2201170739217 Node Nonce : 524098764 Status : online, apps-ready Attributes : ASICS (Active), BT (Active), FABRIC_PFE (Active), FPC (Active), PIC (Active), TIMINGD_FPC (Active), MSVCSD (Active), SFLOWD (Active) [...output truncated...] Node: re0 Node Id : 2201170739204 Node Nonce : 1409607325 Status : online Attributes : FABRIC_CONTROL (Active), FABRIC_FCHIP_PARALLEL (Active), RE (Active), TIMINGD_RE (Active), MasterRE (Active), GlobalIPOwner (Active) Node: re1 Node Id : 2201170739205 Node Nonce : 4092367597 Status : online, apps-ready Attributes : FABRIC_CONTROL (Spare), FABRIC_FCHIP_PARALLEL (Spare), RE (Spare), TIMINGD_RE (Spare), BackupRE (Active)
- 要保存硬件组件信息,请使用
show chassis hardware | save filename
作模式命令。如果设备在升级后无法成功重新启动,因此无法访问路由引擎的序列号,则需要硬件信息。瞻博网络技术援助中心 (JTAC) 需要提供路由引擎序列号才能签发恢复生产授权 (RMA)。如果没有路由引擎序列号,JTAC 必须派遣现场技术人员来签发 RMA。
user@host> show chassis hardware | save /var/tmp/hwinventory.old Wrote 32 lines of output to '/var/tmp/hwinventory.old'
然后,您应该使用
scp
将此文件上传到异机位置。user@host> file copy scp:///var/tmp/hwinventory.old user@remotehost.com:filename
输出因设备的机箱组件而异。有关不同机箱组件的信息,请参阅硬件指南。示例输出显示已保存文件的内容:PTX10008路由器的硬件清单。
Hardware inventory: Item Version Part number Serial number Description Chassis AA100 JNP10008 [PTX10008] Midplane 0 REV 16 750-086802 AAAA1001 Midplane 8 FPM 0 REV 02 711-086964 AAAA2002 Front Panel Display PSM 0 Rev 03 740-069994 1B21B000001 JNP10K 5500W AC/HVDC Power Supply Unit PSM 1 Rev 03 740-069994 1B21B000002 JNP10K 5500W AC/HVDC Power Supply Unit PSM 2 Rev 03 740-069994 1B21B000003 JNP10K 5500W AC/HVDC Power Supply Unit Routing Engine 0 BUILTIN BUILTIN JNP10K-RE1-E Routing Engine 1 BUILTIN BUILTIN JNP10K-RE1-E CB 0 REV 06 750-101345 AAAA3001 Control Board CB 1 REV 06 750-101345 AAAA3002 Control Board FPC 0 REV 38 750-093524 BBBB0001 JNP10K-LC1201 CPU REV 10 750-087304 CCCC0001 JNP10K-LC1201 PMB Board PIC 0 BUILTIN BUILTIN JNP10K-36QDD-LC-PIC Xcvr 0 REV 01 740-061405 1AAQ00000AA QSFP-100GBASE-SR4-T2 Xcvr 1 REV 01 740-061405 1AAQ00001AA QSFP-100GBASE-SR4-T2 Xcvr 2 REV 01 740-058734 1AAQ00002AA QSFP-100GBASE-SR4 Xcvr 3 REV 01 740-061405 1AAQ00003AA QSFP-100GBASE-SR4-T2 Xcvr 4 REV 01 740-067443 QA0001AA QSFP+-40G-SR4 Xcvr 5 REV 01 740-054053 QA0002AA QSFP+-4X10G-SR MEZZ 0 REV 10 711-084968 DDDD0001 JNP10K-LC1201 MEZZ Board FPC 1 REV 38 750-093524 BBBB0002 JNP10K-LC1201 CPU REV 10 750-087304 CCCC0002 JNP10K-LC1201 PMB Board PIC 0 BUILTIN BUILTIN JNP10K-36QDD-LC-PIC MEZZ 0 REV 10 711-084968 DDDD0002 JNP10K-LC1201 MEZZ Board SIB 0 REV 30 750-083423 EEEE0001 SIB-JNP10008 SIB 1 REV 30 750-083423 EEEE0002 SIB-JNP10008 FTC 0 REV 18 750-083435 FFFF0001 Fan Controller 8 FTC 1 REV 18 750-083435 FFFF0002 Fan Controller 8 Fan Tray 0 REV 08 750-103312 FFFF1001 Fan tray 8 Fan Tray 1 REV 08 750-103312 FFFF1002 Fan tray 8
- 要保存机箱环境信息,请使用
show chassis environment | save filename
作模式命令。user@host> show chassis environment | save /var/tmp/hwenvironment.old Wrote 162 lines of output to '/var/tmp/hwenvironment.old'
示例输出显示已保存文件的内容:有关机箱的环境信息,包括各种机箱组件的温度和状态以及风扇速度。
Class Item Status Measurement Temp PSM 0 Ok 26 degrees C / 78 degrees F PSM 1 Ok 38 degrees C / 100 degrees F PSM 2 Ok 31 degrees C / 87 degrees F CB 0 Intake A Temp Sensor Ok 23 degrees C / 73 degrees F CB 0 Intake B Temp Sensor Ok 23 degrees C / 73 degrees F CB 0 Exhaust A Temp Sensor Ok 26 degrees C / 78 degrees F CB 0 Exhaust B Temp Sensor Ok 29 degrees C / 84 degrees F CB 0 Middle Temp Sensor Ok 28 degrees C / 82 degrees F CB 1 Intake A Temp Sensor Ok 23 degrees C / 73 degrees F CB 1 Intake B Temp Sensor Ok 23 degrees C / 73 degrees F CB 1 Exhaust A Temp Sensor Ok 26 degrees C / 78 degrees F CB 1 Exhaust B Temp Sensor Ok 29 degrees C / 84 degrees F CB 1 Middle Temp Sensor Ok 28 degrees C / 82 degrees F Fan Tray 0 Inlet Temp Sensor Ok 24 degrees C / 75 degrees F Fan Tray 0 Outlet Temp Sensor Ok 27 degrees C / 80 degrees F Fan Tray 1 Inlet Temp Sensor Ok 23 degrees C / 73 degrees F Fan Tray 1 Outlet Temp Sensor Ok 28 degrees C / 82 degrees F FPC 0 BT-0 HBM-0 Temperature Ok 54 degrees C / 129 degrees F FPC 0 BT-0 HBM-1 Temperature Ok 54 degrees C / 129 degrees F [...output truncated...] Fan Fan Tray 0 Fan 0 Ok 4650 RPM Fan Tray 0 Fan 1 Ok 5400 RPM Fan Tray 0 Fan 2 Ok 4500 RPM Fan Tray 0 Fan 3 Ok 5400 RPM Fan Tray 0 Fan 4 Ok 4500 RPM Fan Tray 0 Fan 5 Ok 5250 RPM Fan Tray 0 Fan 6 Ok 4500 RPM Fan Tray 0 Fan 7 Ok 5400 RPM Fan Tray 0 Fan 8 Ok 4650 RPM [...output truncated...]
- 要保存系统启动消息信息,请使用
show system boot-messages | save filename
作模式命令。user@host> show system boot-messages | save /var/tmp/bootmessages.old Wrote 7201 lines of output to '/var/tmp/bootmessages.old'
示例输出显示已保存文件的内容:系统内核在启动时为 FPC 和路由引擎生成的初始消息; /var/run/dmesg.boot 文件的内容。
------------------------------- node: fpc0 ------------------------------- [ 1.630132] pci 0000:ff:13.5: [8086:6fad] type 00 class 0x088000 [ 1.630204] pci 0000:ff:13.6: [8086:6fae] type 00 class 0x088000 [ 1.630274] pci 0000:ff:13.7: [8086:6faf] type 00 class 0x088000 [ 1.630352] pci 0000:ff:14.0: [8086:6fb0] type 00 class 0x088000 [ 1.630426] pci 0000:ff:14.1: [8086:6fb1] type 00 class 0x088000 [ 1.630499] pci 0000:ff:14.2: [8086:6fb2] type 00 class 0x088000 [ 1.630572] pci 0000:ff:14.3: [8086:6fb3] type 00 class 0x088000 [ 1.630644] pci 0000:ff:14.4: [8086:6fbc] type 00 class 0x088000 [ 1.630713] pci 0000:ff:14.5: [8086:6fbd] type 00 class 0x088000 [ 1.630781] pci 0000:ff:14.6: [8086:6fbe] type 00 class 0x088000 [ 1.630851] pci 0000:ff:14.7: [8086:6fbf] type 00 class 0x088000 [ 1.630921] pci 0000:ff:15.0: [8086:6fb4] type 00 class 0x088000 [ 1.630994] pci 0000:ff:15.1: [8086:6fb5] type 00 class 0x088000 [ 1.631067] pci 0000:ff:15.2: [8086:6fb6] type 00 class 0x088000 [ 1.631140] pci 0000:ff:15.3: [8086:6fb7] type 00 class 0x088000 [ 1.631225] pci 0000:ff:1e.0: [8086:6f98] type 00 class 0x088000 [ 1.631295] pci 0000:ff:1e.1: [8086:6f99] type 00 class 0x088000 [ 1.631371] pci 0000:ff:1e.2: [8086:6f9a] type 00 class 0x088000 [ 1.631441] pci 0000:ff:1e.3: [8086:6fc0] type 00 class 0x088000 [ 1.631495] pci 0000:ff:1e.4: [8086:6f9c] type 00 class 0x088000 [ 1.631566] pci 0000:ff:1f.0: [8086:6f88] type 00 class 0x088000 [ 1.631635] pci 0000:ff:1f.2: [8086:6f8a] type 00 class 0x088000 [ 1.632456] ACPI: Enabled 6 GPEs in block 00 to 3F [ 1.632624] vgaarb: loaded [ 1.632683] SCSI subsystem initialized [ 1.632737] libata version 3.00 loaded. [ 1.632765] ACPI: bus type USB registered [...output truncated...] ------------------------------- node: re0 ------------------------------- [ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256 [ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format. [ 0.000000] x86/fpu: Using 'eager' FPU context switches. [ 0.000000] e820: BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000007dfff] usable [ 0.000000] BIOS-e820: [mem 0x000000000007e000-0x000000000007ffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000080000-0x000000000009ffff] usable [ 0.000000] BIOS-e820: [mem 0x00000000000a0000-0x00000000000fffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000678defff] usable [ 0.000000] BIOS-e820: [mem 0x00000000678df000-0x0000000067bdefff] type 20 [ 0.000000] BIOS-e820: [mem 0x0000000067bdf000-0x000000006b69efff] reserved [ 0.000000] BIOS-e820: [mem 0x000000006b69f000-0x000000007b69efff] ACPI NVS [ 0.000000] BIOS-e820: [mem 0x000000007b69f000-0x000000007b7fefff] ACPI data [ 0.000000] BIOS-e820: [mem 0x000000007b7ff000-0x000000007b7fffff] usable [ 0.000000] BIOS-e820: [mem 0x000000007b800000-0x000000008fffffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000feb00000-0x00000000feb03fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed18000-0x00000000fed19fff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved [ 0.000000] BIOS-e820: [mem 0x00000000ff800000-0x00000000ffffffff] reserved [ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000107fffffff] usable [...output truncated...]
- 要保存有关设备上接口的信息,请使用
show interfaces terse | save filename
作模式命令。user@host> show interfaces terse | save /var/tmp/interfaces.old Wrote 176 lines of output to '/var/tmp/interfaces.old'
示例输出显示已保存文件的内容:有关设备上物理接口和逻辑接口的摘要信息。
Interface Admin Link Proto Local Remote et-0/0/0 up down et-0/0/0.16386 up down multiservice pfh-0/0/0 up up pfh-0/0/0.16383 up up inet et-0/0/1 up up et-0/0/1.0 up up inet 10.1.1.1/24 multiservice et-0/0/2 up down et-0/0/2.16386 up down multiservice et-0/0/3 up down et-0/0/3.0 up down inet 10.0.0.1/24 multiservice et-0/0/4 up down et-0/0/4.16386 up down multiservice [...output truncated...] et-1/0/0 up down et-1/0/0.16386 up down multiservice pfh-1/0/0 up up pfh-1/0/0.16383 up up inet et-1/0/1 up down et-1/0/1.16386 up down multiservice et-1/0/2 up down et-1/0/2.16386 up down multiservice [...output truncated...] re0:mgmt-0 up up re0:mgmt-0.0 up up inet 10.48.20.100/22 re1:mgmt-0 up up re1:mgmt-0.0 up up inet 10.48.20.115/22 dsc up up esi up up fti0 up up fti1 up up fti2 up up fti3 up up fti4 up up fti5 up up fti6 up up fti7 up up irb up up lo0 up up lo0.0 up up inet 10.255.9.9 --> 0/0 127.0.0.1 --> 0/0 127.0.0.64 --> 0/0 iso 47.0005.80ff.f800.0000.0108.0001.0102.5500.9009.00 inet6 2001:db8::10:255:9:9 --> 2001:db8::8603:28f0:db:6a6d--> lsi up up pip0 up up vtep up up
- 要保存协议信息,请使用
show
作模式命令和save filename
为设备配置的协议选项。要了解哪些类别的 show 命令可用,请在 CLI作模式提示符中键入show ?
,系统将使用可用类别列表进行响应。然后选择一个类别,例如bgp
.输入show bgp ?
将显示可用于该类别的 show 命令列表。user@host> show bgp ? Possible completions: bmp Show BGP Monitoring Protocol information group Show the BGP group database neighbor Show the BGP neighbor database output-scheduler Show BGP output queue scheduler configuration replication BGP NSR replication state between master and backup source-packet-routing Show BGP source-packet-routing summary Show overview of BGP information tunnel-attribute Show Tunnel attributes advertised/received
此示例显示用于保存有关边界网关协议 (BGP)、中间系统到中间系统 (IS-IS) 和开放最短路径优先 (OSPF) 协议的有用信息的命令。如果配置了其他协议,如地址解析协议 (ARP)、双向转发检测 (BFD)、链路层发现协议 (LLDP)、MPLS、资源预留协议 (RSVP) 或协议无关组播 (PIM),则还应保存这些协议的摘要信息。
user@host> show bgp summary | save /var/tmp/bgp.old Wrote 17 lines of output to '/var/tmp/bgp.old'
示例输出显示已保存文件的内容:有关 BGP 的摘要信息。
Threading mode: BGP I/O Default eBGP mode: advertise - accept, receive - accept Groups: 4 Peers: 4 Down peers: 0 Table Tot Paths Act Paths Suppressed History Damp State Pending inet.0 600000 600000 0 0 0 0 inet6.0 200000 200000 0 0 0 0 Peer AS InPkt OutPkt OutQ Flaps Last Up/Dwn State|#Active/Received/Accepted/Damped... 192.0.2.2 64496 933 1007 0 0 4:40:24 Establ inet.0: 300000/300000/300000/0 198.51.100.2 64497 933 1055 0 0 4:40:20 Establ inet.0: 300000/300000/300000/0 2001:db8::119:2 64498 963 1068 0 0 4:40:30 Establ inet6.0: 100000/100000/100000/0 2001:db8::120:2 64499 962 1083 0 0 4:40:26 Establ inet6.0: 100000/100000/100000/0
user@host> show isis adjacency brief | save /var/tmp/isis.old Wrote 383 lines of output to '/var/tmp/isis.old'
示例输出显示已保存文件的内容:有关 IS-IS 邻接的简要信息。
Interface System L State Hold (secs) SNPA ae0.1 host-101 1 Up 6 78:4f:9b:ff:19:83 ae0.1 host-101 2 Up 8 78:4f:9b:ff:19:83 ae0.10 host-101 1 Up 6 78:4f:9b:ff:19:83 ae0.10 host-101 2 Up 8 78:4f:9b:ff:19:83 ae0.100 host-101 1 Up 8 78:4f:9b:ff:19:83 ae0.100 host-101 2 Up 7 78:4f:9b:ff:19:83 ae0.11 host-101 1 Up 8 78:4f:9b:ff:19:83 ae0.11 host-101 2 Up 8 78:4f:9b:ff:19:83 ae0.12 host-101 1 Up 8 78:4f:9b:ff:19:83 ae0.12 host-101 2 Up 6 78:4f:9b:ff:19:83 [...output truncated...]
user@host> show ospf neighbor brief | save /var/tmp/ospf.old Wrote 428 lines of output to '/var/tmp/ospf.old'
示例输出显示已保存文件的内容:有关 OSPF 邻居的简要信息。
Address Interface State ID Pri Dead 10.1.1.2 ae0.1 Full 10.255.2.135 128 38 10.1.10.2 ae0.10 Full 10.255.2.135 128 37 10.1.100.2 ae0.100 Full 10.255.2.135 128 35 10.1.11.2 ae0.11 Full 10.255.2.135 128 39 10.1.12.2 ae0.12 Full 10.255.2.135 128 32 10.1.13.2 ae0.13 Full 10.255.2.135 128 35 10.1.14.2 ae0.14 Full 10.255.2.135 128 36 10.1.15.2 ae0.15 Full 10.255.2.135 128 37 10.1.16.2 ae0.16 Full 10.255.2.135 128 35 10.1.17.2 ae0.17 Full 10.255.2.135 128 36 10.1.18.2 ae0.18 Full 10.255.2.135 128 39 11.1.19.2 ae0.19 Full 10.255.2.135 128 34 [...output truncated...]
- 要检查您的软件、文件系统和配置是否有足够新的备份副本,请使用
show system snapshot | save filename
作模式命令。user@host> show system snapshot | save /var/tmp/snapshot.old Wrote 27 lines of output to '/var/tmp/snapshot.old'
示例输出显示已保存文件的内容:有关保存在系统上的快照的信息。
------------------------------- node: re0 ------------------------------- Current snapshot device: /dev/sdb Snapshot boot device: sdb List of installed version(s) in Snapshot boot device sdb: [1] < junos-evo-install-ptx-x86-64-20.4-202103151803.0-EVO - [2021-03-16 15:09:46] [2] junos-evo-install-ptx-x86-64-20.4-202103111254.0-EVO - [2021-03-16 15:10:32] [3] -> junos-evo-install-ptx-x86-64-20.4-202103150459.0-EVO - [2021-03-16 15:07:49] [4] junos-evo-install-ptx-x86-64-20.4-202103141559.0-EVO - [2021-03-16 15:11:52] '-' running version '>' next boot version after upgrade/downgrade '<' rollback boot version ------------------------------- node: re1 ------------------------------- Current snapshot device: /dev/sdb Snapshot boot device: sdb List of installed version(s) in Snapshot boot device sdb: [1] -> junos-evo-install-ptx-x86-64-20.4-202103051234.0-EVO - [2021-03-05 01:10:31] '-' running version '>' next boot version after upgrade/downgrade '<' rollback boot version
如果您的快照不是系统上当前运行的版本,或者是足够新的版本,无法具有系统的最新配置,建议您备份当前运行的软件、文件系统和配置。
request system snapshot
使用作模式命令,使用 快照备份和恢复软件 中的说明。