diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-04-04 15:02:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-04 15:02:58 +0200 |
commit | c705ced894f16d8ffb752c1f017ffcad1f0a23cc (patch) | |
tree | 47fb8a1464b478a144b18a711e5bd8aa8af26d7d /data/templates | |
parent | e02d8145e4f126203ff00949b7af6119658f7123 (diff) | |
parent | dbd922397dcfe6df3f0e766787d9aee69410dd58 (diff) | |
download | vyos-1x-c705ced894f16d8ffb752c1f017ffcad1f0a23cc.tar.gz vyos-1x-c705ced894f16d8ffb752c1f017ffcad1f0a23cc.zip |
Merge pull request #1267 from sever-sever/T2580
ipoe: T2580: Add pools and gateway options
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/accel-ppp/ipoe.config.tmpl | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/data/templates/accel-ppp/ipoe.config.tmpl b/data/templates/accel-ppp/ipoe.config.tmpl index 1cf2ab0be..92c2d5715 100644 --- a/data/templates/accel-ppp/ipoe.config.tmpl +++ b/data/templates/accel-ppp/ipoe.config.tmpl @@ -25,11 +25,21 @@ level=5 verbose=1 {% for interface in interfaces %} {% if interface.vlan_mon %} -interface=re:{{ interface.name }}\.\d+,{% else %}interface={{ interface.name }},{% endif %}shared={{ interface.shared }},mode={{ interface.mode }},ifcfg={{ interface.ifcfg }},range={{ interface.range }},start={{ interface.sess_start }},ipv6=1 +interface=re:{{ interface.name }}\.\d+,{% else %}interface={{ interface.name }},{% endif %}shared={{ interface.shared }},mode={{ interface.mode }},ifcfg={{ interface.ifcfg }}{{ ',range=' + interface.range if interface.range is defined and interface.range is not none }},start={{ interface.sess_start }},ipv6=1 {% endfor %} -{% if auth_mode == 'noauth' %} +{% if auth_mode == 'noauth' %} noauth=1 -{% elif auth_mode == 'local' %} +{% if client_named_ip_pool %} +{% for pool in client_named_ip_pool %} +{% if pool.subnet is defined %} +ip-pool={{ pool.name }} +{% endif %} +{% if pool.gateway_address is defined %} +gw-ip-address={{ pool.gateway_address }}/{{ pool.subnet.split('/')[1] }} +{% endif %} +{% endfor%} +{% endif %} +{% elif auth_mode == 'local' %} username=ifname password=csid {% endif %} @@ -61,6 +71,18 @@ verbose=1 [ipv6-dhcp] verbose=1 +{% if client_named_ip_pool %} +[ip-pool] +{% for pool in client_named_ip_pool %} +{% if pool.subnet is defined %} +{{ pool.subnet }},name={{ pool.name }} +{% endif %} +{% if pool.gateway_address is defined %} +gw-ip-address={{ pool.gateway_address }}/{{ pool.subnet.split('/')[1] }} +{% endif %} +{% endfor%} +{% endif %} + {% if client_ipv6_pool %} [ipv6-pool] {% for p in client_ipv6_pool %} |