以 Cumulus 模式安裝 Cumulus Linux
當交換器運作在 Cumulus 模式下時,請依照下列步驟安裝 Cumulus Linux (CL) 作業系統。
|
|
Cumulus Linux (CL) 作業系統可以在交換器運行 Cumulus Linux 或 ONIE 時安裝(參見"以 ONIE 模式安裝")。 |
確保以下各項可用:
-
具備中級Linux知識。
-
熟悉基本的文字編輯、UNIX 檔案權限和進程監控。預先安裝了多種文字編輯器,包括
vi`和 `nano。 -
能夠存取 Linux 或 UNIX shell。如果您使用的是 Windows 系統,請使用 Linux 環境作為與 Cumulus Linux 互動的命令列工具。
-
對於NVIDIA SN2100 交換器控制台訪問,序列控制台交換器的波特率要求必須設定為 115200,具體如下:
-
115200 波特
-
8 位元數據
-
1 停止位
-
奇偶性:無
-
流量控制:無
-
請注意以下事項:
|
|
每次安裝 Cumulus Linux 時,整個檔案系統結構都會被擦除並重建。 |
|
|
Cumulus 使用者帳戶的預設密碼是 cumulus。首次登入 Cumulus Linux 時,必須變更此預設密碼。安裝新鏡像之前,請務必更新所有自動化腳本。 Cumulus Linux 提供命令列選項,可在安裝過程中自動變更預設密碼。 |
-
登入交換器。
首次登入交換器需要使用者名稱/密碼為 cumulus/cumulus。 `sudo`特權。
cumulus login: cumulus Password: cumulus You are required to change your password immediately (administrator enforced) Changing password for cumulus. Current password: cumulus New password: <new_password> Retype new password: <new_password>
-
檢查 Cumulus Linux 版本:
net show systemcumulus@cumulus:mgmt:~$ net show system Hostname......... cumulus Build............ Cumulus Linux 4.4.3 Uptime........... 0:08:20.860000 Model............ Mlnx X86 CPU.............. x86_64 Intel Atom C2558 2.40GHz Memory........... 8GB Disk............. 14.7GB ASIC............. Mellanox Spectrum MT52132 Ports............ 16 x 100G-QSFP28 Part Number...... MSN2100-CB2FC Serial Number.... MT2105T05177 Platform Name.... x86_64-mlnx_x86-r0 Product Name..... MSN2100 ONIE Version..... 2019.11-5.2.0020-115200 Base MAC Address. 04:3F:72:43:92:80 Manufacturer..... Mellanox
-
設定主機名稱、IP位址、子網路遮罩和預設閘道。新的主機名稱只有在重新啟動控制台/SSH會話後才會生效。
Cumulus Linux 交換器至少提供一個專用的乙太網路管理端口,稱為 eth0。此接口專門用於帶外管理。預設情況下,管理介面使用 DHCPv4 進行位址分配。主機名稱中不要使用底線(_)、撇號(')或非 ASCII 字元。 cumulus@cumulus:mgmt:~$ net add hostname sw1 cumulus@cumulus:mgmt:~$ net add interface eth0 ip address 10.233.204.71 cumulus@cumulus:mgmt:~$ net add interface eth0 ip gateway 10.233.204.1 cumulus@cumulus:mgmt:~$ net pending cumulus@cumulus:mgmt:~$ net commit
此命令會同時修改以下兩項: `/etc/hostname`和 `/etc/hosts`文件。
-
請確認主機名稱、IP 位址、子網路遮罩和預設閘道已更新。
cumulus@sw1:mgmt:~$ hostname sw1 cumulus@sw1:mgmt:~$ ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.233.204.71 netmask 255.255.254.0 broadcast 10.233.205.255 inet6 fe80::bace:f6ff:fe19:1df6 prefixlen 64 scopeid 0x20<link> ether b8:ce:f6:19:1d:f6 txqueuelen 1000 (Ethernet) RX packets 75364 bytes 23013528 (21.9 MiB) RX errors 0 dropped 7 overruns 0 frame 0 TX packets 4053 bytes 827280 (807.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xdfc00000-dfc1ffff cumulus@sw1::mgmt:~$ ip route show vrf mgmt default via 10.233.204.1 dev eth0 unreachable default metric 4278198272 10.233.204.0/23 dev eth0 proto kernel scope link src 10.233.204.71 127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
-
在交換器上設定日期、時間、時區和 NTP 伺服器。
-
請確認目前時區:
cumulus@sw1:~$ cat /etc/timezone
-
更新至新的時區:
cumulus@sw1:~$ sudo dpkg-reconfigure --frontend noninteractive tzdata
-
請確認您目前的時區:
cumulus@switch:~$ date +%Z
-
若要使用引導式精靈設定時區,請執行下列命令:
cumulus@sw1:~$ sudo dpkg-reconfigure tzdata
-
依配置的時區設定軟體時鐘:
cumulus@switch:~$ sudo date -s "Tue Oct 28 00:37:13 2023"
-
將軟體時鐘的目前值設定為硬體時鐘的值:
cumulus@switch:~$ sudo hwclock -w
-
如有需要,請新增 NTP 伺服器:
cumulus@sw1:~$ net add time ntp server <cumulus.network.ntp.org> iburst cumulus@sw1:~$ net pending cumulus@sw1:~$ net commit
-
確認 `ntpd`正在系統上運作:
cumulus@sw1:~$ ps -ef | grep ntp ntp 4074 1 0 Jun20 ? 00:00:33 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 101:102
-
指定NTP來源介面。預設情況下,NTP 使用的來源介面是
eth0。您可以如下設定不同的 NTP 來源介面:cumulus@sw1:~$ net add time ntp source <src_int> cumulus@sw1:~$ net pending cumulus@sw1:~$ net commit
-
-
安裝 Cumulus Linux 4.4.3:
cumulus@sw1:mgmt:~$ sudo onie-install -a -i http://<web-server>/<path>/cumulus-linux-4.4.3-mlx-amd64.bin
安裝程式開始下載。出現提示時,請輸入 y。
-
重啟NVIDIA SN2100交換器:
cumulus@sw1:mgmt:~$ sudo reboot
-
安裝會自動開始,並出現以下 GRUB 畫面選項。請勿進行任何選擇。
-
Cumulus-Linux GNU/Linux
-
ONIE:安裝作業系統
-
積雲安裝
-
Cumulus-Linux GNU/Linux
-
-
重複步驟 1 至 4 登入。
-
請確認 Cumulus Linux 版本為 4.4.3:
net show versioncumulus@sw1:mgmt:~$ net show version NCLU_VERSION=1.0-cl4.4.3u0 DISTRIB_ID="Cumulus Linux" DISTRIB_RELEASE=4.4.3 DISTRIB_DESCRIPTION="Cumulus Linux 4.4.3"
-
建立一個新用戶並將該用戶加入到 `sudo`團體。該使用者僅在控制台/SSH會話重新啟動後生效。
sudo adduser --ingroup netedit admincumulus@sw1:mgmt:~$ sudo adduser --ingroup netedit admin [sudo] password for cumulus: Adding user 'admin' ... Adding new user 'admin' (1001) with group `netedit' ... Creating home directory '/home/admin' ... Copying files from '/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for admin Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y cumulus@sw1:mgmt:~$ sudo adduser admin sudo [sudo] password for cumulus: Adding user `admin' to group `sudo' ... Adding user admin to group sudo Done. cumulus@sw1:mgmt:~$ exit logout Connection to 10.233.204.71 closed. [admin@cycrh6svl01 ~]$ ssh admin@10.233.204.71 admin@10.233.204.71's password: Linux sw1 4.19.0-cl-1-amd64 #1 SMP Cumulus 4.19.206-1+cl4.4.1u1 (2021-09-09) 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. admin@sw1:mgmt:~$
-
登入交換器。
首次登入交換器需要使用者名稱/密碼為 cumulus/cumulus。 `sudo`特權。
cumulus login: cumulus Password: cumulus You are required to change your password immediately (administrator enforced) Changing password for cumulus. Current password: cumulus New password: <new_password> Retype new password: <new_password>
-
檢查 Cumulus Linux 版本:
nv show systemcumulus@cumulus:mgmt:~$ nv show system operational applied description ------------------- -------------------- --------------------- hostname cumulus cumulus build Cumulus Linux 5.3.0 system build version uptime 6 days, 8:37:36 system uptime timezone Etc/UTC system time zone
-
設定主機名稱、IP位址、子網路遮罩和預設閘道。新的主機名稱只有在重新啟動控制台/SSH會話後才會生效。
Cumulus Linux 交換器至少提供一個專用的乙太網路管理端口,稱為 eth0。此接口專門用於帶外管理。預設情況下,管理介面使用 DHCPv4 進行位址分配。主機名稱中不要使用底線(_)、撇號(')或非 ASCII 字元。 cumulus@cumulus:mgmt:~$ nv set system hostname sw1 cumulus@cumulus:mgmt:~$ nv set interface eth0 ip address 10.233.204.71/24 cumulus@cumulus:mgmt:~$ nv set interface eth0 ip gateway 10.233.204.1 cumulus@cumulus:mgmt:~$ nv config apply cumulus@cumulus:mgmt:~$ nv config save
此命令會同時修改以下兩項: `/etc/hostname`和 `/etc/hosts`文件。
-
請確認主機名稱、IP 位址、子網路遮罩和預設閘道已更新。
cumulus@sw1:mgmt:~$ hostname sw1 cumulus@sw1:mgmt:~$ ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.233.204.71 netmask 255.255.254.0 broadcast 10.233.205.255 inet6 fe80::bace:f6ff:fe19:1df6 prefixlen 64 scopeid 0x20<link> ether b8:ce:f6:19:1d:f6 txqueuelen 1000 (Ethernet) RX packets 75364 bytes 23013528 (21.9 MiB) RX errors 0 dropped 7 overruns 0 frame 0 TX packets 4053 bytes 827280 (807.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xdfc00000-dfc1ffff cumulus@sw1::mgmt:~$ ip route show vrf mgmt default via 10.233.204.1 dev eth0 unreachable default metric 4278198272 10.233.204.0/23 dev eth0 proto kernel scope link src 10.233.204.71 127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
-
在交換器上設定時區、日期、時間和 NTP 伺服器。
-
設定時區:
cumulus@sw1:~$ nv set system timezone US/Eastern cumulus@sw1:~$ nv config apply
-
請確認您目前的時區:
cumulus@switch:~$ date +%Z
-
若要使用引導式精靈設定時區,請執行下列命令:
cumulus@sw1:~$ sudo dpkg-reconfigure tzdata
-
依配置的時區設定軟體時鐘:
cumulus@sw1:~$ sudo date -s "Tue Oct 28 00:37:13 2023"
-
將軟體時鐘的目前值設定為硬體時鐘的值:
cumulus@sw1:~$ sudo hwclock -w
-
如有需要,請新增 NTP 伺服器:
cumulus@sw1:~$ nv set service ntp mgmt listen eth0 cumulus@sw1:~$ nv set service ntp mgmt server <server> iburst on cumulus@sw1:~$ nv config apply cumulus@sw1:~$ nv config save
請參閱知識庫文章"NTP 伺服器設定與NVIDIA SN2100 交換器不相容。"更多詳情請見下文。
-
確認 `ntpd`正在系統上運作:
cumulus@sw1:~$ ps -ef | grep ntp ntp 4074 1 0 Jun20 ? 00:00:33 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 101:102
-
指定NTP來源介面。預設情況下,NTP 使用的來源介面是
eth0。您可以如下設定不同的 NTP 來源介面:cumulus@sw1:~$ nv set service ntp default listen <src_int> cumulus@sw1:~$ nv config apply
-
-
安裝 Cumulus Linux 5.4.0:
cumulus@sw1:mgmt:~$ sudo onie-install -a -i http://<web-server>/<path>/cumulus-linux-5.4-mlx-amd64.bin
安裝程式開始下載。出現提示時,請輸入 y。
-
重啟NVIDIA SN2100交換器:
cumulus@sw1:mgmt:~$ sudo reboot
-
安裝會自動開始,並出現以下 GRUB 畫面選項。請勿進行任何選擇。
-
Cumulus-Linux GNU/Linux
-
ONIE:安裝作業系統
-
積雲安裝
-
Cumulus-Linux GNU/Linux
-
-
重複步驟 1 至 4 登入。
-
請確認 Cumulus Linux 版本為 5.4.0:
nv show systemcumulus@cumulus:mgmt:~$ nv show system operational applied description ------------------- -------------------- --------------------- hostname cumulus cumulus build Cumulus Linux 5.4.0 system build version uptime 6 days, 13:37:36 system uptime timezone Etc/UTC system time zone
-
確認每個節點都與每個交換器有連接:
cumulus@sw1:mgmt:~$ net show lldp LocalPort Speed Mode RemoteHost RemotePort --------- ----- ---------- ---------------------------------- ----------- eth0 100M Mgmt mgmt-sw1 Eth110/1/29 swp2s1 25G Trunk/L2 node1 e0a swp15 100G BondMember sw2 swp15 swp16 100G BondMember sw2 swp16
-
建立一個新用戶並將該用戶加入到 `sudo`團體。該使用者僅在控制台/SSH會話重新啟動後生效。
sudo adduser --ingroup netedit admincumulus@sw1:mgmt:~$ sudo adduser --ingroup netedit admin [sudo] password for cumulus: Adding user 'admin' ... Adding new user 'admin' (1001) with group `netedit' ... Creating home directory '/home/admin' ... Copying files from '/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for admin Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y cumulus@sw1:mgmt:~$ sudo adduser admin sudo [sudo] password for cumulus: Adding user `admin' to group `sudo' ... Adding user admin to group sudo Done. cumulus@sw1:mgmt:~$ exit logout Connection to 10.233.204.71 closed. [admin@cycrh6svl01 ~]$ ssh admin@10.233.204.71 admin@10.233.204.71's password: Linux sw1 4.19.0-cl-1-amd64 #1 SMP Cumulus 4.19.206-1+cl4.4.1u1 (2021-09-09) 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. admin@sw1:mgmt:~$
-
新增其他使用者群組以供管理員使用者訪問 `nv`命令:
cumulus@sw1:mgmt:~$ sudo adduser admin nvshow [sudo] password for cumulus: Adding user 'admin' to group 'nvshow' ... Adding user admin to group nvshow Done.看 "NVIDIA使用者帳戶"了解更多。
-
登入交換器。
首次登入交換器時,需要輸入使用者名稱/密碼 cumulus/cumulus。 `sudo`特權。
cumulus login: cumulus Password: cumulus You are required to change your password immediately (administrator enforced) Changing password for cumulus. Current password: cumulus New password: <new_password> Retype new password: <new_password>
-
檢查 Cumulus Linux 版本:
nv show systemcumulus@cumulus:mgmt:~$ nv show system operational applied description ------------------- -------------------- --------------------- hostname cumulus cumulus build Cumulus Linux 5.4.0 system build version uptime 6 days, 8:37:36 system uptime timezone Etc/UTC system time zone
-
設定主機名稱、IP位址、子網路遮罩和預設閘道。新的主機名稱只有在重新啟動控制台/SSH會話後才會生效。
Cumulus Linux 交換器至少提供一個專用的乙太網路管理端口,稱為 eth0。此接口專門用於帶外管理。預設情況下,管理介面使用 DHCPv4 進行位址分配。主機名稱中不要使用底線(_)、撇號(')或非 ASCII 字元。 cumulus@cumulus:mgmt:~$ nv unset interface eth0 ip address dhcp cumulus@cumulus:mgmt:~$ nv set interface eth0 ip address 10.233.204.71/24 cumulus@cumulus:mgmt:~$ nv set interface eth0 ip gateway 10.233.204.1 cumulus@cumulus:mgmt:~$ nv config apply cumulus@cumulus:mgmt:~$ nv config save
此命令會同時修改以下兩項: `/etc/hostname`和 `/etc/hosts`文件。
-
請確認主機名稱、IP 位址、子網路遮罩和預設閘道已更新。
cumulus@sw1:mgmt:~$ hostname sw1 cumulus@sw1:mgmt:~$ ifconfig eth0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.233.204.71 netmask 255.255.254.0 broadcast 10.233.205.255 inet6 fe80::bace:f6ff:fe19:1df6 prefixlen 64 scopeid 0x20<link> ether b8:ce:f6:19:1d:f6 txqueuelen 1000 (Ethernet) RX packets 75364 bytes 23013528 (21.9 MiB) RX errors 0 dropped 7 overruns 0 frame 0 TX packets 4053 bytes 827280 (807.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 device memory 0xdfc00000-dfc1ffff cumulus@sw1::mgmt:~$ ip route show vrf mgmt default via 10.233.204.1 dev eth0 unreachable default metric 4278198272 10.233.204.0/23 dev eth0 proto kernel scope link src 10.233.204.71 127.0.0.0/8 dev mgmt proto kernel scope link src 127.0.0.1
-
在交換器上設定時區、日期、時間和 NTP 伺服器。
-
設定時區:
cumulus@sw1:~$ nv set system timezone US/Eastern cumulus@sw1:~$ nv config apply
-
請確認您目前的時區:
cumulus@switch:~$ date +%Z
-
若要使用引導式精靈設定時區,請執行下列命令:
cumulus@sw1:~$ sudo dpkg-reconfigure tzdata
-
依配置的時區設定軟體時鐘:
cumulus@sw1:~$ sudo date -s "Tue Oct 28 00:37:13 2023"
-
將軟體時鐘的目前值設定為硬體時鐘的值:
cumulus@sw1:~$ sudo hwclock -w
-
如有需要,請新增 NTP 伺服器:
cumulus@sw1:~$ nv set service ntp mgmt listen eth0 cumulus@sw1:~$ nv set service ntp mgmt server <server> iburst on cumulus@sw1:~$ nv config apply cumulus@sw1:~$ nv config save
請參閱知識庫文章"NTP 伺服器設定與NVIDIA SN2100 交換器不相容。"更多詳情請見下文。
-
確認 `ntpd`正在系統上運作:
cumulus@sw1:~$ ps -ef | grep ntp ntp 4074 1 0 Jun20 ? 00:00:33 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 101:102
-
指定NTP來源介面。預設情況下,NTP 使用的來源介面是
eth0。您可以如下設定不同的 NTP 來源介面:cumulus@sw1:~$ nv set service ntp default listen <src_int> cumulus@sw1:~$ nv config apply
-
-
安裝 Cumulus Linux 5.11.0:
cumulus@sw1:mgmt:~$ sudo onie-install -a -i http://<web-server>/<path>/cumulus-linux-5.11.0-mlx-amd64.bin
安裝程式開始下載。出現提示時,請輸入 y。
-
重啟NVIDIA SN2100交換器:
cumulus@sw1:mgmt:~$ sudo reboot
-
安裝會自動開始,並出現以下 GRUB 畫面選項。請勿進行任何選擇。
-
Cumulus-Linux GNU/Linux
-
ONIE:安裝作業系統
-
積雲安裝
-
Cumulus-Linux GNU/Linux
-
-
重複步驟 1 至 4 登入。
-
請確認 Cumulus Linux 版本為 5.11.0:
nv show systemcumulus@cumulus:mgmt:~$ nv show system operational applied description ------------------- ---------------------- --------------------- build Cumulus Linux 5.11.0 uptime 153 days, 2:44:16 hostname cumulus cumulus product-name Cumulus Linux product-release 5.11.0 platform x86_64-mlnx_x86-r0 system-memory 2.76 GB used / 2.28 GB free / 7.47 GB total swap-memory 0 Bytes used / 0 Bytes free / 0 Bytes total health-status not OK date-time 2025-04-23 09:55:24 status N/A timezone Etc/UTC maintenance mode disabled ports enabled version kernel 6.1.0-cl-1-amd64 build-date Thu Nov 14 13:06:38 UTC 2024 image 5.11.0 onie 2019.11-5.2.0020-115200
-
確認每個節點都與每個交換器有連接:
cumulus@sw1:mgmt:~$ nv show interface lldp LocalPort Speed Mode RemoteHost RemotePort --------- ----- ---------- ---------------------------------- ----------- eth0 100M eth mgmt-sw1 Eth110/1/14 swp2s1 25G Trunk/L2 node1 e0a swp1s1 10G swp sw2 e0a swp9 100G swp sw3 e4a swp10 100G swp sw4 e4a swp15 100G swp sw5 swp15 swp16 100G swp sw6 swp16
看 "NVIDIA使用者帳戶"了解更多。
在 Cumulus 模式下安裝 Cumulus Linux 後,您可以…"安裝或升級 RCF 腳本" 。