2021-07-16 09:31:05 -05:00
|
|
|
{# Append DHCPv6 agents #}
|
2021-10-14 00:30:19 -05:00
|
|
|
{# Create a program entry for each DHCPv6 relay agent instance #}
|
|
|
|
{% for vlan_name in vlan_list %}
|
|
|
|
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] %}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% if dhcpv6_server | ipv6 %}
|
|
|
|
{% set _dummy = relay_for_ipv6.update({'flag': True}) %}
|
|
|
|
{% endif %}
|
|
|
|
{% if relay_for_ipv6.flag %}
|
|
|
|
{% set _dummy = relay_for_ipv6.update({'flag': False}) %}
|
2021-10-14 00:30:19 -05:00
|
|
|
{% endif %}
|
2021-07-16 09:31:05 -05:00
|
|
|
[program:isc-dhcpv6-relay-{{ vlan_name }}]
|
2021-10-14 00:30:19 -05:00
|
|
|
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
2021-07-16 09:31:05 -05:00
|
|
|
command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l {{ vlan_name }}
|
2021-10-14 00:30:19 -05:00
|
|
|
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
|
|
|
{% for (name, prefix) in VLAN_INTERFACE %}
|
|
|
|
{% if prefix | ipv6 and name != vlan_name %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% endfor %}
|
2021-10-14 00:30:19 -05:00
|
|
|
{% for (name, prefix) in INTERFACE %}
|
|
|
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% endfor %}
|
2021-10-14 00:30:19 -05:00
|
|
|
{% for (name, prefix) in PORTCHANNEL_INTERFACE %}
|
|
|
|
{% if prefix | ipv4 %} -iu {{ name }} {% endif -%}
|
2021-07-16 09:31:05 -05:00
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
priority=3
|
|
|
|
autostart=false
|
|
|
|
autorestart=false
|
|
|
|
stdout_logfile=syslog
|
|
|
|
stderr_logfile=syslog
|
|
|
|
|
|
|
|
{% endif %}
|
2021-10-14 00:30:19 -05:00
|
|
|
{% endfor %}
|