diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-02-07 08:45:38 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2023-02-07 08:50:31 +0000 |
commit | 53d82ea2b1427ac4668cc1b38544219eae960b86 (patch) | |
tree | 25b36cffd087f8fbc01d9f23dcb172a97a3b7ba8 /data/templates/accel-ppp/pppoe.config.j2 | |
parent | 2622902ac76bc1c3356bb722f63e931119f3eb04 (diff) | |
download | vyos-1x-53d82ea2b1427ac4668cc1b38544219eae960b86.tar.gz vyos-1x-53d82ea2b1427ac4668cc1b38544219eae960b86.zip |
T4971: PPPoE server add named ip pool and attr Framed-Pool
Add a new feature to allow to use named pools
Also it can be used with RADIUS attribute 'Framed-Pool'
set service pppoe-server client-ip-pool name POOL1 gateway-address '192.0.2.1'
set service pppoe-server client-ip-pool name POOL1 subnet '192.0.2.0/24'
Diffstat (limited to 'data/templates/accel-ppp/pppoe.config.j2')
-rw-r--r-- | data/templates/accel-ppp/pppoe.config.j2 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/accel-ppp/pppoe.config.j2 b/data/templates/accel-ppp/pppoe.config.j2 index f4129d3e2..74a8a53e2 100644 --- a/data/templates/accel-ppp/pppoe.config.j2 +++ b/data/templates/accel-ppp/pppoe.config.j2 @@ -135,6 +135,19 @@ pado-delay={{ pado_delay_param.value }} called-sid={{ authentication.radius.called_sid_format }} {% endif %} +{% if authentication.mode is vyos_defined("local") %} +{% if client_ip_pool.name is vyos_defined %} +{% for pool, pool_config in client_ip_pool.name.items() %} +{% if pool_config.subnet is vyos_defined %} +ip-pool={{ pool }} +{% endif %} +{% if pool_config.gateway_address is vyos_defined %} +gw-ip-address={{ pool_config.gateway_address }}/{{ pool_config.subnet.split('/')[1] }} +{% endif %} +{% endfor %} +{% endif %} +{% endif %} + {% if limits is vyos_defined %} [connlimit] {% if limits.connection_limit is vyos_defined %} |