Dell EMC Networking S 系列:基本交换机管理配置 - SONIC 4.0

Summary: 如何配置 SONIC 4.0 基本交换机管理。

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

说明
提醒:这些步骤假定您的交换机是从出厂默认设置开始配置的。

设置管理接口网络连接的说明:  
  1. 打开 S 系列交换机的控制台或管理 IP。 
  2. 使用默认凭据登录到特权执行模式:admin\YourPaSsWoRd
Debian GNU/Linux 9 sonic ttyS0

sonic login: admin
Password:
Last login: Mon Jul 18 22:08:17 UTC 2022 on ttyS0
Linux sonic 4.9.0-11-2-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64
You are on
  ____   ___  _   _ _  ____
 / ___| / _ \| \ | (_)/ ___|
 \___ \| | | |  \| | | |
  ___) | |_| | |\  | | |___
 |____/ \___/|_| \_|_|\____|

-- Software for Open Networking in the Cloud --
  1. 使用以下命令启动 SONIC CLI:sonic-cli
admin@sonic:~$ sonic-cli
sonic#
  1. 要修改交换机配置,请运行 configure terminal 命令以编辑交换机配置,然后按 Enter 键。
sonic# configure terminal
sonic(config)#
  1. 显示管理接口的运行配置:  show running-configuration interface management 0
sonic# show running-configuration interface Management 0
!
interface Management 0
 description Management0
 mtu 1500
 autoneg on
 speed 1000
sonic#
  1. 要修改交换机配置,请运行 configure terminal 命令以编辑交换机配置,然后按 Enter 键。
sonic# configure terminal
sonic(config)#
  1. 要配置管理接口,请运行:Interface Management 0 命令
sonic(config)# interface Management 0
sonic(conf-if-eth0)#
  1. 使用以下命令在管理接口上配置静态 IP 地址和默认网关:IP address 1.1.1.2/24 gwaddr 1.1.1.1
sonic(conf-if-eth0)# ip address 1.1.1.2/24 gwaddr 1.1.1.1
sonic(conf-if-eth0)#
  1. 使用以下命令,退出配置模式并进入执行模式:end
sonic(conf-if-eth0)# end
sonic#
  1. 在执行模式下,验证管理接口配置是否正确:show running-configuration interface Management 0
sonic# show running-configuration interface Management 0
!
interface Management 0
 description Management0
 mtu 1500
 autoneg on
 speed 1000
 ip address 1.1.1.2/24 gwaddr 1.1.1.1
sonic#
  1. 使用以下命令将正在运行的配置保存到启动配置:write memory
sonic# write memory
sonic#
提醒:在将静态 IP 地址添加到管理接口 0 后,DHCP 会自动遭到禁用。如果您删除该静态 IP 地址,则 DHCP 会自动被重新启用。

设置管理员级别用户的说明:  
  1. 打开 S 系列交换机的控制台或管理 IP。 
  2. 使用默认凭据登录到特权执行模式:admin\YourPaSsWoRd
Debian GNU/Linux 9 sonic ttyS0

sonic login: admin
Password:
Last login: Mon Jul 18 22:08:17 UTC 2022 on ttyS0
Linux sonic 4.9.0-11-2-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64
You are on
  ____   ___  _   _ _  ____
 / ___| / _ \| \ | (_)/ ___|
 \___ \| | | |  \| | | |
  ___) | |_| | |\  | | |___
 |____/ \___/|_| \_|_|\____|

-- Software for Open Networking in the Cloud --
  1. 使用以下命令启动 SONIC CLI:sonic-cli
admin@sonic:~$ sonic-cli
sonic#
  1. 要修改交换机配置,请运行 configure terminal 命令以编辑交换机配置,然后按 Enter 键。
sonic# configure terminal
sonic(config)#
  1. 使用系统管理员权限配置用户名“test”和密码:username test password P@ssw0rd!123 role admin
sonic(config)# username test password P@ssw0rd!123 role admin
sonic(config)#
  1. 使用以下命令,退出配置模式并进入执行模式:end
sonic(config)# end
sonic#
  1. 使用以下命令验证用户配置:show running-configuration | grep test
sonic# show running-configuration | grep user
username test role admin
  1. 使用以下命令将正在运行的配置保存到启动配置:write memory
sonic# write memory
sonic#

有关进一步的帮助,请参阅 Dell Technologies 企业 SONiC 用户指南发行文档或联系 Dell Technologies 技术支持。

Affected Products

Enterprise SONiC Distribution
Article Properties
Article Number: 000201926
Article Type: How To
Last Modified: 24 May 2023
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.