Документация: ПО Факел — разрабатываемая версия
Синхронизация конфигурации¶
Обзор¶
Синхронизация конфигурации копирует выбранные разделы конфигурации с одного маршрутизатора ПО Факел на другой. Маршрутизатор, на котором настроена синхронизация, называется основным. Маршрутизатор, на который передаются разделы, называется вторичным. Функция полезна, когда настройки нескольких разделов на двух маршрутизаторах должны совпадать.
Синхронизация запускается после каждого применения конфигурации на основном маршрутизаторе. Служба проверяет, изменился ли хотя бы один из выбранных разделов. Если изменился, основной маршрутизатор передает выбранные разделы на вторичный по HTTPS: запрос отправляется в программный интерфейс управления (API) вторичного маршрутизатора и подтверждается ключом API. Если выбранные разделы не изменились, ничего не передается.
Параметры вторичного маршрутизатора задаются командами service config-sync secondary:
address— адрес вторичного маршрутизатора: IPv4-адрес, IPv6-адрес или FQDN;key— ключ API вторичного маршрутизатора;port— порт API вторичного маршрутизатора. Значение по умолчанию: 443;timeout— время ожидания ответа API вторичного маршрутизатора в секундах. Значение по умолчанию: 60.
Режим синхронизации выбирается командой service config-sync mode. В режиме load основной маршрутизатор загружает выбранные разделы на вторичный и заменяет ими существующие разделы: значения, которых нет на основном маршрутизаторе, из раздела на вторичном удаляются. В режиме set основной маршрутизатор устанавливает значения выбранных разделов на вторичном и не удаляет его собственные значения: например, список префиксов, который есть только на вторичном маршрутизаторе, сохраняется.
Разделы конфигурации выбираются командами service config-sync section. Каждая команда включает один раздел, например service config-sync section firewall или service config-sync section interfaces ethernet. Можно выбрать несколько разделов.
Режим синхронизации, адрес и ключ вторичного маршрутизатора и хотя бы один раздел являются обязательными. Если любой из них не задан, применение конфигурации завершается ошибкой с сообщением: config-sync mode is mandatory! (не задан режим), secondary address is mandatory! (не задан адрес), secondary key is mandatory! (не задан ключ), config-sync 'section' is not configured! (не выбран ни один раздел).
На вторичном маршрутизаторе должен быть задан ключ API (service https api keys id <id> key <key>), совпадающий со значением secondary key на основном маршрутизаторе. Других настроек на вторичном маршрутизаторе не требуется. Если ключи не совпадают, разделы на вторичном маршрутизаторе не изменяются. Настройка API описана в разделе Служба HTTPS и HTTP API. Соединение с вторичным маршрутизатором шифруется HTTPS.
Пример настройки¶
Основной маршрутизатор:
Шаг |
Команда |
Описание |
|---|---|---|
1 |
set service config-sync mode |
Выбирает режим загрузки: выбранные разделы заменяют соответствующие разделы на вторичном маршрутизаторе |
2 |
set service config-sync secondary address |
Задает адрес вторичного маршрутизатора |
3 |
set service config-sync secondary key |
Задает ключ API вторичного маршрутизатора |
4 |
set service config-sync section |
Включает в синхронизацию раздел конфигурации межсетевого экрана |
5 |
set service config-sync section |
Включает в синхронизацию раздел конфигурации NAT |
Вторичный маршрутизатор:
Шаг |
Команда |
Описание |
|---|---|---|
1 |
set service https api keys id |
Создает ключ API, значение которого совпадает со значением |
Список команд¶
Режим «Конфигурирование»¶
service config-sync mode [<load> | <set>]¶
Синтаксис:
set service config-sync mode
[<load> | <set>]delete service config-sync mode
[<load> | <set>]show service config-sync mode
Аргументы:
<load>— загружает выбранные разделы на вторичный маршрутизатор и заменяет ими существующие разделы: значения, которых нет на основном маршрутизаторе, на вторичном удаляются;<set>— устанавливает значения выбранных разделов на вторичном маршрутизаторе; собственные значения этих разделов на вторичном маршрутизаторе сохраняются.
Режим: «Конфигурирование».
service config-sync secondary address [<x.x.x.x> | <h:h:h:h:h:h:h:h> | <fqdn>]¶
Синтаксис:
set service config-sync secondary address
[<x.x.x.x> | <h:h:h:h:h:h:h:h> | <fqdn>]delete service config-sync secondary address
[<x.x.x.x> | <h:h:h:h:h:h:h:h> | <fqdn>]show service config-sync secondary address
Аргументы:
<x.x.x.x>— IPv4-адрес вторичного маршрутизатора;<h:h:h:h:h:h:h:h>— IPv6-адрес вторичного маршрутизатора;<fqdn>— FQDN вторичного маршрутизатора.
Режим: «Конфигурирование».
service config-sync secondary key <key>¶
Синтаксис:
set service config-sync secondary key
<key>delete service config-sync secondary key
<key>show service config-sync secondary key
Аргументы:
<key>— ключ API вторичного маршрутизатора.
Режим: «Конфигурирование».
service config-sync secondary port <1-65535>¶
Синтаксис:
set service config-sync secondary port
<1-65535>delete service config-sync secondary port
<1-65535>show service config-sync secondary port
Аргументы:
<1-65535>— номер порта. Диапазон значений: от 1 до 65535. Значение по умолчанию: 443.
Режим: «Конфигурирование».
service config-sync secondary timeout <1-3600>¶
Синтаксис:
set service config-sync secondary timeout
<1-3600>delete service config-sync secondary timeout
<1-3600>show service config-sync secondary timeout
Аргументы:
<1-3600>— время ожидания в секундах. Диапазон значений: от 1 до 3600. Значение по умолчанию: 60.
Режим: «Конфигурирование».
service config-sync section firewall¶
firewall (межсетевой экран).Синтаксис:
set service config-sync section firewall
delete service config-sync section firewall
show service config-sync section firewall
Режим: «Конфигурирование».
service config-sync section interfaces bonding¶
interfaces bonding (интерфейсы Bonding).Синтаксис:
set service config-sync section interfaces bonding
delete service config-sync section interfaces bonding
show service config-sync section interfaces bonding
Режим: «Конфигурирование».
service config-sync section interfaces bridge¶
interfaces bridge (интерфейсы Bridge).Синтаксис:
set service config-sync section interfaces bridge
delete service config-sync section interfaces bridge
show service config-sync section interfaces bridge
Режим: «Конфигурирование».
service config-sync section interfaces dummy¶
interfaces dummy (интерфейсы Dummy).Синтаксис:
set service config-sync section interfaces dummy
delete service config-sync section interfaces dummy
show service config-sync section interfaces dummy
Режим: «Конфигурирование».
service config-sync section interfaces ethernet¶
interfaces ethernet (интерфейсы Ethernet).Синтаксис:
set service config-sync section interfaces ethernet
delete service config-sync section interfaces ethernet
show service config-sync section interfaces ethernet
Режим: «Конфигурирование».
service config-sync section interfaces geneve¶
interfaces geneve (интерфейсы GENEVE).Синтаксис:
set service config-sync section interfaces geneve
delete service config-sync section interfaces geneve
show service config-sync section interfaces geneve
Режим: «Конфигурирование».
service config-sync section interfaces input¶
interfaces input (интерфейсы Input, IFB; см. Интерфейс Input (IFB)).Синтаксис:
set service config-sync section interfaces input
delete service config-sync section interfaces input
show service config-sync section interfaces input
Режим: «Конфигурирование».
service config-sync section interfaces l2tpv3¶
interfaces l2tpv3 (интерфейсы L2TPv3).Синтаксис:
set service config-sync section interfaces l2tpv3
delete service config-sync section interfaces l2tpv3
show service config-sync section interfaces l2tpv3
Режим: «Конфигурирование».
service config-sync section interfaces loopback¶
interfaces loopback (интерфейсы Loopback).Синтаксис:
set service config-sync section interfaces loopback
delete service config-sync section interfaces loopback
show service config-sync section interfaces loopback
Режим: «Конфигурирование».
service config-sync section interfaces macsec¶
interfaces macsec (интерфейсы MACsec).Синтаксис:
set service config-sync section interfaces macsec
delete service config-sync section interfaces macsec
show service config-sync section interfaces macsec
Режим: «Конфигурирование».
service config-sync section interfaces openvpn¶
interfaces openvpn (интерфейсы OpenVPN).Синтаксис:
set service config-sync section interfaces openvpn
delete service config-sync section interfaces openvpn
show service config-sync section interfaces openvpn
Режим: «Конфигурирование».
service config-sync section interfaces pppoe¶
interfaces pppoe (интерфейсы PPPoE).Синтаксис:
set service config-sync section interfaces pppoe
delete service config-sync section interfaces pppoe
show service config-sync section interfaces pppoe
Режим: «Конфигурирование».
service config-sync section interfaces pseudo-ethernet¶
interfaces pseudo-ethernet (интерфейсы Pseudo-Ethernet).Синтаксис:
set service config-sync section interfaces pseudo-ethernet
delete service config-sync section interfaces pseudo-ethernet
show service config-sync section interfaces pseudo-ethernet
Режим: «Конфигурирование».
service config-sync section interfaces sstpc¶
interfaces sstpc (интерфейсы клиента SSTP).Синтаксис:
set service config-sync section interfaces sstpc
delete service config-sync section interfaces sstpc
show service config-sync section interfaces sstpc
Режим: «Конфигурирование».
service config-sync section interfaces tunnel¶
interfaces tunnel (интерфейсы Tunnel).Синтаксис:
set service config-sync section interfaces tunnel
delete service config-sync section interfaces tunnel
show service config-sync section interfaces tunnel
Режим: «Конфигурирование».
service config-sync section interfaces virtual-ethernet¶
interfaces virtual-ethernet (интерфейсы Virtual Ethernet).Синтаксис:
set service config-sync section interfaces virtual-ethernet
delete service config-sync section interfaces virtual-ethernet
show service config-sync section interfaces virtual-ethernet
Режим: «Конфигурирование».
service config-sync section interfaces vti¶
interfaces vti (виртуальные туннельные интерфейсы VTI).Синтаксис:
set service config-sync section interfaces vti
delete service config-sync section interfaces vti
show service config-sync section interfaces vti
Режим: «Конфигурирование».
service config-sync section interfaces vxlan¶
interfaces vxlan (интерфейсы VXLAN).Синтаксис:
set service config-sync section interfaces vxlan
delete service config-sync section interfaces vxlan
show service config-sync section interfaces vxlan
Режим: «Конфигурирование».
service config-sync section interfaces wireguard¶
interfaces wireguard (интерфейсы WireGuard).Синтаксис:
set service config-sync section interfaces wireguard
delete service config-sync section interfaces wireguard
show service config-sync section interfaces wireguard
Режим: «Конфигурирование».
service config-sync section interfaces wireless¶
interfaces wireless (интерфейсы Wireless).Синтаксис:
set service config-sync section interfaces wireless
delete service config-sync section interfaces wireless
show service config-sync section interfaces wireless
Режим: «Конфигурирование».
service config-sync section interfaces wwan¶
interfaces wwan (интерфейсы WWAN).Синтаксис:
set service config-sync section interfaces wwan
delete service config-sync section interfaces wwan
show service config-sync section interfaces wwan
Режим: «Конфигурирование».
service config-sync section nat¶
nat (NAT).Синтаксис:
set service config-sync section nat
delete service config-sync section nat
show service config-sync section nat
Режим: «Конфигурирование».
service config-sync section nat66¶
nat66 (NAT66).Синтаксис:
set service config-sync section nat66
delete service config-sync section nat66
show service config-sync section nat66
Режим: «Конфигурирование».
service config-sync section pki¶
pki (инфраструктура открытых ключей PKI).Синтаксис:
set service config-sync section pki
delete service config-sync section pki
show service config-sync section pki
Режим: «Конфигурирование».
service config-sync section policy¶
policy (политики маршрутизации).Синтаксис:
set service config-sync section policy
delete service config-sync section policy
show service config-sync section policy
Режим: «Конфигурирование».
service config-sync section protocols babel¶
protocols babel (протокол Babel).Синтаксис:
set service config-sync section protocols babel
delete service config-sync section protocols babel
show service config-sync section protocols babel
Режим: «Конфигурирование».
service config-sync section protocols bfd¶
protocols bfd (протокол BFD).Синтаксис:
set service config-sync section protocols bfd
delete service config-sync section protocols bfd
show service config-sync section protocols bfd
Режим: «Конфигурирование».
service config-sync section protocols bgp¶
protocols bgp (протокол BGP).Синтаксис:
set service config-sync section protocols bgp
delete service config-sync section protocols bgp
show service config-sync section protocols bgp
Режим: «Конфигурирование».
service config-sync section protocols failover¶
protocols failover (маршруты Failover; см. Маршруты Failover).Синтаксис:
set service config-sync section protocols failover
delete service config-sync section protocols failover
show service config-sync section protocols failover
Режим: «Конфигурирование».
service config-sync section protocols igmp-proxy¶
protocols igmp-proxy (прокси IGMP).Синтаксис:
set service config-sync section protocols igmp-proxy
delete service config-sync section protocols igmp-proxy
show service config-sync section protocols igmp-proxy
Режим: «Конфигурирование».
service config-sync section protocols isis¶
protocols isis (протокол IS-IS).Синтаксис:
set service config-sync section protocols isis
delete service config-sync section protocols isis
show service config-sync section protocols isis
Режим: «Конфигурирование».
service config-sync section protocols mpls¶
protocols mpls (протокол MPLS).Синтаксис:
set service config-sync section protocols mpls
delete service config-sync section protocols mpls
show service config-sync section protocols mpls
Режим: «Конфигурирование».
service config-sync section protocols nhrp¶
protocols nhrp (параметры протокола NHRP).Синтаксис:
set service config-sync section protocols nhrp
delete service config-sync section protocols nhrp
show service config-sync section protocols nhrp
Режим: «Конфигурирование».
service config-sync section protocols ospf¶
protocols ospf (протокол OSPF).Синтаксис:
set service config-sync section protocols ospf
delete service config-sync section protocols ospf
show service config-sync section protocols ospf
Режим: «Конфигурирование».
service config-sync section protocols ospfv3¶
protocols ospfv3 (протокол OSPF для IPv6 (OSPFv3)).Синтаксис:
set service config-sync section protocols ospfv3
delete service config-sync section protocols ospfv3
show service config-sync section protocols ospfv3
Режим: «Конфигурирование».
service config-sync section protocols pim¶
protocols pim (протоколы PIM и IGMP).Синтаксис:
set service config-sync section protocols pim
delete service config-sync section protocols pim
show service config-sync section protocols pim
Режим: «Конфигурирование».
service config-sync section protocols pim6¶
protocols pim6 (протоколы PIM для IPv6 (PIMv6) и MLD).Синтаксис:
set service config-sync section protocols pim6
delete service config-sync section protocols pim6
show service config-sync section protocols pim6
Режим: «Конфигурирование».
service config-sync section protocols rip¶
protocols rip (параметры протокола RIP).Синтаксис:
set service config-sync section protocols rip
delete service config-sync section protocols rip
show service config-sync section protocols rip
Режим: «Конфигурирование».
service config-sync section protocols ripng¶
protocols ripng (параметры протокола RIPng).Синтаксис:
set service config-sync section protocols ripng
delete service config-sync section protocols ripng
show service config-sync section protocols ripng
Режим: «Конфигурирование».
service config-sync section protocols rpki¶
protocols rpki (инфраструктура RPKI).Синтаксис:
set service config-sync section protocols rpki
delete service config-sync section protocols rpki
show service config-sync section protocols rpki
Режим: «Конфигурирование».
service config-sync section protocols segment-routing¶
protocols segment-routing (маршрутизация сегментов (Segment Routing)).Синтаксис:
set service config-sync section protocols segment-routing
delete service config-sync section protocols segment-routing
show service config-sync section protocols segment-routing
Режим: «Конфигурирование».
service config-sync section protocols static¶
protocols static (статическая маршрутизация).Синтаксис:
set service config-sync section protocols static
delete service config-sync section protocols static
show service config-sync section protocols static
Режим: «Конфигурирование».
service config-sync section qos interface¶
qos interface (применение политик QoS к интерфейсам).Синтаксис:
set service config-sync section qos interface
delete service config-sync section qos interface
show service config-sync section qos interface
Режим: «Конфигурирование».
service config-sync section qos policy¶
qos policy (политики QoS).Синтаксис:
set service config-sync section qos policy
delete service config-sync section qos policy
show service config-sync section qos policy
Режим: «Конфигурирование».
service config-sync section service console-server¶
service console-server (консольный сервер).Синтаксис:
set service config-sync section service console-server
delete service config-sync section service console-server
show service config-sync section service console-server
Режим: «Конфигурирование».
service config-sync section service dhcp-relay¶
service dhcp-relay (агент ретрансляции DHCP).Синтаксис:
set service config-sync section service dhcp-relay
delete service config-sync section service dhcp-relay
show service config-sync section service dhcp-relay
Режим: «Конфигурирование».
service config-sync section service dhcp-server¶
service dhcp-server (DHCP-сервер).Синтаксис:
set service config-sync section service dhcp-server
delete service config-sync section service dhcp-server
show service config-sync section service dhcp-server
Режим: «Конфигурирование».
service config-sync section service dhcpv6-relay¶
service dhcpv6-relay (агент ретрансляции DHCPv6).Синтаксис:
set service config-sync section service dhcpv6-relay
delete service config-sync section service dhcpv6-relay
show service config-sync section service dhcpv6-relay
Режим: «Конфигурирование».
service config-sync section service dhcpv6-server¶
service dhcpv6-server (DHCPv6-сервер).Синтаксис:
set service config-sync section service dhcpv6-server
delete service config-sync section service dhcpv6-server
show service config-sync section service dhcpv6-server
Режим: «Конфигурирование».
service config-sync section service dns¶
service dns (службы DNS).Синтаксис:
set service config-sync section service dns
delete service config-sync section service dns
show service config-sync section service dns
Режим: «Конфигурирование».
service config-sync section service lldp¶
service lldp (служба LLDP).Синтаксис:
set service config-sync section service lldp
delete service config-sync section service lldp
show service config-sync section service lldp
Режим: «Конфигурирование».
service config-sync section service mdns¶
service mdns (служба mDNS).Синтаксис:
set service config-sync section service mdns
delete service config-sync section service mdns
show service config-sync section service mdns
Режим: «Конфигурирование».
service config-sync section service monitoring¶
service monitoring (службы мониторинга).Синтаксис:
set service config-sync section service monitoring
delete service config-sync section service monitoring
show service config-sync section service monitoring
Режим: «Конфигурирование».
service config-sync section service ndp-proxy¶
service ndp-proxy (прокси NDP).Синтаксис:
set service config-sync section service ndp-proxy
delete service config-sync section service ndp-proxy
show service config-sync section service ndp-proxy
Режим: «Конфигурирование».
service config-sync section service ntp¶
service ntp (служба NTP).Синтаксис:
set service config-sync section service ntp
delete service config-sync section service ntp
show service config-sync section service ntp
Режим: «Конфигурирование».
service config-sync section service snmp¶
service snmp (служба SNMP).Синтаксис:
set service config-sync section service snmp
delete service config-sync section service snmp
show service config-sync section service snmp
Режим: «Конфигурирование».
service config-sync section service tftp-server¶
service tftp-server (сервер TFTP).Синтаксис:
set service config-sync section service tftp-server
delete service config-sync section service tftp-server
show service config-sync section service tftp-server
Режим: «Конфигурирование».
service config-sync section service webproxy¶
service webproxy (веб-прокси).Синтаксис:
set service config-sync section service webproxy
delete service config-sync section service webproxy
show service config-sync section service webproxy
Режим: «Конфигурирование».
service config-sync section system conntrack¶
system conntrack (отслеживание соединений).Синтаксис:
set service config-sync section system conntrack
delete service config-sync section system conntrack
show service config-sync section system conntrack
Режим: «Конфигурирование».
service config-sync section system flow-accounting¶
system flow-accounting (учет потоков (flow accounting)).Синтаксис:
set service config-sync section system flow-accounting
delete service config-sync section system flow-accounting
show service config-sync section system flow-accounting
Режим: «Конфигурирование».
service config-sync section system option¶
system option (параметры системы; см. Параметры системы).Синтаксис:
set service config-sync section system option
delete service config-sync section system option
show service config-sync section system option
Режим: «Конфигурирование».
service config-sync section system sflow¶
system sflow (служба sFlow).Синтаксис:
set service config-sync section system sflow
delete service config-sync section system sflow
show service config-sync section system sflow
Режим: «Конфигурирование».
service config-sync section system static-host-mapping¶
system static-host-mapping (соответствие имен хостов адресам).Синтаксис:
set service config-sync section system static-host-mapping
delete service config-sync section system static-host-mapping
show service config-sync section system static-host-mapping
Режим: «Конфигурирование».
service config-sync section system sysctl¶
system sysctl (параметры ядра, изменяемые во время работы (sysctl)).Синтаксис:
set service config-sync section system sysctl
delete service config-sync section system sysctl
show service config-sync section system sysctl
Режим: «Конфигурирование».
service config-sync section system time-zone¶
system time-zone (местный часовой пояс).Синтаксис:
set service config-sync section system time-zone
delete service config-sync section system time-zone
show service config-sync section system time-zone
Режим: «Конфигурирование».
service config-sync section vpn¶
vpn (виртуальные частные сети (VPN)).Синтаксис:
set service config-sync section vpn
delete service config-sync section vpn
show service config-sync section vpn
Режим: «Конфигурирование».
service config-sync section vrf¶
vrf (экземпляры VRF).Синтаксис:
set service config-sync section vrf
delete service config-sync section vrf
show service config-sync section vrf
Режим: «Конфигурирование».