File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
netsim/ansible/templates/gateway Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 22#
33set -e # Exit immediately when any command fails
44#
5+ sysctl -w net.ipv6.conf.all.enhanced_dad=0
6+ sysctl -w net.ipv6.conf.default.enhanced_dad=0
57{% for intf in interfaces if intf.gateway.protocol| default(' none' ) == ' vrrp' %}
68{% for afm in [' ipv4' ,' ipv6' ] if afm in intf.gateway %}
79{% set v_if = ' vrrp%s-%s-%s' | format(' 6' if afm == ' ipv6' else ' ' ,intf.ifindex,intf.gateway.vrrp.group) %}
@@ -29,13 +31,17 @@ if [ ! -e /sys/class/net/{{ v_if }} ]; then
2931{% for afm in [' ipv4' ,' ipv6' ] if afm in intf.gateway %}
3032 ip addr add {{ intf.gateway[afm] }} dev {{ v_if }} metric 1024
3133{% endfor %}
32- sysctl -w net.ipv6.conf.all.enhanced_dad=0
33- sysctl -w net.ipv6.conf.default.enhanced_dad=0
34+ {% if ' ipv4' in intf.gateway %}
3435 sysctl -w net.ipv4.conf.{{ intf.ifname }}.arp_announce=1
3536 sysctl -w net.ipv4.conf.{{ intf.ifname }}.arp_ignore=2
37+ {% endif %}
38+ {% if ' ipv6' in intf.gateway %}
3639 sysctl -w net.ipv6.conf.{{ v_if }}.enhanced_dad=0
3740 sysctl -w net.ipv6.conf.{{ v_if }}.accept_dad=0
3841 sysctl -w net.ipv6.conf.{{ v_if }}.dad_transmits=0
42+ {% else %}
43+ sysctl -w net.ipv6.conf.{{ v_if }}.disable_ipv6=1
44+ {% endif %}
3945 ip link set dev {{ v_if }} up
4046fi
4147{% endfor %}
You can’t perform that action at this time.
0 commit comments