Подключаемся по putty com1 порту
вводим начальные логины и пароли cumulus = cumulus
и меняем пароль на свой
Настраиваем Ethernet Management
cumulus@switch:~$ nv set interface eth0 ip address 10.100.4.66/24
cumulus@switch:~$ nv set interface eth0 ip gateway 10.100.4.1
cumulus@switch:~$ nv config apply
Настраиваем имя коммутатора
cumulus@switch:~$ nv set system hostname ru-dtc-melsw02
cumulus@switch:~$ nv config apply
Настраиваем временную зону
cumulus@switch:~$ nv set system timezone Europe/Moscow
cumulus@switch:~$ nv config apply
Проверяем какие порты есть и их имя и статус портов
nv show interface
Test Cable Connectivity (включаем все порты чтобы проверить что соединения проводные работают)
cumulus@switch:~$ nv set interface swp1-19
cumulus@switch:~$ nv config apply
Нажимаем Y и сохраняем конфигурацию
cumulus@switch:~$ nv config save
Сверяем часы и при необходимости правим время
cumulus@switch:~$ date
Mon 21 Nov 2022 06:30:37 PM UTC
cumulus@switch:~$ sudo date -s "Tue Jun 27 10:37:13 2024"
Инструкция дублирована с доп.командами на личной WIKI https://wiki.kalyuzhnyy.ru/books/mellanox-metrosan-switch/page/nacalnaia-nastroika-kommutatora-mellanox-2100-cumulus-os-51
Дополнительные команды для настройки портов
Configure Layer 2 Ports
Cumulus Linux does not put all ports into a bridge by default. To create a bridge and configure one or more front panel ports as members of the bridge:
NVUE Commands
The following configuration example places the front panel port swp1 into the default bridge called br_default.
cumulus@switch:~$ nv set interface swp1 bridge domain br_default
cumulus@switch:~$ nv config apply
You can add a range of ports in one command. For example, to add swp1 through swp3, swp10, and swp14 through swp20 to the bridge:
cumulus@switch:~$ nv set interface swp1-3,swp6,swp14-20 bridge domain br_default
cumulus@switch:~$ nv config apply
Ethernet Bridging - VLANs.
Configure Layer 3 Ports
You can configure a front panel port or bridge interface as a layer 3 port.
NVUE Commands
The following configuration example configures the front panel port swp1 as a layer 3 access port:
cumulus@switch:~$ nv set interface swp1 ip address 10.0.0.0/31
cumulus@switch:~$ nv config apply
To add an IP address to a bridge interface, you must put it into a VLAN interface. If you want to use a VLAN other than the native one, set the bridge PVID:
cumulus@switch:~$ nv set interface swp1-2 bridge domain br_default
cumulus@switch:~$ nv set bridge domain br_default vlan 10
cumulus@switch:~$ nv set interface vlan10 ip address 10.1.10.2/24
cumulus@switch:~$ nv set bridge domain br_default untagged 1
cumulus@switch:~$ nv config apply
Linux Commands
Configure a Loopback Interface
NVUE Commands
cumulus@switch:~$ nv set interface lo ip address 10.10.10.1/32
cumulus@switch:~$ nv config apply
nv show system
nv show interface
cumulus@cumulus:mgmt:~$ nv set interface swp1s3 link auto-negotiate off
cumulus@cumulus:mgmt:~$ nv set interface swp1s3 link speed 10G
cumulus@cumulus:mgmt:~$ nv show interface swp1s3
Create a new user and add this user to the sudo group. This user only becomes effective
after the console/SSH session is restarted.
sudo adduser --ingroup netedit admin
ssh-keygen
ssh-copy-id -i /home/cumulus/.ssh/id_rsa.pub cumulus@leaf02
scp .ssh/id_rsa.pub cumulus@leaf02:.ssh/authorized_keys
ssh cumulus@leaf02
cumulus@switch:~$ nv set system ssh-server permit-root-login enabled
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system ssh-server permit-root-login prohibit-password
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system ssh-server permit-root-login forced-commands-only
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system ssh-server allow-users user1
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv set system ssh-server deny-users user4
cumulus@switch:~$ nv config apply
The following example configures SSH to listen only on the management VRF:
cumulus@switch:~$ nv set system ssh-server vrf mgmt
cumulus@switch:~$ nv config apply
The following example configures SSH to listen on the management VRF and VRF RED:
cumulus@switch:~$ nv set system ssh-server vrf mgmt
cumulus@switch:~$ nv set system ssh-server vrf RED
cumulus@switch:~$ nv config apply
Enable and Disable the SSH Server
Cumulus Linux enables the SSH server by default. To disable the SSH server:
NVUE Commands
cumulus@switch:~$ nv set system ssh-server state disabled
cumulus@switch:~$ nv config apply
Run the
nv set system ssh-server state enabled
command to renable the SSH server.
To disable SSH strict mode, run the nv set system ssh-server strict disabled command:
cumulus@switch:~$ nv set system ssh-server strict disabled
cumulus@switch:~$ nv config apply
cumulus@switch:~$ nv show system ssh-server
Configure Timeouts and Sessions
NVUE Commands
cumulus@switch:~$ nv set system ssh-server authentication-retries 10
cumulus@switch:~$ nv set system ssh-server login-timeout 200
cumulus@switch:~$ nv config apply
Linux Commands
The following example configures the TCP port that listens for incoming SSH sessions to 443:
NVUE Commands
cumulus@switch:~$ nv set system ssh-server port 443
cumulus@switch:~$ nv config apply
Linux Commands
The following example configures the amount of time a session can be inactive before the SSH server terminates the connection to 5 minutes (300 seconds) and the maximum number of SSH sessions allowed per TCP connection to 5:
NVUE Commands
cumulus@switch:~$ nv set system ssh-server inactive-timeout 5
cumulus@switch:~$ nv set system ssh-server max-sessions-per-connection 5
cumulus@switch:~$ nv config apply
Linux Commands
The following example configures:
The number of unauthenticated SSH sessions allowed before throttling starts to 5.
The starting percentage of connections to reject above the throttle start count before reaching the session count limit to 22.
The maximum number of unauthenticated SSH sessions allowed to 20.
NVUE Commands
cumulus@switch:~$ nv set system ssh-server max-unauthenticated throttle-start 5
cumulus@switch:~$ nv set system ssh-server max-unauthenticated throttle-percent 22
cumulus@switch:~$ nv set system ssh-server max-unauthenticated session-count 20
cumulus@switch:~$ nv config apply
Linux Commands
Generate and Install an SSH Key Pair
This section describes how to generate an SSH key pair on one system and install the key as an authorized key on another system.