routerbox/utils/he_ipv6/tpl/radvd.conf.j2

45 lines
1.2 KiB
Plaintext
Raw Normal View History

2020-05-18 04:59:00 -04:00
{%- import '_common.j2' as common_opts with context -%}
# Generated by he_ipv6.
# This may go wonky with multiple assignments on the same iface.
{% for assignment in assignments %}
2020-05-15 18:01:03 -04:00
interface {{ assignment.iface }} {
AdvSendAdvert on;
2020-05-18 04:59:00 -04:00
AdvLinkMTU {{ common_opts.mtu }};
MinRtrAdvInterval {{ common_opts.min_inter }};
MaxRtrAdvInterval {{ common_opts.max_inter }};
MinDelayBetweenRAs {{ common_opts.min_delay }};
AdvDefaultLifetime {{ common_opts.lifetime }};
{%- if assignment.ra_dhcp is true -%}
AdvManagedFlag on;
{%- endif %}
{%- if assignment.ra_other is true -%}
AdvOtherConfigFlag on;
{%- endif %}
2020-05-15 18:01:03 -04:00
{%- for block in assignment.iface_blocks %}
prefix {{ block|string }} {
AdvOnLink on;
2020-05-18 04:59:00 -04:00
{%- if block.prefixlen <= 64 %}
2020-05-15 18:01:03 -04:00
AdvAutonomous on;
{%- endif %}
2020-05-18 04:59:00 -04:00
AdvValidLifetime {{ common_opts.lease_life }};
AdvPreferredLifetime {{ common_opts.lease_life }};
2020-05-15 18:01:03 -04:00
AdvRouterAddr off;
};
{%- endfor %}
2020-05-18 04:59:00 -04:00
{%- if assign.ra_dns is true %}
RDNSS {{ assignment.iface_ll }} {
AdvRDNSSLifetime {{ common_opts.opts_life }};
};
{%- endif %}
{%- if assign.ra_domains %}
DNSSL {{ assignment.ra_domains|join(' ') }} {
AdvDNSSLLifetime {{ common_opts.opts_life }};
2020-05-15 18:01:03 -04:00
};
{%- endif %}
};
{%- endfor %}