/cluster/adapter/<PA_SIP>/sip/network/ — команды настройки ip-set
В данном разделе представлены команды настройки ip-set.
<CLUSTER> — имя кластера PA SIP.
clean
Команда установки параметров ip-set в значение по умолчанию.
Путь команды:
/cluster/adapter/<CLUSTER>/sip/network/clean
Синтаксис:
clean ip_set <SOME_IP_SET> [--force]
Параметры:
<SOME_IP_SET> — имя ip-set.
force — параметр запускает команду без подтверждения (только в конце строки)
Пример:
admin@mycelium1@ecss1:/$ cluster/adapter/sip1/sip/network/clean ip_set ipset2 [clean] All sockets in ipset2 set will be cleaned continue: yes/no ?> y You should enter 'yes' or 'no' continue: yes/no ?> yes Property "ip_set" values successfully updated [exec at: 11.02.2021 15:35:07, exec time: 11s 725ms, nodes: sip1@ecss1 v.3.14.7.566]
info
Команда просмотра параметров ip-set.
Путь команды:
/cluster/adapter/<CLUSTER>/sip/network/info
Синтаксис:
info [<SOME_IP_SET>]
Параметры:
<SOME_IP_SET> — имя ip-set, опциональный параметр.
Пример:
admin@mycelium1@ecss1:/$ cluster/adapter/sip1/sip/network/info ip_set ┌────────┬──────────────────────────────────────────────────────────────────────────────┐ │Property│ Value │ ├────────┼──────────────────────────────────────────────────────────────────────────────┤ │ip_set │ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075│ │ │ipset1: sip1@ecss1 192.168.2.61 │ │ │ipset1: sip1@ecss2 192.168.2.62 │ │ │ipset1: dscp 24 │ │ │ipset2: 5091, 5092 │ │ │ipset2: sip1@ecss1 192.168.2.21 │ │ │ipset2: sip1@ecss2 192.168.2.22 │ │ │ipset2: dscp 46 │ └────────┴──────────────────────────────────────────────────────────────────────────────┘ [exec at: 11.02.2021 14:49:30, exec time: 6ms, nodes: sip1@ecss1 v.3.14.7.566]
modify
Команда замены существующих значений ip-set.
Путь команды:
/cluster/adapter/<CLUSTER>/sip/network/modify
Синтаксис:
mofify OLD_VALUE NEW_VALUE [--force]
Параметры:
<OLD_VALUE> — старое значение.
<NEW_VALUE> — новое значение.
-- force— ключ позволяет использовать имя несуществующей ноды. Внимание: в этом случае модификация будет храниться только на DS. После адаптер должен быть перезагружен.
Пример:
admin@ds1@ecss1:/$ cluster/adapter/sip1/sip/network/modify ip for-change: 10.16.33.21 to-set: 10.16.33.22 --force "10.16.33.21" -> "10.16.33.22": 0 replacements: ok [exec at: 10.02.2021 11:12:30, exec time: 165ms, nodes: sip1@ecss1 v.3.14.7.562]
set
Командой выполняется настройка параметров ip-set.
Этой же командой декларируется новый ip-set
Путь команды:
/cluster/adapter/<CLUSTER>/sip/network/set ip_set
Синтаксис:
set ip_set <SOME_IP_SET> node-ip node = <SOME_NODE> ip = <SOME_IP>
set ip_set <SOME_IP_SET> listen-ports list = [<SOME_PORT1>, ...]
set ip_set <SOME_IP_SET> dscp <SOME_DSCP>
Параметры:
<SOME_IP_SET> — имя сокета для совместного доступа;
<SOME_IP> — IP-адрес;
<SOME_DSCP> — значение поля dscp для пакетов сигнализации. Может принимать значения от 0 до 63.
Пример:
admin@mycelium1@ecss1:/$ cluster/adapter/sip1/sip/network/set ip_set ipset2 node-ip node = sip1@ecss1 ip = 192.168.2.21 Property "ip_set" successfully changed from: ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 to ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 ipset2: no ports set ipset2: sip1@ecss1 192.168.2.21 ipset2: dscp 0. [exec at: 11.02.2021 14:29:58, exec time: 150ms, nodes: sip1@ecss1 v.3.14.7.566] admin@mycelium1@ecss1:/$ cluster/adapter/sip1/sip/network/set ip_set ipset2 node-ip node = sip1@ecss2 ip = 192.168.2.22 Property "ip_set" successfully changed from: ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 ipset2: no ports set ipset2: sip1@ecss1 192.168.2.21 ipset2: dscp 0 to ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 ipset2: no ports set ipset2: sip1@ecss1 192.168.2.21 ipset2: sip1@ecss2 192.168.2.22 ipset2: dscp 0. [exec at: 11.02.2021 14:31:30, exec time: 148ms, nodes: sip1@ecss1 v.3.14.7.566] admin@mycelium1@ecss1:/$ cluster/adapter/sip1/sip/network/set ip_set ipset2 listen-ports list = [5091,5092] Property "ip_set" successfully changed from: ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 ipset2: no ports set ipset2: sip1@ecss1 192.168.2.21 ipset2: sip1@ecss2 192.168.2.22 ipset2: dscp 0 to ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 ipset2: 5091, 5092 ipset2: sip1@ecss1 192.168.2.21 ipset2: sip1@ecss2 192.168.2.22 ipset2: dscp 0. [exec at: 11.02.2021 14:33:48, exec time: 156ms, nodes: sip1@ecss1 v.3.14.7.566] admin@mycelium1@ecss1:/$ cluster/adapter/sip1/sip/network/set ip_set ipset2 dscp 46 Property "ip_set" successfully changed from: ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 ipset2: 5091, 5092 ipset2: sip1@ecss1 192.168.2.21 ipset2: sip1@ecss2 192.168.2.22 ipset2: dscp 0 to ipset1: 5060, 5061, 5062, 5063, 5064, 5065, 5070, 5071, 5072, 5073, 5074, 5075 ipset1: sip1@ecss1 192.168.2.61 ipset1: sip1@ecss2 192.168.2.62 ipset1: dscp 24 ipset2: 5091, 5092 ipset2: sip1@ecss1 192.168.2.21 ipset2: sip1@ecss2 192.168.2.22 ipset2: dscp 46. [exec at: 11.02.2021 14:40:06, exec time: 151ms, nodes: sip1@ecss1 v.3.14.7.566]