2024-04-28 08:59:32 +00:00
|
|
|
{% set dhcp_vlans = vrf_prefixes | selectattr('custom_fields.dhcp_ranges')
|
|
|
|
| map(attribute='vlan.vid') | sort -%}
|
2023-12-18 10:22:14 +00:00
|
|
|
|
|
|
|
# What servers should the DHCP relay forward requests to?
|
|
|
|
SERVERS="{{ dhcp }}"
|
|
|
|
|
|
|
|
# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests?
|
|
|
|
# Always include the interface towards the DHCP server.
|
|
|
|
# This variable requires a -i for each interface configured above.
|
|
|
|
# This will be used in the actual dhcrelay command
|
|
|
|
# For example, "-i eth0 -i eth1"
|
2024-04-10 12:03:50 +00:00
|
|
|
INTF_CMD="{{ interfaces | selectattr('parent') | selectattr('parent.name', '==', 'bridge')
|
2024-04-28 08:59:32 +00:00
|
|
|
| selectattr('untagged_vlan') | selectattr('untagged_vlan.vid', 'in', dhcp_vlans)
|
2024-04-10 12:03:50 +00:00
|
|
|
| map(attribute='name') | sort | map('regex_replace', '^', '-id ') | join(' ') }} -iu {{ iface_uplink }} -iu peerlink.4"
|
2023-12-18 10:22:14 +00:00
|
|
|
|
|
|
|
# Additional options that are passed to the DHCP relay daemon?
|
|
|
|
OPTIONS="-U outside"
|