Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Раскрыть
titleNetwork configuration

Network configuration

We will configure the network according to the parameters specified in the technical specifications. In this example, we assume that the required operating system is already installed. 

It is recommended to separate traffic used for different purposes – for example, management traffic and VoIP traffic. To do this, create two or more VLANs. With a light load, you can get by with a single VLAN for simplicity, but this will cause inconvenience in the future when capturing and analyzing traffic dumps. In accordance with the technical specifications, the host’s IP addresses, gateways, DNS, and routing to other networks are configured on the VLANs.

In this example, according to the technical specifications, we will use the following addresses:

  • 10.0.10.51/24 — for management, vlan 10;
  • 10.0.20.51/24 — for VoIP.

Within the server platform, there is an addressing structure, and internal addresses are used for communication between subsystems (nodes) in the cluster. For example, the internal address for a cluster on a single server is 127.0.0.1, and the core (ecss-core) communicates with the multimedia data processing server (ecss-media-server). They communicate using the same address, but each software component has its own transport port: 5000 for ecss-core, 5040 for ecss-msr.

A single address is defined for all cluster nodes to access the database, for example, 127.0.0.1. This ensures consistency, whereby all cluster nodes have exactly the same data about the current state of the software switch’s dynamic components (for example, call history).

Preparing system's network interfaces

According to technical specifications, the system has 4 network interfaces. Information about their state can be looked up using the ifconfig or ip a command:

eth0: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether 36:10:28:73:63:01 txqueuelen 1000 (Ethernet)

eth1: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether 36:10:28:73:63:01 txqueuelen 1000 (Ethernet)

eth2: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether be:77:ea:52:4d:39 txqueuelen 1000 (Ethernet)

eth3: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether be:77:ea:52:4d:39 txqueuelen 1000 (Ethernet)

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0

First, configure the network interfaces. In Ubuntu 22, the netplan utility is used to configure them.

This utility makes it possible to configure the network settings and then load them into the system using the "networkd" or "NetworkManager" network manager.

Блок кода
languagebash
sudo nano /etc/netplan/ecss_netplan.yaml


Примечание

All other files in this directory must be moved to another location or deleted.

In the configurations for each host, we first define the ethernets section, which describes the Ethernet interfaces present in the system that will be used later. For each interface, you must disable dynamic address assignment (DHCP). 

Next, configure the VLANs, where you can optionally specify gateways for communication with the outside world and DNS server addresses, as well as the IP addresses for each interface.

Предупреждение
titleIMPORTANT

Please note that when editing netplan, it is necessary to follow YAML indentation rules:

  • There must be at least two spaces before each line (except for network);
  • Each subsection is additionally separated by 2 spaces:

→  Section                                                                   |network

→  Subsection                                                             |_'_'bonds:

→  Subsection describing the "bonds" section           |_'_'_'_'bonded_one:

→  etc.                                                                         |_'_'_'_'...

  • There is no space before the ":" character, and one space after it;
  • Before the "-" character, there are as many spaces as if a new subsection were starting, and one space after it.

Example of configuring the ecss_netplan.yaml file for the “active-backup” option

Без форматирования
# Netplan for the ecss1 host of the software switch
# Please note that there must be at least two spaces in every line and section (except for the network section).

network:
  version: 2 # netplan version
  renderer: networkd # netplan configuration renderer
  ethernets: # Section describing Ethernet interfaces
    enp0s3: # Name of the virtual machine’s interface to the Internet
        dhcp4: no # Disable dynamic IP address assignment on interfaces
        dhcp6: no
        addresses: [192.168.56.51/24]
    enp0s8: # Name of the interface for SSW
        dhcp4: no # Disable dynamic IP address assignment on interfaces
        dhcp6: no
  vlans:
    net.10: # Management interface
        id: 10
        link: enp0s3
        addresses: [10.0.10.51/24]
    net.20: # VoIP interface
        id: 20
        link: enp0s8
        addresses: [10.0.20.51/24]

The following bonds settings are required for the ECSS server to ensure that configuration works correctly:

mode: active-backup – specifies the operating mode in which one of the links is selected as active, while the others remain in standby;
primary-reselect-policy: failure specifies that a new active link should be selected only when the current active link enters a failure state. This helps avoid unnecessary switchover;
gratuitous-arp: 5 при смене активного линка в сторону коммутатора отправляются пять запросов gratuitous ARP, чтобы обновить на нём таблицу коммутации. Способствует более быстрому переключению when the active link changes, five gratuitous ARP requests are sent to the switch to update its forwarding table. This facilitates faster switching;
all-slaves-active: true заставляет принимать входящие кадры на backup интерфейсах. Таким образом балансировка трафика на MESе не мешает работе. Данные в сторону сервера идут со всех линков, а сервер отправляет данные только с active линка forces the system to accept incoming frames on backup interfaces. Thus, traffic balancing on the MES does not interfere with operations. Data is sent to the server over all links, while the server sends data only over the active link;
mii-monitor-interval: 100 активирует мониторинг линков через интерфейс MII и указывает интервал опроса в 100мс enables link monitoring via the MII interface and sets the polling interval to 100 ms;
up-delay: 1000 указывает считать поднявшийся интерфейс доступным для работы не сразу, а сделать задержку в одну секунду после того, как интерфейс поднялся. Необходимо для того, чтобы избежать лишних переключений в случае, когда порт «прыгает» несколько раз из состояния «включено» в состояние «выключено» и обратно specifies that an interface that is up should not be considered available immediately, but rather after a one-second delay following the interface’s activation. This is necessary to avoid unnecessary switching in cases where the port “flips” several times between the “on” and “off” states.

Предупреждение
languagebash

Также рекомендуется проверить отсутствие в каталоге It is also recommended to check that there are no other files in the /etc/netplan/ еще каких либо файлов, если  другие файлы присутствуют , то их нужно переместить в другой каталог или удалить, в противном случае возможна некорректная настройка сетевых интерфейсов и некорректная работа SSW.  directory; if any other files are present, they must be moved to a different directory or deleted, otherwise network interfaces may be configured incorrectly and SSW may not function properly.

Apply the configured settings using the following commandПрименим установленные параметры командой:

Блок кода
languagebash
sudo netplan apply

На серверах системы необходимо настроить параметр "hostname".

На всех серверах системы желательно указать одинаковое имя пользователя (любое, кроме ssw). Лицензия ECSS-10 привязывается к ключу eToken/ruToken и к имени компьютера (hostname), поэтому необходимо использовать стандартные значения. Системный пользователь ssw создается при инсталляции пакета ecss-user.

Подсказка

Если используется один сервер, рекомендуемое значение hostname — ecss1;
Другие имена хостов возможны только при согласовании проекта, это потребуется для генерации лицензий. 

On the system’s servers, you must configure the “hostname” parameter.

It is recommended to use the same username (any name except ssw) on all system servers. The ECSS-10 license is tied to the eToken/ruToken key and the computer name (hostname), so you must use the standard values. The ssw system user is created during installation of the ecss-user package.

Подсказка

If a single server is used, the recommended hostname value is ecss1;
Other hostnames are possible only upon project approval; this is required for license generation.

Specify the hostname as ecss1 in the /etc/hostname fileУказать имя хоста: ecss1 в файле /etc/hostname:

Блок кода
sudo nano /etc/hostname 

Указать  реальный Ipadd и имя хоста используемое в настоящий момент (для примера Specify the actual IP address and the hostname currently in use (for example, 10.0.10.51 ecss1) в файле in the /etc/hosts file:

Блок кода
127.0.0.1   localhost # АдресLocal локальнойloopback петлиaddress, used используетсяby некоторымиsome сервисамиECSS ecssservices
10.0.10.51  ecss1 # АдресHost хостаaddress

"

...

Optimization" of the operating system

Set the OS settings to performance mode

Use the cpufrequtils utility

...

Выставить параметры ОС в режим производительности

Используем  утилиту cpufrequtils.

Блок кода
languagebash
sudo apt install cpufrequtils

по умолчанию после установки Ubuntu используется режим "ondemand" - "по запросу" (производительность CPU по запросу приложений, экономит электроэнергию, но снижает производительностьBy default, after installing Ubuntu, the “ondemand” mode is used (CPU performance is adjusted based on application requests, which saves power but reduces performance):

Блок кода
cat /etc/init.d/cpufrequtils | grep GOVERNOR=

в выходном сообщении системы режим работы по умолчанию после установки - "ondemand" The system output shows that the default mode after installation is “ondemand”:

Без форматирования
GOVERNOR="ondemand"

Установить режим результативности/производительности  -  в файле To set the performance mode, in the /etc/init.d/cpufrequtils значение "ondemand" заменить на "performance" file, replace ondemand with performance

Блок кода
languagebash
sudo sed -i 's/GOVERNOR="ondemand"/GOVERNOR="performance"/g' /etc/init.d/cpufrequtils

Перезапустить утилитуRestart the utility:

Блок кода
languagebash
sudo /etc/init.d/cpufrequtils restart 

Затем выполнить командуThen run the following command:

Блок кода
languagebash
sudo systemctl daemon-reload

...


Disable SWAP

The Ubuntu сервер SSW работает в реальном масштабе времени , поэтому все необходимые данные должны находится в оперативной памяти, использование  файла подкачки (swap-файл - SSW server operates in real time, so all necessary data must be stored in RAM; using a swap file (/swap.img) может привести к увеличению времени обработки вызовов приложения can increase the processing time for SSW ECSS10 , что недопустимо. Swap - отключаем. 
Выполнить последовательно три команды:application calls, which is unacceptable. Disable swap.
Execute the following three commands one by one:

Disable Отключение Swap:

Блок кода
languagebash
sudo swapoff -a

Удалить файл swapDelete the swap.img file.

Блок кода
languagebash
sudo rm /swap.img

Закомментировать строку - Comment out the line — /swap.img none swap sw 0 0 -   в файле — in the /etc/fstab - выполнив команду "file by running the sudo nano /etc/fstab" command

or change it to # привести её к виду # /swap.img none swap sw 0 0

либо удалить эту строчку or delete this string (/swap.img none swap sw 0 0)

Блок кода
languagebash
sudo nano /etc/fstab

Для проверки выполните команду  To verify, run the free -h command:

Блок кода
languagebash
free -h

...

Без форматирования
languagebash
free -h
              total        used        free      shared  buff/cache   available
Mem:           3,9G        110M        3,2G        820K        535M        3,5G
Swap:            0B          0B          0B

Установка часового пояса

Setting the timezone

During the installation of Ubuntu 22, you are not prompted to set a time zone (the default is UTC). You must set it manually (to ensure the billing system, scheduled tasks, etc., function correctly), for exampleПри инсталляции Ubuntu-22 не предлагается установить часовой пояс (по умолчанию — UTC). Его нужно установить вручную (для корректной работы системы тарификации, работ по расписанию и т. д.), например:

Блок кода
languagebash
sudo timedatectl set-timezone Asia/Novosibirsk

Улучшение работы высоконагруженных серверов

Улучшить работу высоконагруженных серверов можно увеличив лимит открытых файлов.

Для установки лимита открытых файлов необходимо:

Improving the performance of high-load servers

You can improve the performance of high-load servers by increasing the open file limit.

To set the open file limit, do the following:

Check the current limit using the commandПроверить текущий лимит командой:

Блок кода
ulimit -a

результат The output:

Без форматирования
eltex@ecss1:~$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 15515
max locked memory       (kbytes, -l) 65536
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 15515
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Данного лимита This limit (open files  1024 ) недостаточно для нормальной работы высоконагруженных серверов.files 1024) is not enough for normal operation of high-load servers.

Set the open file limit for each userУстановить лимит открытых файлов для каждого пользователя:

Блок кода
sudo sed -i  '55i\*                soft    nproc           65536\n*                hard    nproc           131072\n*                soft    nofile          65536\n*                hard    nofile          131072\nroot             -       memlock         unlimited' /etc/security/limits.conf
Раскрыть
titleРезультатResult:

# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#        - NOTE: group and wildcard limits are not applied to root.
#          To apply a limit to the root user, <domain> must be
#          the literal username root.
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#        - chroot - change root to directory (Debian-specific)
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#root            hard    core            100000
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#ftp             -       chroot          /ftp
#@student        -       maxlogins       4
*                soft    nproc           65536
*                hard    nproc           131072
*                soft    nofile          65536
*                hard    nofile          131072
root             -       memlock         unlimited

# End of file


Предупреждение
titleВАЖНО
Установку пакетов требуется делать НЕ из-под пользователя ssw.

Обновление программного обеспечения операционной системы

IMPORTANT

Packages must NOT be installed as the ssw user.

Updating operating system software

  1. To install the ECSS-10 system, you must add the Eltex repository:Для установки системы ECSS-10 необходимо добавить репозиторий ELTEX:
    Блок кода
    languagebash
    titleна новом on a new ssw
    sudo sh -c "echo 'deb [arch=amd64] http://archive.eltex.org/ssw/jammy/3.18 stable main extras external' > /etc/apt/sources.list.d/eltex-ecss10-stable.list"

    Далее необходимо выполнить импорт ключа командойNext, import the key using the following command::

    Блок кода
    languagebash
    titleна новом on a new ssw
    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 33CB2B750F8BB6A5

    Перед началом установки необходимо обновить ОСBefore the installation, update the OS:

    Блок кода
    languagebash
    titleна новом on a new ssw
    sudo apt update
    Примечание

    Если вы видите такое сообщение системыIf you see the following system message::

    Без форматирования
    W: http://archive.eltex.org/ssw/jammy/3.18/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

    Выполните следующую командуRun the following command:

    Блок кода
    titleна новом on a new ssw
    sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d


    Блок кода
    languagebash
    titleна новом on a new ssw
    sudo apt upgrade

...



Installing and configuring the software

Предупреждение
titleустановка пакетов installing deb packets
версияECSS ПОsoftware ECSSversion. It Сейчасis вcurrently заявкеlisted наas сертификацию3 онаin заявленаthe какcertification 3application.. 
  | Мы её менять не будем до следующей сертификации или
  │ выпуска принципиально новой версии системы We will not change it until the next certification or
  │ the release of a fundamentally new version of the system.
  │
  │     ┌ версия System Release version. The common Общаяversion версияfor дляall всехcomponents компонентincluded входящихin вa конкретныйspecific релизrelease. 
  |     | We Меняемchange еёit централизовано,centrally когдаwhen
   │     │ we принимаемdecide решениеto оrelease выпускеa новогоnew релизаversion. Releases Релизыare typically междуnot собойcompatible обычноwith неone совместимыanother.
┌─┴┐ ┌──┴─┐
ECSS.SysRel.SubMaj.SubMin
            └──┬─┘ └──┬─┘
               │      └ версия Subsystem minor. Минорную версию подсистемы устанавливает разработчик подсистемы version. The subsystem minor version is set by the subsystem developer. 
     |        Минорную версию
 |                 │        меняем при добавлении патча. Как правило, минорные версии в рамках одной мажорной версии 
               │        совместимы между собой и отличаются в рамках конкретных патчей.
               │ The minor version
               │        is updated when a patch is added. As a rule, minor versions within a single major version 
               │        are compatible with each other and differ only within specific patches.
               │версия Subsystem major version. МажорнаяThe версияmajor устанавливаетсяversion разработчикомis подсистемы.set by the subsystem developer. 
                 The subsystem’s major version Мажорнуюmust версиюbe подсистемыchanged необходимоwhen менятьsignificant приchanges внесенииare вmade подсистемуto существенныхthe измененийsubsystem.


Утилита установки пакетов APT анализирует версию пакета слева направо, для примера мы имеем пакет The APT package installation utility analyzes the package version from left to right; for example, if we have package 14.14.7.7 , 
в репозитории находятся пакеты 7  
and the repository contains the following packages
14.14.7.8
14.14.7.9
14.14.8.1
14.14.20 -14.14.28
то при выполнении команды sudo apt install имя пакета → будет автоматически проверен и установлен пакет 14then when you run the command `sudo apt install package_name`, the package 14.14.28 , так как он самый последний, анализ будет выполнен по 3-й позиции  (major), анализ по 4-й (minor) выполнен не будет (аналогичным образом будет выполнятся команда sudo apt upgrade).will be automatically checked and installed, since it is the latest version, the analysis will be performed based on the 3rd position (major), and the analysis based on the 4th position (minor) will not be performed (the sudo apt upgrade command will be performed in the same way).

If, in a specific situation, you need to upgrade from version 14В случае если для конкретной ситуации требуется перейти с версии 14.14.7.7 на версию 14to version 14.14.7.9, стандартная команда the standard command sudo apt upgrade , нам не поможет, так как будет выбран самый новый пакет, в данной ситуации нам необходимо в явном виде указать какую версию пакета мы хотим установить, в данном примере мы должны выбрать команду → sudo apt install имя пакета won’t work, since it will select the newest package. In this situation, we need to explicitly specify which version of the package we want to install; in this example, we should use the command → sudo apt install package_name=14.14.7.9. Обычно это необходимо для тестирования определенного патча, для стандартных обновлений достаточно выбора привычной команды установки /обновления пакетаThis is usually necessary for testing a specific patch; for standard updates, simply using the usual command to install or update the package is sufficient.


Якорь
Доп_пакеты
Доп_пакеты
Устанавливаем все предложенные пакетыInstall all the offered packages:

Блок кода
languagebash
sudo apt install ntp ntpdate tcpdump vlan dnsmasq aptitude atop ethtool htop iotop mc minicom mtr-tiny nmap pptpd pv screen ssh tftpd vim sngrep tshark cpanminus gnuplot libgraph-easy-perl debconf-utils wget rsync ncdu
Раскрыть
languagebash
titleПакеты ПО которые рекомендуется установить для работыSoftware packages recommended for installation

List of required service softwareСписок обязательного сервисного программного обеспечения:

Блок кода
languagebash
sudo apt install ntp tcpdump vlan dnsmasq


ntpNTP -серверserver
tcpdumpсниффер пакетовpacket sniffer
vlanуправление VLAN management
dnsmasqлегковесный lightweight DNS/DHCP -серверserver

List of recommended diagnostic and utility softwareСписок рекомендуемого диагностического и вспомогательного программного обеспечения:

Блок кода
languagebash
sudo apt install aptitude atop ethtool htop mc screen ssh tftpd sngrep tshark gnuplot libgraph-easy-perl debconf-utils iotop ncdu


aptitudeустановка программ из репозиториев, рекомендуется использовать вместо программы installs software from repositories; recommended as an alternative to apt/apt-get
atopмониторинг загрузки хоста с функцией периодического сохранения информации в файлы
ethtoolпросмотр статистики сетевых интерфейсов
htopмониторинг процессов
mcфайловый менеджер
screenмультиплексор терминалов
sshсервер и клиент SSH
tftpdTFTP-сервер
sngrepтрассировка sip
tsharkконсольный аналог wireshark
monitors host load with the ability to periodically save data to files
ethtooldisplays network interface statistics
htopprocess monitor
mcfile manager
screenterminal multiplexer
sshSSH server and client
tftpdTFTP server
sngrepSIP packet tracer
tsharkconsole-based equivalent of Wireshark
gnuplotplots statistical graphsgnuplotвывод графиков статистики
libgraph-easy-perlPerl -модуль для преобразования или рендеринга графиков (в module for converting or rendering graphs (to ASCII, HTML, SVG или через , or via Graphviz)
debconf-utilsнабор утилит для работы с базой debconf
iotopинструмент для мониторинга использования ввода-вывода (IO) на диске в реальном времени в Linux
ncduутилита для поиска больших директорий в системе Linux
Примечание

Данное программное обеспечение не требуется для работы системы ECSS-10, однако может упростить сервисное обслуживание системы и её отдельных компонентов со стороны инженеров эксплуатации и техподдержки.

a set of utilities for working with the debconf database
iotopa tool for monitoring disk I/O usage in real time on Linux
ncdua utility for searching large directories on a Linux system


Примечание

This software is not required for the ECSS-10 system to operate, but it can simplify maintenance of the system and its individual components by operations and technical support engineers.


Примечание

Before installing the ecss packages, you must ensure that the SPD bandwidth meets the necessary requirements.
To do this, run the sudo ethtool <interface name> command for all physical interfaces

Примечание

Перед началом установки пакетов ecss , нужно убедиться в соответствии полосы пропускания СПД необходимым требованиям.
Для этого выполнить команду  sudo ethtool  <имя интерфейса> для всех физических интерфейсов.

Раскрыть
titleПримерExample:

sudo ethtool net.20
Settings for net.20:
    Supported ports: [ TP ]
    Supported link modes:   10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  10baseT/Half 10baseT/Full
                            100baseT/Half 100baseT/Full
                            1000baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 1000Mb/s
    Duplex: Full
    Auto-negotiation: on
    Port: Twisted Pair
    PHYAD: 0
    Transceiver: internal
    MDI-X: off (auto)
    Link detected: yes

Проверить значение  следующих параметровCheck the values of the following parameters:
Advertised auto-negotiation: Yes
Speed: 1000Mb/ (не менееs (at least)
Duplex: Full

...


Configuring the ecss-dns-env

...

package

Execute the following commandВыполнить следующую команду:

Блок кода
sudo apt install -y ecss-dns-env

...