summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/accel-ppp/config_shaper_radius.j22
-rw-r--r--data/templates/accel-ppp/ipoe.config.j25
-rw-r--r--data/templates/accel-ppp/l2tp.config.j25
-rw-r--r--data/templates/accel-ppp/pppoe.config.j25
-rw-r--r--data/templates/accel-ppp/pptp.config.j25
-rw-r--r--data/templates/accel-ppp/sstp.config.j23
-rw-r--r--data/templates/dns-dynamic/ddclient.conf.j22
-rw-r--r--data/templates/frr/bgpd.frr.j220
-rw-r--r--data/templates/frr/evpn.mh.frr.j216
-rw-r--r--data/templates/rsyslog/rsyslog.conf.j210
-rw-r--r--data/templates/snmp/etc.snmpd.conf.j210
-rw-r--r--data/templates/telegraf/telegraf.j22
-rw-r--r--data/templates/vpp/override.conf.j214
-rw-r--r--data/templates/vpp/startup.conf.j2116
14 files changed, 76 insertions, 139 deletions
diff --git a/data/templates/accel-ppp/config_shaper_radius.j2 b/data/templates/accel-ppp/config_shaper_radius.j2
index 0cf6a6a92..fcd68f69e 100644
--- a/data/templates/accel-ppp/config_shaper_radius.j2
+++ b/data/templates/accel-ppp/config_shaper_radius.j2
@@ -1,6 +1,7 @@
{% if authentication.mode is vyos_defined('radius') or shaper is vyos_defined %}
[shaper]
verbose=1
+down-limiter=tbf
{% if authentication.radius.rate_limit.enable is vyos_defined %}
attr={{ authentication.radius.rate_limit.attribute }}
{% if authentication.radius.rate_limit.vendor is vyos_defined %}
@@ -13,7 +14,6 @@ rate-multiplier={{ authentication.radius.rate_limit.multiplier }}
{% if shaper is vyos_defined %}
{% if shaper.fwmark is vyos_defined %}
fwmark={{ shaper.fwmark }}
-down-limiter=htb
{% endif %}
{% endif %}
{% endif %} \ No newline at end of file
diff --git a/data/templates/accel-ppp/ipoe.config.j2 b/data/templates/accel-ppp/ipoe.config.j2
index f59428509..555a033d3 100644
--- a/data/templates/accel-ppp/ipoe.config.j2
+++ b/data/templates/accel-ppp/ipoe.config.j2
@@ -14,6 +14,11 @@ ippool
[core]
thread-count={{ thread_count }}
+[common]
+{% if max_concurrent_sessions is vyos_defined %}
+max-starting={{ max_concurrent_sessions }}
+{% endif %}
+
[log]
syslog=accel-ipoe,daemon
copy=1
diff --git a/data/templates/accel-ppp/l2tp.config.j2 b/data/templates/accel-ppp/l2tp.config.j2
index a2f9c9fc7..b089d3e71 100644
--- a/data/templates/accel-ppp/l2tp.config.j2
+++ b/data/templates/accel-ppp/l2tp.config.j2
@@ -20,6 +20,11 @@ ipv6_dhcp
[core]
thread-count={{ thread_cnt }}
+[common]
+{% if max_concurrent_sessions is vyos_defined %}
+max-starting={{ max_concurrent_sessions }}
+{% endif %}
+
[log]
syslog=accel-l2tp,daemon
copy=1
diff --git a/data/templates/accel-ppp/pppoe.config.j2 b/data/templates/accel-ppp/pppoe.config.j2
index dd53edd28..e1ae3660e 100644
--- a/data/templates/accel-ppp/pppoe.config.j2
+++ b/data/templates/accel-ppp/pppoe.config.j2
@@ -62,10 +62,13 @@ wins{{ loop.index }}={{ server }}
{# Common chap-secrets and RADIUS server/option definitions #}
{% include 'accel-ppp/config_chap_secrets_radius.j2' %}
-{% if session_control is vyos_defined and session_control is not vyos_defined('disable') %}
[common]
+{% if session_control is vyos_defined and session_control is not vyos_defined('disable') %}
single-session={{ session_control }}
{% endif %}
+{% if max_concurrent_sessions is vyos_defined %}
+max-starting={{ max_concurrent_sessions }}
+{% endif %}
[ppp]
verbose=1
diff --git a/data/templates/accel-ppp/pptp.config.j2 b/data/templates/accel-ppp/pptp.config.j2
index 0082e55bf..46a9f933a 100644
--- a/data/templates/accel-ppp/pptp.config.j2
+++ b/data/templates/accel-ppp/pptp.config.j2
@@ -16,6 +16,11 @@ ippool
[core]
thread-count={{ thread_cnt }}
+[common]
+{% if max_concurrent_sessions is vyos_defined %}
+max-starting={{ max_concurrent_sessions }}
+{% endif %}
+
[log]
syslog=accel-pptp,daemon
copy=1
diff --git a/data/templates/accel-ppp/sstp.config.j2 b/data/templates/accel-ppp/sstp.config.j2
index 7ee28dd21..cf1d23f54 100644
--- a/data/templates/accel-ppp/sstp.config.j2
+++ b/data/templates/accel-ppp/sstp.config.j2
@@ -16,6 +16,9 @@ thread-count={{ thread_count }}
[common]
single-session=replace
+{% if max_concurrent_sessions is vyos_defined %}
+max-starting={{ max_concurrent_sessions }}
+{% endif %}
[log]
syslog=accel-sstp,daemon
diff --git a/data/templates/dns-dynamic/ddclient.conf.j2 b/data/templates/dns-dynamic/ddclient.conf.j2
index 6e77abdb5..879887a1f 100644
--- a/data/templates/dns-dynamic/ddclient.conf.j2
+++ b/data/templates/dns-dynamic/ddclient.conf.j2
@@ -21,7 +21,7 @@ if{{ ipv }}={{ address }}, \
{{ host }}
{% endmacro %}
### Autogenerated by dns_dynamic.py ###
-daemon={{ timeout }}
+daemon={{ interval }}
syslog=yes
ssl=yes
pid={{ config_file | replace('.conf', '.pid') }}
diff --git a/data/templates/frr/bgpd.frr.j2 b/data/templates/frr/bgpd.frr.j2
index d724dbd79..6f81174ac 100644
--- a/data/templates/frr/bgpd.frr.j2
+++ b/data/templates/frr/bgpd.frr.j2
@@ -373,6 +373,26 @@ router bgp {{ system_as }} {{ 'vrf ' ~ vrf if vrf is vyos_defined }}
{% if afi_config.advertise_svi_ip is vyos_defined %}
advertise-svi-ip
{% endif %}
+{% if afi_config.default_originate.ipv4 is vyos_defined %}
+ default-originate ipv4
+{% endif %}
+{% if afi_config.default_originate.ipv6 is vyos_defined %}
+ default-originate ipv6
+{% endif %}
+{% if afi_config.disable_ead_evi_rx is vyos_defined %}
+ disable-ead-evi-rx
+{% endif %}
+{% if afi_config.disable_ead_evi_tx is vyos_defined %}
+ disable-ead-evi-tx
+{% endif %}
+{% if afi_config.ead_es_frag.evi_limit is vyos_defined %}
+ ead-es-frag evi-limit {{ afi_config.ead_es_frag.evi_limit }}
+{% endif %}
+{% if afi_config.ead_es_route_target.export is vyos_defined %}
+{% for route_target in afi_config.ead_es_route_target.export %}
+ ead-es-route-target export {{ route_target }}
+{% endfor %}
+{% endif %}
{% if afi_config.rt_auto_derive is vyos_defined %}
autort rfc8365-compatible
{% endif %}
diff --git a/data/templates/frr/evpn.mh.frr.j2 b/data/templates/frr/evpn.mh.frr.j2
new file mode 100644
index 000000000..03aaac44b
--- /dev/null
+++ b/data/templates/frr/evpn.mh.frr.j2
@@ -0,0 +1,16 @@
+!
+interface {{ ifname }}
+{% if evpn.es_df_pref is vyos_defined %}
+ evpn mh es-df-pref {{ evpn.es_df_pref }}
+{% endif %}
+{% if evpn.es_id is vyos_defined %}
+ evpn mh es-id {{ evpn.es_id }}
+{% endif %}
+{% if evpn.es_sys_mac is vyos_defined %}
+ evpn mh es-sys-mac {{ evpn.es_sys_mac }}
+{% endif %}
+{% if evpn.uplink is vyos_defined %}
+ evpn mh uplink
+{% endif %}
+exit
+!
diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2
index dff904129..8ca167803 100644
--- a/data/templates/rsyslog/rsyslog.conf.j2
+++ b/data/templates/rsyslog/rsyslog.conf.j2
@@ -15,7 +15,7 @@ $outchannel global,/var/log/messages,262144,/usr/sbin/logrotate {{ logrotate }}
{% if global.facility is vyos_defined %}
{% set tmp = [] %}
{% for facility, facility_options in global.facility.items() %}
-{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level) %}
+{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{{ tmp | join(';') }} :omfile:$global
{% endif %}
@@ -27,7 +27,7 @@ $outchannel global,/var/log/messages,262144,/usr/sbin/logrotate {{ logrotate }}
$outchannel {{ file_name }},/var/log/user/{{ file_name }},{{ file_options.archive.size }},/usr/sbin/logrotate {{ logrotate }}
{% if file_options.facility is vyos_defined %}
{% for facility, facility_options in file_options.facility.items() %}
-{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level) %}
+{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{% endif %}
{{ tmp | join(';') }} :omfile:${{ file }}
@@ -38,7 +38,7 @@ $outchannel {{ file_name }},/var/log/user/{{ file_name }},{{ file_options.archiv
# Console logging
{% set tmp = [] %}
{% for facility, facility_options in console.facility.items() %}
-{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level) %}
+{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{{ tmp | join(';') }} /dev/console
{% endif %}
@@ -49,7 +49,7 @@ $outchannel {{ file_name }},/var/log/user/{{ file_name }},{{ file_options.archiv
{% set tmp = [] %}
{% if host_options.facility is vyos_defined %}
{% for facility, facility_options in host_options.facility.items() %}
-{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level) %}
+{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{% endif %}
{% if host_options.protocol is vyos_defined('tcp') %}
@@ -70,7 +70,7 @@ $outchannel {{ file_name }},/var/log/user/{{ file_name }},{{ file_options.archiv
{% set tmp = [] %}
{% if user_options.facility is vyos_defined %}
{% for facility, facility_options in user_options.facility.items() %}
-{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level) %}
+{% set _ = tmp.append(facility.replace('all', '*') + '.' + facility_options.level.replace('all', '*')) %}
{% endfor %}
{% endif %}
{{ tmp | join(';') }} :omusrmsg:{{ username }}
diff --git a/data/templates/snmp/etc.snmpd.conf.j2 b/data/templates/snmp/etc.snmpd.conf.j2
index 9d78d479a..3db8c4d7b 100644
--- a/data/templates/snmp/etc.snmpd.conf.j2
+++ b/data/templates/snmp/etc.snmpd.conf.j2
@@ -56,6 +56,16 @@ SysDescr {{ description }}
{% endif %}
agentaddress unix:/run/snmpd.socket{{ ',' ~ options | join(',') if options is vyos_defined }}
+{% if mib is vyos_defined %}
+# Interface MIB limits
+{% if mib.interface_max is vyos_defined %}
+ifmib_max_num_ifaces {{ mib.interface_max }}
+{% endif %}
+{% if mib.interface is vyos_defined %}
+include_ifmib_iface_prefix {{ mib.interface | join(' ') }}
+{% endif %}
+{% endif %}
+
# SNMP communities
{% if community is vyos_defined %}
{% for comm, comm_config in community.items() %}
diff --git a/data/templates/telegraf/telegraf.j2 b/data/templates/telegraf/telegraf.j2
index 5852d6232..02a9656da 100644
--- a/data/templates/telegraf/telegraf.j2
+++ b/data/templates/telegraf/telegraf.j2
@@ -89,7 +89,7 @@
ignore_fs = ["devtmpfs", "devfs"]
[[inputs.diskio]]
[[inputs.mem]]
-[[inputs.net]]
+[[inputs.nstat]]
[[inputs.system]]
[[inputs.netstat]]
[[inputs.processes]]
diff --git a/data/templates/vpp/override.conf.j2 b/data/templates/vpp/override.conf.j2
deleted file mode 100644
index a2c2b04ed..000000000
--- a/data/templates/vpp/override.conf.j2
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-After=
-After=vyos-router.service
-ConditionPathExists=
-ConditionPathExists=/run/vpp/vpp.conf
-
-[Service]
-EnvironmentFile=
-ExecStart=
-ExecStart=/usr/bin/vpp -c /run/vpp/vpp.conf
-WorkingDirectory=
-WorkingDirectory=/run/vpp
-Restart=always
-RestartSec=10
diff --git a/data/templates/vpp/startup.conf.j2 b/data/templates/vpp/startup.conf.j2
deleted file mode 100644
index f33539fba..000000000
--- a/data/templates/vpp/startup.conf.j2
+++ /dev/null
@@ -1,116 +0,0 @@
-# Generated by /usr/libexec/vyos/conf_mode/vpp.py
-
-unix {
- nodaemon
- log /var/log/vpp.log
- full-coredump
- cli-listen /run/vpp/cli.sock
- gid vpp
- # exec /etc/vpp/bootstrap.vpp
-{% if unix is vyos_defined %}
-{% if unix.poll_sleep_usec is vyos_defined %}
- poll-sleep-usec {{ unix.poll_sleep_usec }}
-{% endif %}
-{% endif %}
-}
-
-{% if cpu is vyos_defined %}
-cpu {
-{% if cpu.main_core is vyos_defined %}
- main-core {{ cpu.main_core }}
-{% endif %}
-{% if cpu.corelist_workers is vyos_defined %}
- corelist-workers {{ cpu.corelist_workers | join(',') }}
-{% endif %}
-{% if cpu.skip_cores is vyos_defined %}
- skip-cores {{ cpu.skip_cores }}
-{% endif %}
-{% if cpu.workers is vyos_defined %}
- workers {{ cpu.workers }}
-{% endif %}
-}
-{% endif %}
-
-{# ip heap-size does not work now (23.06-rc2~1-g3a4e62ad4) #}
-{# vlib_call_all_config_functions: unknown input `ip heap-size 32M ' #}
-{% if ip is vyos_defined %}
-#ip {
-#{% if ip.heap_size is vyos_defined %}
-# heap-size {{ ip.heap_size }}M
-#{% endif %}
-#}
-{% endif %}
-
-{% if ip6 is vyos_defined %}
-ip6 {
-{% if ip6.hash_buckets is vyos_defined %}
- hash-buckets {{ ip6.hash_buckets }}
-{% endif %}
-{% if ip6.heap_size is vyos_defined %}
- heap-size {{ ip6.heap_size }}M
-{% endif %}
-}
-{% endif %}
-
-{% if l2learn is vyos_defined %}
-l2learn {
-{% if l2learn.limit is vyos_defined %}
- limit {{ l2learn.limit }}
-{% endif %}
-}
-{% endif %}
-
-{% if logging is vyos_defined %}
-logging {
-{% if logging.default_log_level is vyos_defined %}
- default-log-level {{ logging.default_log_level }}
-{% endif %}
-}
-{% endif %}
-
-{% if physmem is vyos_defined %}
-physmem {
-{% if physmem.max_size is vyos_defined %}
- max-size {{ physmem.max_size.upper() }}
-{% endif %}
-}
-{% endif %}
-
-plugins {
- path /usr/lib/x86_64-linux-gnu/vpp_plugins/
- plugin default { disable }
- plugin dpdk_plugin.so { enable }
- plugin linux_cp_plugin.so { enable }
- plugin linux_nl_plugin.so { enable }
-}
-
-linux-cp {
- lcp-sync
- lcp-auto-subint
-}
-
-dpdk {
- # Whitelist the fake PCI address 0000:00:00.0
- # This prevents all devices from being added to VPP-DPDK by default
- dev 0000:00:00.0
-{% for iface, iface_config in interface.items() %}
-{% if iface_config.pci is vyos_defined %}
- dev {{ iface_config.pci }} {
- name {{ iface }}
-{% if iface_config.num_rx_desc is vyos_defined %}
- num-rx-desc {{ iface_config.num_rx_desc }}
-{% endif %}
-{% if iface_config.num_tx_desc is vyos_defined %}
- num-tx-desc {{ iface_config.num_tx_desc }}
-{% endif %}
-{% if iface_config.num_rx_queues is vyos_defined %}
- num-rx-queues {{ iface_config.num_rx_queues }}
-{% endif %}
-{% if iface_config.num_tx_queues is vyos_defined %}
- num-tx-queues {{ iface_config.num_tx_queues }}
-{% endif %}
- }
-{% endif %}
-{% endfor %}
- uio-bind-force
-}