Skip to main content
ONTAP MetroCluster
简体中文版经机器翻译而成,仅供参考。如与英语版出现任何冲突,应以英语版为准。

配置NVIDIA IP SN2100交换机

贡献者

您必须将NVIDIA SN2100 IP交换机配置为用作集群互连和后端MetroCluster IP连接。

【重置交换机】将NVIDIA IP SN2100交换机重置为出厂默认值

您可以从以下方法中选择将交换机重置为出厂默认设置。

【RCF文件选项】使用RCF文件选项重置交换机

在安装新的RCF配置之前、您必须还原NVIDIA交换机设置。

关于此任务

要将交换机还原为默认设置、请使用`restoreDefault`选项运行RCF文件。此选项会将备份的原始文件复制到其原始位置、然后重新启动交换机。重新启动后、交换机将与首次运行RCF文件配置交换机时的原始配置联机。

不会重置以下配置详细信息:

  • 用户和凭据配置

  • 配置管理网络端口eth0

备注 应用RCF文件期间发生的所有其他配置更改都将还原到原始配置。
开始之前
  • 您必须根据配置交换机 下载并安装NVIDIA RCF文件。如果您未以这种方式进行配置、或者在运行RCF文件之前配置了其他功能、则无法使用此操作步骤。

  • 您必须对 MetroCluster IP 配置中的每个 IP 交换机重复这些步骤。

  • 您必须使用串行控制台连接连接到交换机。

  • 此任务将重置管理网络的配置。

步骤
  1. 验证是否已使用相同或兼容的RCF文件版本成功应用RCF配置、以及备份文件是否存在。

    备注 输出可以显示备份文件、保留的文件或这两者。如果备份文件或保留的文件未显示在输出中、则无法使用此操作步骤。
    cumulus@IP_switch_A_1:mgmt:~$ sudo python3 MSN2100_v1.0_IP_switch_A_1.py
    [sudo] password for cumulus:
    >>> Opened RcfApplyLog
    A RCF configuration has been successfully applied.
      Backup files exist.
        Preserved files exist.
        Listing completion of the steps:
            Success: Step: 1: Performing Backup and Restore
            Success: Step: 2: updating MOTD file
            Success: Step: 3: Disabling apt-get
            Success: Step: 4: Disabling cdp
            Success: Step: 5: Adding lldp config
            Success: Step: 6: Creating interfaces
            Success: Step: 7: Configuring switch basic settings: Hostname, SNMP
            Success: Step: 8: Configuring switch basic settings: bandwidth allocation
            Success: Step: 9: Configuring switch basic settings: ecn
            Success: Step: 10: Configuring switch basic settings: cos and dscp remark
            Success: Step: 11: Configuring switch basic settings: generic egress cos mappings
            Success: Step: 12: Configuring switch basic settings: traffic classification
            Success: Step: 13: Configuring LAG load balancing policies
            Success: Step: 14: Configuring the VLAN bridge
            Success: Step: 15: Configuring local cluster ISL ports
            Success: Step: 16: Configuring MetroCluster ISL ports
            Success: Step: 17: Configuring ports for MetroCluster-1, local cluster and MetroCluster interfaces
            Success: Step: 18: Configuring ports for MetroCluster-2, local cluster and MetroCluster interfaces
            Success: Step: 19: Configuring ports for MetroCluster-3, local cluster and MetroCluster interfaces
            Success: Step: 20: Configuring L2FC for MetroCluster interfaces
            Success: Step: 21: Configuring the interface to UP
            Success: Step: 22: Final commit
            Success: Step: 23: Final reboot of the switch
        Exiting ...
    <<< Closing RcfApplyLog
    cumulus@IP_switch_A_1:mgmt:~$
  2. 运行RCF文件并选择还原默认值:restoreDefault

    cumulus@IP_switch_A_1:mgmt:~$ sudo python3 MSN2100_v1.0_IP_switch_A_2.py restoreDefaults
    [sudo] password for cumulus:
    >>> Opened RcfApplyLog
    Can restore from backup directory. Continuing.
    This will reboot the switch !!!
    Enter yes or no: yes
  3. 对提示回答"yes"。交换机将还原到原始配置并重新启动。

  4. 等待交换机重新启动。

    交换机将重置并保留初始配置、例如管理网络配置和当前凭据、因为它们在应用RCF文件之前已存在。重新启动后、您可以使用相同或不同版本的RCF文件来应用新配置。

["Cumulus-install-option]]使用"Cumulus安装选项重置交换机

关于此任务

如果要通过应用Cumulus映像完全重置交换机、请执行以下步骤。

开始之前
  • 您必须使用串行控制台连接连接到交换机。

  • 可通过HTTP访问Cumulus交换机软件映像。

    备注 有关安装Cumulus Linux的详细信息、请参见 "NVIDIA SN2100交换机安装和配置概述"
  • 您必须具有`sudo`命令访问权限的root密码。

步骤
  1. 从Cumulus控制台下载交换机软件安装并将其加入队列、命令`onie-install -a -i`后跟交换机软件的文件路径:

    在此示例中、将固件文件`cumulus-linux-4.4.2-mlx-amd64.bin`从HTTP服务器"50.050.50"复制到本地交换机。

    cumulus@IP_switch_A_1:mgmt:~$ sudo onie-install -a -i http://50.50.50.50/switchsoftware/cumulus-linux-4.4.2-mlx-amd64.bin
    Fetching installer: http://50.50.50.50/switchsoftware/cumulus-linux-4.4.2-mlx-amd64.bin
    Downloading URL: http://50.50.50.50/switchsoftware/cumulus-linux-4.4.2-mlx-amd64.bin
    ######################################################################### 100.0%
    Success: HTTP download complete.
    tar: ./sysroot.tar: time stamp 2021-01-30 17:00:58 is 53895092.604407122 s in the future
    tar: ./kernel: time stamp 2021-01-30 17:00:58 is 53895092.582826352 s in the future
    tar: ./initrd: time stamp 2021-01-30 17:00:58 is 53895092.509682557 s in the future
    tar: ./embedded-installer/bootloader/grub: time stamp 2020-12-10 15:25:16 is 49482950.509433937 s in the future
    tar: ./embedded-installer/bootloader/init: time stamp 2020-12-10 15:25:16 is 49482950.509336507 s in the future
    tar: ./embedded-installer/bootloader/uboot: time stamp 2020-12-10 15:25:16 is 49482950.509213637 s in the future
    tar: ./embedded-installer/bootloader: time stamp 2020-12-10 15:25:16 is 49482950.509153787 s in the future
    tar: ./embedded-installer/lib/init: time stamp 2020-12-10 15:25:16 is 49482950.509064547 s in the future
    tar: ./embedded-installer/lib/logging: time stamp 2020-12-10 15:25:16 is 49482950.508997777 s in the future
    tar: ./embedded-installer/lib/platform: time stamp 2020-12-10 15:25:16 is 49482950.508913317 s in the future
    tar: ./embedded-installer/lib/utility: time stamp 2020-12-10 15:25:16 is 49482950.508847367 s in the future
    tar: ./embedded-installer/lib/check-onie: time stamp 2020-12-10 15:25:16 is 49482950.508761477 s in the future
    tar: ./embedded-installer/lib: time stamp 2020-12-10 15:25:47 is 49482981.508710647 s in the future
    tar: ./embedded-installer/storage/blk: time stamp 2020-12-10 15:25:16 is 49482950.508631277 s in the future
    tar: ./embedded-installer/storage/gpt: time stamp 2020-12-10 15:25:16 is 49482950.508523097 s in the future
    tar: ./embedded-installer/storage/init: time stamp 2020-12-10 15:25:16 is 49482950.508437507 s in the future
    tar: ./embedded-installer/storage/mbr: time stamp 2020-12-10 15:25:16 is 49482950.508371177 s in the future
    tar: ./embedded-installer/storage/mtd: time stamp 2020-12-10 15:25:16 is 49482950.508293856 s in the future
    tar: ./embedded-installer/storage: time stamp 2020-12-10 15:25:16 is 49482950.508243666 s in the future
    tar: ./embedded-installer/platforms.db: time stamp 2020-12-10 15:25:16 is 49482950.508179456 s in the future
    tar: ./embedded-installer/install: time stamp 2020-12-10 15:25:47 is 49482981.508094606 s in the future
    tar: ./embedded-installer: time stamp 2020-12-10 15:25:47 is 49482981.508044066 s in the future
    tar: ./control: time stamp 2021-01-30 17:00:58 is 53895092.507984316 s in the future
    tar: .: time stamp 2021-01-30 17:00:58 is 53895092.507920196 s in the future
    Staging installer image...done.
    WARNING:
    WARNING: Activating staged installer requested.
    WARNING: This action will wipe out all system data.
    WARNING: Make sure to back up your data.
    WARNING:
    Are you sure (y/N)? y
    Activating staged installer...done.
    Reboot required to take effect.
    cumulus@IP_switch_A_1:mgmt:~$
  2. 下载并验证映像后、对提示符回答`y`以确认安装。

  3. 重新启动交换机以安装新软件:sUdo reboot

    cumulus@IP_switch_A_1:mgmt:~$ sudo reboot
    备注 交换机将重新启动并进入交换机软件安装、此过程需要一段时间。安装完成后、交换机将重新启动并保持在"log-in-"提示符处。
  4. 配置基本交换机设置

    1. 启动交换机并在登录提示符处登录并更改密码。

      备注 用户名为"cumulus"、默认密码为"cumulus"。
    Debian GNU/Linux 10 cumulus ttyS0
    
    cumulus login: cumulus
    Password:
    You are required to change your password immediately (administrator enforced)
    Changing password for cumulus.
    Current password:
    New password:
    Retype new password:
    Linux cumulus 4.19.0-cl-1-amd64 #1 SMP Cumulus 4.19.206-1+cl4.4.2u1 (2021-12-18) x86_64
    
    Welcome to NVIDIA Cumulus (R) Linux (R)
    
    For support and online technical documentation, visit
    http://www.cumulusnetworks.com/support
    
    The registered trademark Linux (R) is used pursuant to a sublicense from LMI,
    the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide
    basis.
    
    cumulus@cumulus:mgmt:~$
  5. 配置管理网络接口。

    备注 以下示例说明如何使用以下命令配置主机名(IP_switch_A_1)、IP地址(10.10.10.10)、网络掩码(255.255.255.0 (24)和网关(10.10.10.1):net add hostname <hostname>net add interface eth0 ip address <IPAddress/mask>`和`net add interface eth0 ip gateway <Gateway>
    cumulus@cumulus:mgmt:~$ net add hostname IP_switch_A_1
    cumulus@cumulus:mgmt:~$ net add interface eth0 ip address 10.0.10.10/24
    cumulus@cumulus:mgmt:~$ net add interface eth0 ip gateway 10.10.10.1
    cumulus@cumulus:mgmt:~$ net pending
    
    .
    .
    .
    
    
    cumulus@cumulus:mgmt:~$ net commit
    
    .
    .
    .
    
    
    net add/del commands since the last "net commit"
    
    
    User Timestamp Command
    
    cumulus 2021-05-17 22:21:57.437099 net add hostname Switch-A-1
    cumulus 2021-05-17 22:21:57.538639 net add interface eth0 ip address 10.10.10.10/24
    cumulus 2021-05-17 22:21:57.635729 net add interface eth0 ip gateway 10.10.10.1
    
    cumulus@cumulus:mgmt:~$
  6. 使用`sudo reboot`命令重新启动交换机。

    cumulus@cumulus:~$ sudo reboot

    交换机重新启动后、您可以使用中的步骤应用新配置 下载并安装NVIDIA RCF文件

【下载并安装】下载并安装NVIDIA RCF文件

您必须将交换机 RCF 文件下载并安装到 MetroCluster IP 配置中的每个交换机。

开始之前
  • 您必须具有`sudo`命令访问权限的root密码。

  • 此时将安装交换机软件并配置管理网络。

  • 您按照步骤使用方法1或方法2首次安装交换机。

  • 初始安装后、您未应用任何其他配置。

    备注 如果在重置交换机后以及应用RCF文件之前执行进一步配置、则无法使用此操作步骤。
关于此任务

您必须对MetroCluster IP配置(新安装)中的每个IP交换机或替代交换机(交换机更换)重复上述步骤。

步骤
  1. 为MetroCluster IP生成NVIDIA RCF文件。

    1. 下载 "适用于 MetroCluster IP 的 RcfFileGenerator"

    2. 使用适用于MetroCluster IP的RcfFileGenerator为您的配置生成RCF文件。

    3. 导航到主目录。如果您以"umulus"的形式记录、则文件路径为`/home/umulus`。

      cumulus@IP_switch_A_1:mgmt:~$ cd ~
      cumulus@IP_switch_A_1:mgmt:~$ pwd
      /home/cumulus
      cumulus@IP_switch_A_1:mgmt:~$
    4. 将RCF文件下载到此目录。以下示例显示您使用SCP将文件switch_2100_v1.0_ip switch_A_1.txt`从服务器"50.050.50"下载到主目录、并将其保存为`M 2100_v1.0_ip_switch_A_1.py M

      cumulus@Switch-A-1:mgmt:~$ scp username@50.50.50.50:/RcfFiles/MSN2100_v1.0_IP_switch_A_1.txt ./MSN2100_v1.0_IP_switch-A1.py
      The authenticity of host '50.50.50.50 (50.50.50.50)' can't be established.
      RSA key fingerprint is SHA256:B5gBtOmNZvdKiY+dPhh8=ZK9DaKG7g6sv+2gFlGVF8E.
      Are you sure you want to continue connecting (yes/no)? yes
      Warning: Permanently added '50.50.50.50' (RSA) to the list of known hosts.
      ***********************************************************************
      Banner of the SCP server
      ***********************************************************************
      username@50.50.50.50's password:
      MSN2100_v1.0-X2_IP_switch_A1.txt 100% 55KB 1.4MB/s 00:00
      cumulus@IP_switch_A_1:mgmt:~$
  2. 执行RCF文件。RCF文件需要一个选项来应用一个或多个步骤。除非技术支持指示、否则请在不使用命令行选项的情况下运行RCF文件。要验证RCF文件各个步骤的完成状态、请使用选项"-1"或"全部"应用所有(待定)步骤。

    cumulus@IP_switch_A_1:mgmt:~$ sudo python3 MSN2100_v1.0_IP_switch_A_1.py
    all
    [sudo] password for cumulus:
    The switch will be rebooted after the step(s) have been run.
    Enter yes or no: yes
    
    
    
    ... the steps will apply - this is generating a lot of output ...
    
    
    
    Running Step 24: Final reboot of the switch
    
    
    
    ... The switch will reboot if all steps applied successfully ...

禁用未使用的ISL端口和端口通道

NetApp建议禁用未使用的ISL端口和端口通道、以避免发出不必要的运行状况警报。

  1. 使用RCF文件横幅确定未使用的ISL端口和端口通道:

    备注 如果端口处于分支模式、则您在命令中指定的端口名称可能与RCIF横幅中指定的名称不同。您还可以使用RC框架 布线文件查找端口名称。

    net show interface

  2. 使用RCF文件禁用未使用的ISL端口和端口通道。

    cumulus@mcc1-integrity-a1:mgmt:~$ sudo python3 SN2100_v2.0_IP_Switch-A1.py runCmd
    [sudo] password for cumulus:
        Running cumulus version  : 5.4.0
        Running RCF file version : v2.0
    Help for runCmd:
        To run a command execute the RCF script as follows:
        sudo python3 <script> runCmd <option-1> <option-2> <option-x>
        Depending on the command more or less options are required. Example to 'up' port 'swp1'
            sudo python3 SN2100_v2.0_IP_Switch-A1.py runCmd swp1 up
        Available commands:
            UP / DOWN the switchport
                sudo python3 SN2100_v2.0_IP_Switch-A1.py runCmd <switchport> state <up | down>
            Set the switch port speed
                sudo python3 SN2100_v2.0_Switch-A1.py runCmd <switchport> speed <10 | 25 | 40 | 100 | AN>
            Set the fec mode on the switch port
                sudo python3 SN2100_v2.0_Switch-A1.py runCmd <switchport> fec <default | auto | rs | baser | off>
            Set the [localISL | remoteISL] to 'UP' or 'DOWN' state
                sudo python3 SN2100_v2.0_Switch-A1.py runCmd [localISL | remoteISL] state [up | down]
            Set the option on the port to support DAC cables. This option does not support port ranges.
                You must reload the switch after changing this option for the required ports. This will disrupt traffic.
                This setting requires Cumulus 5.4 or a later 5.x release.
                sudo python3 SN2100_v2.0_Switch-A1.py runCmd <switchport> DacOption [enable | disable]
    cumulus@mcc1-integrity-a1:mgmt:~$

    以下命令示例将禁用端口"swp14":

    sudo python3 SN2100_v2.0_Switch-A1.py runCmd swp14 state down

    对标识的每个未使用的端口或端口通道重复此步骤。