diff --git a/gestion/gen_confs/switch_conf.tpl b/gestion/gen_confs/switch_conf.tpl index bef331d9..9f2078ec 100644 --- a/gestion/gen_confs/switch_conf.tpl +++ b/gestion/gen_confs/switch_conf.tpl @@ -80,7 +80,10 @@ dhcp-snooping authorized-server {{ s }} ; Activation dhcp-snooping {%- endif %} - +{% if ra_filter %};--- RA guards --- +ipv6 ra-guard ports {{ non_trusted }} +no ipv6 ra-guard ports {{ trusted }} +{% endif %} ;--- Config des prises --- {%- for port in ports %} {%- if port.radius_auth() %} diff --git a/gestion/gen_confs/switchs2.py b/gestion/gen_confs/switchs2.py index 331d0efc..d9aa966a 100755 --- a/gestion/gen_confs/switchs2.py +++ b/gestion/gen_confs/switchs2.py @@ -520,6 +520,12 @@ def conf_switch(hostname): first = netaddr.IPNetwork(net_of_vlan_name(vname)[0]).first data['dhcp_servers'].append(str(netaddr.IPAddress(first + rid))) + # Ra gards ne concerne que les 2620 + if "2620" in switch['info'][0].value: + data['ra_filter'] = True + else: + data['ra_filter'] = False + # Switch avec des ports gigabit uniquement if imodel in GIGABIT_MODELS: data['gigabit'] = True