[201811] Add DHCPv6 minigraph parsing support (#8970)
* Add DHCPv6 minigraph parsing support Co-authored-by: shlomibitton <60430976+shlomibitton@users.noreply.github.com> Logrotate for wtmp and btmp files to fix size getting too large. (#8744) Signed-off-by: Abhishek Dosi <abdosi@microsoft.com> [201811][utilities][swss][snmpagent] advance sub module head snmpagent * 187aa10 2021-09-16 | [201811][RFC1213]: Initialize lag oid map in reinit_data (#233) (github/201811) [SuvarnaMeenakshi] swss: * 3503705 2021-09-05 | [201811][Cherry-pick] [acl mirror action] Mirror session ref count fix at acl rule attachment (#1898) (HEAD -> 201811, github/201811) [bingwang-ms] utilities: * f3f8667 2021-10-15 | [201811] disk_check.py: Allow remote user access when disk is read-only (#1873) (HEAD -> 201811, github/201811) [Renuka Manavalan] * 6b351c9 2021-10-14 | [201811] Remove exec from platform_reboot_plugin call to handle any hang issue. (#1880) [Sujin Kang] * d8d0461 2021-07-29 | [minigraph][port_config] Consume port_config.json while reloading minigraph (#1726) [Blueve] Signed-off-by: Ying Xie <ying.xie@microsoft.com> [201811] Invoke disk check periodically (#8951) * Invoke disk check periodically. (#7374) Why I did it Helps with periodic scan of disk for RO state. If found, this script makes transient fix and raise error message. Save DB dump after warm/fast reboot (#8913) Back porting the master branch change - #8803 Save the redis DB dump after warm reboot. [201811][swss] advance swss submodule head (#9049) * e0b115a 2021-10-22 | [copp] add dhcpv6 copp rules (#1979) (HEAD -> 201811, github/201811) [Ying Xie] Signed-off-by: Ying Xie <ying.xie@microsoft.com> [swssconfig] load dhcpv6 copp rules by default (#9047) Why I did it Need to enable DHCPv6 copp rule How I did it Add a separate DHCPv6 copp rule config file and load it during cold reboot. How to verify it cold reboot, and verify config being loaded and dhcpv6 rules got installed. Signed-off-by: Ying Xie ying.xie@microsoft.com [warmboot finalizer] load dhcpv6 copp rules when missing (#9048) Why I did it Need to enable DHCPv6 COPP rules. How I did it Load the separate DHCPv6 COPP rules after warm reboot if the rules are missing. How to verify it Warm reboot from an image doesn't have DHCPv6 COPP rules installed. Warm reboot from an image have DHCPv6 COPP rules already installed. In either case, the script did the right thing and only install the COPP rules if it is missing. Signed-off-by: Ying Xie ying.xie@microsoft.com
This commit is contained in:
parent
e30d559c5c
commit
139a58be49
@ -28,6 +28,6 @@ RUN rm -rf /debs
|
|||||||
COPY ["docker_init.sh", "start.sh", "/usr/bin/"]
|
COPY ["docker_init.sh", "start.sh", "/usr/bin/"]
|
||||||
COPY ["docker-dhcp-relay.supervisord.conf.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"]
|
COPY ["docker-dhcp-relay.supervisord.conf.j2", "wait_for_intf.sh.j2", "/usr/share/sonic/templates/"]
|
||||||
COPY ["dhcp-relay.programs.j2", "dhcpv4-relay.agents.j2", "dhcpv6-relay.agents.j2", "dhcpv6-relay.monitors.j2", "/usr/share/sonic/templates/"]
|
COPY ["dhcp-relay.programs.j2", "dhcpv4-relay.agents.j2", "dhcpv6-relay.agents.j2", "dhcpv6-relay.monitors.j2", "/usr/share/sonic/templates/"]
|
||||||
COPY ["files/supervisor-proc-exit-listener", "/usr/bin"]
|
COPY ["critical_processes", "/etc/supervisor"]
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/docker_init.sh"]
|
ENTRYPOINT ["/usr/bin/docker_init.sh"]
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
[group:isc-dhcp-relay]
|
[group:isc-dhcp-relay]
|
||||||
programs=
|
programs=
|
||||||
{%- set add_preceding_comma = { 'flag': False } %}
|
{%- set add_preceding_comma = { 'flag': False } %}
|
||||||
{% for vlan_name in VLAN_INTERFACE %}
|
{% for vlan_name in vlan_list %}
|
||||||
{# Append DHCPv4 agents #}
|
{% if VLAN and vlan_name in VLAN and VLAN[vlan_name]['dhcp_servers'] %}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
|
||||||
{% if add_preceding_comma.flag %},{% endif %}
|
{% if add_preceding_comma.flag %},{% endif %}
|
||||||
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
||||||
isc-dhcpv4-relay-{{ vlan_name }}
|
isc-dhcp-relayv4-{{ vlan_name }}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{# Append DHCPv6 agents #}
|
{# Append DHCPv6 agents #}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %}
|
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] %}
|
||||||
{% if add_preceding_comma.flag %},{% endif %}
|
{% if add_preceding_comma.flag %},{% endif %}
|
||||||
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
||||||
isc-dhcpv6-relay-{{ vlan_name }}
|
isc-dhcpv6-relay-{{ vlan_name }}
|
||||||
|
@ -1,40 +1,27 @@
|
|||||||
{# Append DHCPv4 agents #}
|
{# Append DHCPv4 agents #}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
{# Create a program entry for each DHCP relay agent instance #}
|
||||||
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
|
{% for vlan_name in vlan_list %}
|
||||||
{% if dhcp_server | ipv4 %}
|
{% if VLAN and vlan_name in VLAN and VLAN[vlan_name]['dhcp_servers'] %}
|
||||||
{% set _dummy = relay_for_ipv4.update({'flag': True}) %}
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
{% if relay_for_ipv4.flag %}
|
|
||||||
{% set _dummy = relay_for_ipv4.update({'flag': False}) %}
|
|
||||||
[program:isc-dhcpv4-relay-{{ vlan_name }}]
|
[program:isc-dhcpv4-relay-{{ vlan_name }}]
|
||||||
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
||||||
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id {{ vlan_name }}
|
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id {{ vlan_name }}
|
||||||
{#- Dual ToR Option #}
|
|
||||||
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %} -U Loopback0 -dt{% endif -%}
|
|
||||||
{#- si option to use intf addr in relay #}
|
|
||||||
{% if DEVICE_METADATA['localhost']['deployment_id'] == '8' %} -si{% endif -%}
|
|
||||||
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
||||||
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
|
{% for (name, prefix) in VLAN_INTERFACE %}
|
||||||
{% if prefix | ipv4 and name != vlan_name %} -iu {{ name }}{% endif -%}
|
{% if prefix | ipv4 and name != vlan_name %} -iu {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for (name, prefix) in INTERFACE|pfx_filter %}
|
{% for (name, prefix) in INTERFACE %}
|
||||||
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
|
{% for (name, prefix) in PORTCHANNEL_INTERFACE %}
|
||||||
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
|
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %} {{ dhcp_server }}{% endfor %}
|
||||||
{%- if dhcp_server | ipv4 %} {{ dhcp_server }}{% endif -%}
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
priority=3
|
priority=3
|
||||||
autostart=false
|
autostart=false
|
||||||
autorestart=false
|
autorestart=false
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=start:exited
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
|
@ -1,28 +1,25 @@
|
|||||||
{# Append DHCPv6 agents #}
|
{# Append DHCPv6 agents #}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %}
|
{# Create a program entry for each DHCPv6 relay agent instance #}
|
||||||
{% for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %}
|
{% for vlan_name in vlan_list %}
|
||||||
|
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] %}
|
||||||
{% if dhcpv6_server | ipv6 %}
|
{% if dhcpv6_server | ipv6 %}
|
||||||
{% set _dummy = relay_for_ipv6.update({'flag': True}) %}
|
{% set _dummy = relay_for_ipv6.update({'flag': True}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
|
||||||
{% if relay_for_ipv6.flag %}
|
{% if relay_for_ipv6.flag %}
|
||||||
{% set _dummy = relay_for_ipv6.update({'flag': False}) %}
|
{% set _dummy = relay_for_ipv6.update({'flag': False}) %}
|
||||||
|
{% endif %}
|
||||||
[program:isc-dhcpv6-relay-{{ vlan_name }}]
|
[program:isc-dhcpv6-relay-{{ vlan_name }}]
|
||||||
{# We treat this VLAN as a downstream interface (-l), as we only want to listen for requests #}
|
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
||||||
command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l {{ vlan_name }}
|
command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l {{ vlan_name }}
|
||||||
{#- We treat all other interfaces as upstream interfaces (-u), as we only want to listen for replies #}
|
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
||||||
{%- for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %}
|
{% for (name, prefix) in VLAN_INTERFACE %}
|
||||||
{%- if dhcpv6_server | ipv6 %}
|
{% if prefix | ipv6 and name != vlan_name %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
||||||
{%- for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
|
|
||||||
{%- if prefix | ipv6 and name != vlan_name %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for (name, prefix) in INTERFACE|pfx_filter %}
|
{% for (name, prefix) in INTERFACE %}
|
||||||
{% if prefix | ipv6 %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
|
{% for (name, prefix) in PORTCHANNEL_INTERFACE %}
|
||||||
{% if prefix | ipv6 %} -u {{ dhcpv6_server }}%%{{ name }} {% endif -%}
|
{% if prefix | ipv4 %} -iu {{ name }} {% endif -%}
|
||||||
{% endfor %}
|
|
||||||
{% endif -%}
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
priority=3
|
priority=3
|
||||||
@ -30,8 +27,6 @@ autostart=false
|
|||||||
autorestart=false
|
autorestart=false
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=start:exited
|
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endfor %}
|
||||||
|
@ -1,19 +1,11 @@
|
|||||||
[group:dhcpmon]
|
[group:dhcpmon]
|
||||||
programs=
|
programs=
|
||||||
{%- set add_preceding_comma = { 'flag': False } %}
|
{%- set add_preceding_comma = { 'flag': False } %}
|
||||||
{% set monitor_instance = { 'flag': False } %}
|
{% for vlan_name in vlan_list %}
|
||||||
{% for vlan_name in VLAN_INTERFACE %}
|
{% if VLAN and vlan_name in VLAN and VLAN[vlan_name]['dhcp_servers'] %}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
|
||||||
{% set _dummy = monitor_instance.update({'flag': True}) %}
|
|
||||||
{%- endif %}
|
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %}
|
|
||||||
{% set _dummy = monitor_instance.update({'flag': True}) %}
|
|
||||||
{%- endif %}
|
|
||||||
{% if monitor_instance.flag %}
|
|
||||||
{% if add_preceding_comma.flag %},{% endif %}
|
{% if add_preceding_comma.flag %},{% endif %}
|
||||||
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
{% set _dummy = add_preceding_comma.update({'flag': True}) %}
|
||||||
dhcpmon-{{ vlan_name }}
|
dhcpmon-{{ vlan_name }}
|
||||||
{%- set _dummy = monitor_instance.update({'flag': False}) %}
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
@ -21,9 +13,9 @@ dhcpmon-{{ vlan_name }}
|
|||||||
{# Create a program entry for each DHCP MONitor instance #}
|
{# Create a program entry for each DHCP MONitor instance #}
|
||||||
{% set relay_for_ipv4 = { 'flag': False } %}
|
{% set relay_for_ipv4 = { 'flag': False } %}
|
||||||
{% set relay_for_ipv6 = { 'flag': False } %}
|
{% set relay_for_ipv6 = { 'flag': False } %}
|
||||||
{% for vlan_name in VLAN_INTERFACE %}
|
{% for vlan_name in vlan_list %}
|
||||||
{# Check DHCPv4 agents #}
|
{# Check DHCPv4 agents #}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
{% if VLAN and vlan_name in VLAN and VLAN[vlan_name]['dhcp_servers'] %}
|
||||||
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
|
{% for dhcp_server in VLAN[vlan_name]['dhcp_servers'] %}
|
||||||
{% if dhcp_server | ipv4 %}
|
{% if dhcp_server | ipv4 %}
|
||||||
{% set _dummy = relay_for_ipv4.update({'flag': True}) %}
|
{% set _dummy = relay_for_ipv4.update({'flag': True}) %}
|
||||||
@ -31,31 +23,32 @@ dhcpmon-{{ vlan_name }}
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{# Check DHCPv6 agents #}
|
{# Check DHCPv6 agents #}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %}
|
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] %}
|
||||||
{% for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %}
|
{% for dhcpv6_server in VLAN[vlan_name]['dhcpv6_servers'] %}
|
||||||
{% if dhcpv6_server | ipv6 %}
|
{% if dhcpv6_server | ipv6 %}
|
||||||
{% set _dummy = relay_for_ipv6.update({'flag': True}) %}
|
{% set _dummy = relay_for_ipv6.update({'flag': True}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if relay_for_ipv4.flag or relay_for_ipv6.flag %}
|
{% if relay_for_ipv4.flag %}
|
||||||
|
{% set _dummy = relay_for_ipv4.update({'flag': False}) %}
|
||||||
|
{% if relay_for_ipv6.flag %}
|
||||||
|
{% set _dummy = relay_for_ipv6.update({'flag': False}) %}
|
||||||
[program:dhcpmon-{{ vlan_name }}]
|
[program:dhcpmon-{{ vlan_name }}]
|
||||||
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
{# We treat this VLAN as a downstream interface (-id), as we only want to listen for requests #}
|
||||||
command=/usr/sbin/dhcpmon -id {{ vlan_name }}
|
command=/usr/sbin/dhcpmon -id {{ vlan_name }}
|
||||||
{#- Dual ToR Option #}
|
|
||||||
{% if 'subtype' in DEVICE_METADATA['localhost'] and DEVICE_METADATA['localhost']['subtype'] == 'DualToR' %} -u Loopback0{% endif -%}
|
|
||||||
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
{#- We treat all other interfaces as upstream interfaces (-iu), as we only want to listen for replies #}
|
||||||
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter %}
|
{% for (name, prefix) in VLAN_INTERFACE %}
|
||||||
{% if prefix | ipv4 and name != vlan_name %} -iu {{ name }}{% endif -%}
|
{% if prefix | ipv4 and name != vlan_name %} -iu {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for (name, prefix) in INTERFACE|pfx_filter %}
|
{% for (name, prefix) in INTERFACE %}
|
||||||
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for (name, prefix) in PORTCHANNEL_INTERFACE|pfx_filter %}
|
{% for (name, prefix) in PORTCHANNEL_INTERFACE %}
|
||||||
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
{% if prefix | ipv4 %} -iu {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if MGMT_INTERFACE %}
|
{% if MGMT_INTERFACE %}
|
||||||
{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %}
|
{% for (name, prefix) in MGMT_INTERFACE %}
|
||||||
{% if prefix | ipv4 %} -im {{ name }}{% endif -%}
|
{% if prefix | ipv4 %} -im {{ name }}{% endif -%}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -67,8 +60,6 @@ autostart=false
|
|||||||
autorestart=false
|
autorestart=false
|
||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=
|
|
||||||
{%- if relay_for_ipv4.flag %}isc-dhcpv4-relay-{{ vlan_name }}:running {% endif %}
|
{%- if relay_for_ipv4.flag %}isc-dhcpv4-relay-{{ vlan_name }}:running {% endif %}
|
||||||
{% if relay_for_ipv6.flag %}isc-dhcpv6-relay-{{ vlan_name }}:running{% endif %}
|
{% if relay_for_ipv6.flag %}isc-dhcpv6-relay-{{ vlan_name }}:running{% endif %}
|
||||||
|
|
||||||
@ -76,4 +67,5 @@ dependent_startup_wait_for=
|
|||||||
{% set _dummy = relay_for_ipv4.update({'flag': False}) %}
|
{% set _dummy = relay_for_ipv4.update({'flag': False}) %}
|
||||||
{% set _dummy = relay_for_ipv6.update({'flag': False}) %}
|
{% set _dummy = relay_for_ipv6.update({'flag': False}) %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
@ -29,24 +29,19 @@ stderr_logfile=syslog
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% set vlan_list = d.vlan_list %}
|
{% set vlan_list = d.vlan_list %}
|
||||||
{# Count how many VLANs require a DHCP relay agent... #}
|
{# Count how many VLANs require a DHCP relay agent... #}
|
||||||
{% set ipv4_num_relays = { 'count': 0 } %}
|
{% set num_relays = { 'count': 0 } %}
|
||||||
{% set ipv6_num_relays = { 'count': 0 } %}
|
{% for vlan_name in vlan_list %}
|
||||||
{% for vlan_name in VLAN_INTERFACE %}
|
{% if VLAN and vlan_name in VLAN and VLAN[vlan_name]['dhcp_servers'] %}
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcp_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcp_servers']|length > 0 %}
|
{% set _dummy = num_relays.update({'count': num_relays.count + 1}) %}
|
||||||
{% set _dummy = ipv4_num_relays.update({'count': ipv4_num_relays.count + 1}) %}
|
|
||||||
{% endif %}
|
|
||||||
{% if VLAN and vlan_name in VLAN and 'dhcpv6_servers' in VLAN[vlan_name] and VLAN[vlan_name]['dhcpv6_servers']|length > 0 %}
|
|
||||||
{% set _dummy = ipv6_num_relays.update({'count': ipv6_num_relays.count + 1}) %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{# If one or more of the VLANs require a DHCP relay agent... #}
|
{# If one or more of the VLANs require a DHCP relay agent... #}
|
||||||
{% if ipv4_num_relays.count > 0 or ipv6_num_relays.count > 0 %}
|
{% if num_relays.count > 0 %}
|
||||||
{% include 'dhcp-relay.programs.j2' %}
|
{% include 'dhcp-relay.programs.j2' %}
|
||||||
|
|
||||||
|
|
||||||
{# Create a program entry for each DHCP relay agent instance #}
|
|
||||||
{% set relay_for_ipv4 = { 'flag': False } %}
|
{% set relay_for_ipv4 = { 'flag': False } %}
|
||||||
{% set relay_for_ipv6 = { 'flag': False } %}
|
{% set relay_for_ipv6 = { 'flag': False } %}
|
||||||
|
|
||||||
{% for vlan_name in VLAN_INTERFACE %}
|
{% for vlan_name in VLAN_INTERFACE %}
|
||||||
{% include 'dhcpv4-relay.agents.j2' %}
|
{% include 'dhcpv4-relay.agents.j2' %}
|
||||||
{% include 'dhcpv6-relay.agents.j2' %}
|
{% include 'dhcpv6-relay.agents.j2' %}
|
||||||
@ -54,4 +49,4 @@ stderr_logfile=syslog
|
|||||||
|
|
||||||
{% include 'dhcpv6-relay.monitors.j2' %}
|
{% include 'dhcpv6-relay.monitors.j2' %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
@ -20,9 +20,9 @@ stdout_logfile=syslog
|
|||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
|
||||||
[group:isc-dhcp-relay]
|
[group:isc-dhcp-relay]
|
||||||
programs=isc-dhcp-relay-Vlan1000
|
programs=isc-dhcp-relayv4-Vlan1000,isc-dhcpv6-relay-Vlan1000
|
||||||
|
|
||||||
[program:isc-dhcp-relay-Vlan1000]
|
[program:isc-dhcpv4-relay-Vlan1000]
|
||||||
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2
|
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2
|
||||||
priority=3
|
priority=3
|
||||||
autostart=false
|
autostart=false
|
||||||
@ -30,6 +30,14 @@ autorestart=false
|
|||||||
stdout_logfile=syslog
|
stdout_logfile=syslog
|
||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
[program:isc-dhcpv6-relay-Vlan1000]
|
||||||
|
command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l Vlan1000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04
|
||||||
|
priority=3
|
||||||
|
autostart=false
|
||||||
|
autorestart=false
|
||||||
|
stdout_logfile=syslog
|
||||||
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
|
||||||
[group:dhcpmon]
|
[group:dhcpmon]
|
||||||
programs=dhcpmon-Vlan1000
|
programs=dhcpmon-Vlan1000
|
||||||
@ -43,4 +51,3 @@ stdout_logfile=syslog
|
|||||||
stderr_logfile=syslog
|
stderr_logfile=syslog
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,79 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
logfile_maxbytes=1MB
|
|
||||||
logfile_backups=2
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[eventlistener:dependent-startup]
|
|
||||||
command=python3 -m supervisord_dependent_startup
|
|
||||||
autostart=true
|
|
||||||
autorestart=unexpected
|
|
||||||
startretries=0
|
|
||||||
exitcodes=0,3
|
|
||||||
events=PROCESS_STATE
|
|
||||||
buffer_size=1024
|
|
||||||
|
|
||||||
[eventlistener:supervisor-proc-exit-listener]
|
|
||||||
command=/usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay
|
|
||||||
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
|
|
||||||
autostart=true
|
|
||||||
autorestart=unexpected
|
|
||||||
buffer_size=1024
|
|
||||||
|
|
||||||
[program:rsyslogd]
|
|
||||||
command=/usr/sbin/rsyslogd -n -iNONE
|
|
||||||
priority=1
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
|
|
||||||
[program:start]
|
|
||||||
command=/usr/bin/start.sh
|
|
||||||
priority=2
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
startsecs=0
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=rsyslogd:running
|
|
||||||
|
|
||||||
[group:isc-dhcp-relay]
|
|
||||||
programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv6-relay-Vlan1000
|
|
||||||
|
|
||||||
[program:isc-dhcpv4-relay-Vlan1000]
|
|
||||||
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 192.0.0.1 192.0.0.2
|
|
||||||
priority=3
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=start:exited
|
|
||||||
|
|
||||||
[program:isc-dhcpv6-relay-Vlan1000]
|
|
||||||
command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l Vlan1000 -u fc02:2000::1%%PortChannel04 -u fc02:2000::1%%PortChannel03 -u fc02:2000::1%%PortChannel01 -u fc02:2000::1%%PortChannel02 -u fc02:2000::2%%PortChannel04 -u fc02:2000::2%%PortChannel03 -u fc02:2000::2%%PortChannel01 -u fc02:2000::2%%PortChannel02
|
|
||||||
priority=3
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=start:exited
|
|
||||||
|
|
||||||
|
|
||||||
[group:dhcpmon]
|
|
||||||
programs=dhcpmon-Vlan1000
|
|
||||||
|
|
||||||
[program:dhcpmon-Vlan1000]
|
|
||||||
command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -iu PortChannel01 -im eth0 -4 -6
|
|
||||||
priority=4
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running isc-dhcpv6-relay-Vlan1000:running
|
|
||||||
|
|
||||||
|
|
@ -1,79 +0,0 @@
|
|||||||
[supervisord]
|
|
||||||
logfile_maxbytes=1MB
|
|
||||||
logfile_backups=2
|
|
||||||
nodaemon=true
|
|
||||||
|
|
||||||
[eventlistener:dependent-startup]
|
|
||||||
command=python3 -m supervisord_dependent_startup
|
|
||||||
autostart=true
|
|
||||||
autorestart=unexpected
|
|
||||||
startretries=0
|
|
||||||
exitcodes=0,3
|
|
||||||
events=PROCESS_STATE
|
|
||||||
buffer_size=1024
|
|
||||||
|
|
||||||
[eventlistener:supervisor-proc-exit-listener]
|
|
||||||
command=/usr/bin/supervisor-proc-exit-listener --container-name dhcp_relay
|
|
||||||
events=PROCESS_STATE_EXITED,PROCESS_STATE_RUNNING
|
|
||||||
autostart=true
|
|
||||||
autorestart=unexpected
|
|
||||||
buffer_size=1024
|
|
||||||
|
|
||||||
[program:rsyslogd]
|
|
||||||
command=/usr/sbin/rsyslogd -n -iNONE
|
|
||||||
priority=1
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
|
|
||||||
[program:start]
|
|
||||||
command=/usr/bin/start.sh
|
|
||||||
priority=2
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
startsecs=0
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=rsyslogd:running
|
|
||||||
|
|
||||||
[group:isc-dhcp-relay]
|
|
||||||
programs=isc-dhcpv4-relay-Vlan1000,isc-dhcpv6-relay-Vlan1000
|
|
||||||
|
|
||||||
[program:isc-dhcpv4-relay-Vlan1000]
|
|
||||||
command=/usr/sbin/dhcrelay -d -m discard -a %%h:%%p %%P --name-alias-map-file /tmp/port-name-alias-map.txt -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 192.0.0.1 192.0.0.2
|
|
||||||
priority=3
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=start:exited
|
|
||||||
|
|
||||||
[program:isc-dhcpv6-relay-Vlan1000]
|
|
||||||
command=/usr/sbin/dhcrelay -d -6 --name-alias-map-file /tmp/port-name-alias-map.txt -l Vlan1000 -u fc02:2000::1%%PortChannel01 -u fc02:2000::1%%PortChannel02 -u fc02:2000::1%%PortChannel03 -u fc02:2000::1%%PortChannel04 -u fc02:2000::2%%PortChannel01 -u fc02:2000::2%%PortChannel02 -u fc02:2000::2%%PortChannel03 -u fc02:2000::2%%PortChannel04
|
|
||||||
priority=3
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=start:exited
|
|
||||||
|
|
||||||
|
|
||||||
[group:dhcpmon]
|
|
||||||
programs=dhcpmon-Vlan1000
|
|
||||||
|
|
||||||
[program:dhcpmon-Vlan1000]
|
|
||||||
command=/usr/sbin/dhcpmon -id Vlan1000 -iu Vlan2000 -iu PortChannel01 -iu PortChannel02 -iu PortChannel03 -iu PortChannel04 -im eth0 -4 -6
|
|
||||||
priority=4
|
|
||||||
autostart=false
|
|
||||||
autorestart=false
|
|
||||||
stdout_logfile=syslog
|
|
||||||
stderr_logfile=syslog
|
|
||||||
dependent_startup=true
|
|
||||||
dependent_startup_wait_for=isc-dhcpv4-relay-Vlan1000:running isc-dhcpv6-relay-Vlan1000:running
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user