diff options
author | aapostoliuk <a.apostoliuk@vyos.io> | 2023-11-13 11:17:23 +0200 |
---|---|---|
committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2023-12-28 15:28:02 +0000 |
commit | d5062cb045fae8b0b5d68b3b1198c3b86de4d558 (patch) | |
tree | 589f2974f7589b7c9f12fb3388ac59e2efb14759 /data/templates/accel-ppp/l2tp.config.j2 | |
parent | db108da1fb9f289968302a963a0e6a28ea243b49 (diff) | |
download | vyos-1x-d5062cb045fae8b0b5d68b3b1198c3b86de4d558.tar.gz vyos-1x-d5062cb045fae8b0b5d68b3b1198c3b86de4d558.zip |
accel-ppp: T5688: Standardized pool configuration in accel-ppp
Standardized pool configuration for all accel-ppp services.
1. Only named pools are used now.
2. Allows all services to use range in x.x.x.x/mask
and x.x.x.x-x.x.x.y format
3. next-pool can be used in all services
2. Allows to use in ipoe gw-ip-address without pool configuration
which allows to use Fraimed-IP-Address attribute by radius.
3. Default pool name should be explicidly configured
with default-pool.
4. In ipoe netmask and range subnet can be different.
(cherry picked from commit 422eb463d413da812eabc28706e507a9910d7b53)
Diffstat (limited to 'data/templates/accel-ppp/l2tp.config.j2')
-rw-r--r-- | data/templates/accel-ppp/l2tp.config.j2 | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/data/templates/accel-ppp/l2tp.config.j2 b/data/templates/accel-ppp/l2tp.config.j2 index b089d3e71..89cc0eae7 100644 --- a/data/templates/accel-ppp/l2tp.config.j2 +++ b/data/templates/accel-ppp/l2tp.config.j2 @@ -6,11 +6,9 @@ chap-secrets {% for proto in auth_proto %} {{ proto }} {% endfor %} - {% if auth_mode == 'radius' %} radius {% endif %} - ippool shaper ipv6pool @@ -65,24 +63,15 @@ secret={{ lns_shared_secret }} {% if lns_host_name %} host-name={{ lns_host_name }} {% endif %} +{% if default_pool is vyos_defined %} +ip-pool={{ default_pool }} +{% endif %} [client-ip-range] 0.0.0.0/0 -{% if client_ip_pool or client_ip_subnets %} -[ip-pool] -{% if client_ip_pool %} -{{ client_ip_pool }} -{% endif %} -{% if client_ip_subnets %} -{% for sn in client_ip_subnets %} -{{ sn }} -{% endfor %} -{% endif %} -{% endif %} -{% if gateway_address %} -gw-ip-address={{ gateway_address }} -{% endif %} +{# Common IP pool definitions #} +{% include 'accel-ppp/config_ip_pool.j2' %} {% if auth_mode == 'local' %} [chap-secrets] @@ -115,7 +104,7 @@ nas-ip-address={{ radius_nas_ip }} bind={{ radius_source_address }} {% endif %} {% endif %} -{% if gateway_address %} +{% if gateway_address is vyos_defined %} gw-ip-address={{ gateway_address }} {% endif %} |