Dell Networking SONiC:将 SCP 协议与 WINSCP 等软件结合使用来升级或降级 SONiC

Summary: 本文介绍如何在 WINSCP 应用程序中使用 SCP 协议升级或降级 Dell Networking SONiC。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

提醒:您可以使用支持 SCP 协议的任何应用程序将固件文件上传到交换机。在本文中,我们将使用 WINSCP 应用程序来演示该过程。
 

步骤:

  1. 确保交换机中有足够的空间来复制 SONiC 文件。使用命令:
df /home -h
输出示例
admin@sonic:~$ df /home -h
Filesystem      Size  Used Avail Use% Mounted on
root-overlay     29G  5.0G   23G  18% /
  1. 使用 WINSCP 登录交换机。使用 SCP 作为文件协议。 
登录交换机
  1. 将文件复制到交换机中,并记下文件路径。在下面,文件路径为 /home/admin。 
文件路径 /home/admin 页面的屏幕截图

下面是成功复制文件后的示例屏幕截图。Enterprise_SONiC_OS_4.0.5_Edge_Standard.bin SONiC 升级文件的文件名称
 
SONiC 升级文件名的屏幕截图


使用 SSH 和任何终端应用程序(如 PuTTY)登录交换机。

 
提醒:确保在发出映像安装命令之前使用 write memory 命令保存配置,并且我们有配置的备份。

下面是我们正在使用的命令列表:
 
命令 说明
admin@sonic:~$ sonic-cli
 登录 Dell SONiC           
sonic# dir home:/
检查 SONiC 版本文件是否已正确复制到主目录。 
sonic# write memory 
保存配置
sonic# image install file://<File path>/<Install File.bin>     
 安装文件。确保使用完整文件路径。例如,/home/admin/
sonic# show image status
检查映像安装进度。
sonic# show image list
显示图像列表
sonic# reboot
重新启动交换机
sonic# show version 
显示 Sonic 版本

可选命令:
命令 说明
sonic# image set-default <Image file> 
如果未选择相应的 SONiC 映像作为下一步,请手动配置它。
sonic# image remove <all/image file>
删除旧固件以节省空间。


输出示例:

  1. 登录到 Dell SONiC。使用命令: 
sonic-cli

admin@sonic:~$ sonic-cli 
sonic#
  1. 使用以下命令检查文件是否已正确复制: 
dir home:/

sonic# dir home:/ 
-------------------------------------------------------------------------
Date(Last Modified)      Size(Bytes)    Type      Filename                        
-------------------------------------------------------------------------
2023-02-23 19:22         1032101870     -         Enterprise_SONiC_OS_4.0.5_Edge_Standard.bin
  1. 保存配置。使用命令:  
write memory

sonic# write memory 
  1.  安装 Dell SONiC。我们必须使用完整的文件路径,例如 /home/admin/File-name.bin。使用命令映像安装文件:
//<File path>/<Install File.bin>   

sonic# image install file://home/admin/Enterprise_SONiC_OS_4.0.5_Edge_Standard.bin
%Info: Check 'show image status' for image install progress.
  1. 使用以下命令检查映像安装进度: 
show image status

sonic# show image status 
-----------------------------------------------------------
Global operation status  : GLOBAL_STATE_SUCCESS
-----------------------------------------------------------
File operation status    : TRANSFER_VALIDATION
File size(bytes)         : 0
File transfer bytes      : 0
File download speed      : 0 KB/s
File progress            : 100%
Transfer start time      : 2022-09-30 17:42:22+0000
Transfer end time        : 2022-09-30 17:42:22+0000
-----------------------------------------------------------
Install operation status : INSTALL_STATE_SUCCESS
Install start time       : N/A
Install end time         : N/A
sonic# 
  1. 使用以下命令验证是否将新版本选为下一个启动文件: 
show image list

sonic# show image list 
Current: SONiC-OS-4.0.3-Campus
Next: SONiC-OS-4.0.5-Campus
Available: 
SONiC-OS-4.0.5-Campus
SONiC-OS-4.0.3-Campus
(可选)如果未选择相应的 SONiC 映像作为下一步,请手动配置它。通常不需要这样做。
sonic# image set-default SONiC-OS-4.0.5-Campus
  1. 重新启动
sonic# 
sonic# reboot 
reboot in process .....
Waiting for the reboot operation to complete
  1. 重新启动后,验证 SONiC 是否已升级(为简洁起见对输出进行了调整):
admin@sonic:~$ sonic-cli
sonic# show version 
 
Software Version  : 4.0.5-Campus
Product           : Enterprise SONiC Distribution by Dell Technologies
  1. 升级后,确保从主页中删除 SONiC 文件(通常会自行删除):
sonic# dir home:/ 
-------------------------------------------------------------------------
Date(Last Modified)      Size(Bytes)    Type      Filename                        
-------------------------------------------------------------------------
sonic# 
 (可选)如果未删除 Dell SONiC 文件,请使用以下命令删除: 
delete home://<filename>

sonic# delete home://Enterprise_SONiC_OS_4.0.5_Edge_Standard.bin
Proceed to delete home://Enterprise_SONiC_OS_4.0.5_Edge_Standard.bin? [y/N]:y

sonic# dir home:/
-------------------------------------------------------------------------
Date(Last Modified)      Size(Bytes)    Type      Filename                        
-------------------------------------------------------------------------    

Affected Products

Enterprise SONiC Distribution, PowerSwitch E3200-ON Series, Dell EMC Networking N3200-ON, PowerSwitch S5212F-ON, PowerSwitch S5224F-ON, PowerSwitch S5232F-ON, PowerSwitch S5248F-ON, PowerSwitch S5296F-ON, PowerSwitch Z9100-ON, PowerSwitch Z9264F-ON
Article Properties
Article Number: 000212674
Article Type: How To
Last Modified: 11 Apr 2024
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.