exit: enable forwarding directed broadcasts for WoL
Must be set in IPv4 sysctls for all interfaces and every input interface from which broadcasts are sent. These are the virtual MLAG interfaces (bridge-*-v0), which are created dynamically. We enable directed broadcasts for (only MLAG) interfaces enumerated by the ifaces_directed_broadcast value in NetBox device local context.
This commit is contained in:
parent
6322d5ec97
commit
ae1cfd5337
2
roles/exit/files/sysctl.conf
Normal file
2
roles/exit/files/sysctl.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
# enable directed broadcasts for WoL, must also be enabled on input interfaces to take effect
|
||||
net.ipv4.conf.all.bc_forwarding = 1
|
|
@ -1,3 +1,8 @@
|
|||
- name: Set up sysctls
|
||||
copy:
|
||||
dest: /etc/sysctl.d/local-exit.conf
|
||||
src: sysctl.conf
|
||||
|
||||
- name: Set up networks
|
||||
template:
|
||||
dest: /etc/network/interfaces.d/networks.intf
|
||||
|
|
|
@ -47,6 +47,10 @@ iface {{ iface.name }}
|
|||
{% set fhrp_assignment = fhrp_assignments | selectattr('interface.id', '==', iface.id) | first %}
|
||||
{% set fhrp_group = fhrp_groups | selectattr('id', '==', fhrp_assignment.group.id) | first %}
|
||||
address-virtual 00:00:5e:00:01:01 {{ fhrp_group.ip_addresses | sort(attribute='family.value') | map(attribute='address') | join(' ') }}
|
||||
{% if iface.name in ifaces_directed_broadcast|default([]) %}
|
||||
{# Enable directed broadcast forwarding from this interface for WoL. #}
|
||||
post-up echo 1 > /proc/sys/net/ipv4/conf/{{ iface.name | replace('.', '-') }}-v0/bc_forwarding
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue