2021-11-18 11:40:48 -06:00
|
|
|
{# Append DHCPv6 agent #}
|
|
|
|
{% set relay_for_ipv6 = { 'flag': False } %}
|
|
|
|
[program:isc-dhcpv6-relay-{{ v6_vlan_list|join("-") }}]
|
|
|
|
command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt
|
|
|
|
{#- We get all DHCPv6 servers only once #}
|
|
|
|
{%- set dhcpv6_server_list = [] %}
|
|
|
|
{%- for vlan_name in v6_vlan_list %}
|
2021-07-16 09:31:05 -05:00
|
|
|
{%- for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %}
|
2021-11-18 11:40:48 -06:00
|
|
|
{%- if dhcpv6_server | ipv6 and dhcpv6_server not in dhcpv6_server_list %}
|
|
|
|
{%- set _dummy = dhcpv6_server_list.append( dhcpv6_server ) %}
|
|
|
|
{%- endif %}
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endfor %}
|
|
|
|
{#- We treat each VLAN as a downstream interface (-l), as we only want to listen for requests #}
|
|
|
|
{%- for vlan_name in v6_vlan_list %} -l {{ vlan_name }}{% endfor -%}
|
|
|
|
{#- We treat all other interfaces as upstream interfaces (-u), as we only want to listen for replies #}
|
|
|
|
{%- for dhcpv6_server in dhcpv6_server_list %}
|
2021-07-16 09:31:05 -05:00
|
|
|
{%- if dhcpv6_server | ipv6 %}
|
|
|
|
{%- for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
|
2021-11-18 11:40:48 -06:00
|
|
|
{%- if prefix | ipv6 and name not in v6_vlan_list%} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% endfor %}
|
|
|
|
{% for (name, prefix) in INTERFACE|pfx_filter %}
|
|
|
|
{% if prefix | ipv6 %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
|
|
|
{% endfor %}
|
|
|
|
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
|
|
|
|
{% if prefix | ipv6 %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
|
|
|
{% endfor %}
|
2021-11-18 11:40:48 -06:00
|
|
|
{% endif %}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
priority=3
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
|
|
|
dependent_startup=true
|
|
|
|
dependent_startup_wait_for=start:exited
|
|
|
|
|