Commit 54c84b8e authored by Gabriel Detraz's avatar Gabriel Detraz

Adapte la config v6 pour les 2910-al + désactive arp-protect bornes

parent 993f9e0e
...@@ -9,7 +9,7 @@ ALL_FEATURES = [ ...@@ -9,7 +9,7 @@ ALL_FEATURES = [
'POE', 'DHCP_SNOOPING', 'IPv6_MGMT', 'RA_GUARD', 'POE', 'DHCP_SNOOPING', 'IPv6_MGMT', 'RA_GUARD',
'MLD_SNOOPING', 'SNTP_NEW_SYNTAX', 'GIGABIT', 'OOBM', 'MLD_SNOOPING', 'SNTP_NEW_SYNTAX', 'GIGABIT', 'OOBM',
'FILTER_MDNS', 'RADIUS_DAE', 'DHCPv6_SNOOPING', 'IGMP_SNOOPING', 'FILTER_MDNS', 'RADIUS_DAE', 'DHCPv6_SNOOPING', 'IGMP_SNOOPING',
'ARP_PROTECT', 'ARP_PROTECT', 'IPv6_LOGGING',
] ]
# Support du PoE(+) # Support du PoE(+)
...@@ -33,6 +33,9 @@ RA_GUARD = "RA Guard" ...@@ -33,6 +33,9 @@ RA_GUARD = "RA Guard"
# Management en IPv6 # Management en IPv6
IPv6_MGMT = "IPv6 Management" IPv6_MGMT = "IPv6 Management"
# Logs over ipv6
IPv6_LOGGING = "Ipv6 logging"
# Support du MLD snooping # Support du MLD snooping
MLD_SNOOPING = "MLD Snooping" MLD_SNOOPING = "MLD Snooping"
...@@ -93,7 +96,7 @@ HP_PROCURVE_MAP = { ...@@ -93,7 +96,7 @@ HP_PROCURVE_MAP = {
'firmware' : "W.15.14.0016", 'firmware' : "W.15.14.0016",
'features' : [ 'features' : [
IPv6_MGMT, IGMP_SNOOPING, DHCP_SNOOPING, RA_GUARD, IPv6_MGMT, IGMP_SNOOPING, DHCP_SNOOPING, RA_GUARD,
MLD_SNOOPING, GIGABIT, SNTP_NEW_SYNTAX, RADIUS_DAE, GIGABIT, SNTP_NEW_SYNTAX, RADIUS_DAE,
FILTER_MDNS, ARP_PROTECT, FILTER_MDNS, ARP_PROTECT,
], ],
'modules' : ["J9145A"], 'modules' : ["J9145A"],
...@@ -105,7 +108,7 @@ HP_PROCURVE_MAP = { ...@@ -105,7 +108,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD, IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD,
MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RADIUS_DAE, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RADIUS_DAE,
FILTER_MDNS, ARP_PROTECT, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
}, },
"J9624" : { "J9624" : {
...@@ -114,7 +117,7 @@ HP_PROCURVE_MAP = { ...@@ -114,7 +117,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING, IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING,
RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX,
RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
'sfp' : range(27, 29), 'sfp' : range(27, 29),
'poe' : range(1, 13), 'poe' : range(1, 13),
...@@ -125,7 +128,7 @@ HP_PROCURVE_MAP = { ...@@ -125,7 +128,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD, IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD,
MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RADIUS_DAE, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RADIUS_DAE,
FILTER_MDNS, ARP_PROTECT, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
}, },
"J9727" : { "J9727" : {
...@@ -134,7 +137,7 @@ HP_PROCURVE_MAP = { ...@@ -134,7 +137,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING, IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING,
RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX,
GIGABIT, OOBM, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, GIGABIT, OOBM, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
'modules' : ["J9727A"], 'modules' : ["J9727A"],
'sfp' : range(21, 25), 'sfp' : range(21, 25),
...@@ -146,7 +149,7 @@ HP_PROCURVE_MAP = { ...@@ -146,7 +149,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING, IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING,
RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX,
GIGABIT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, GIGABIT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
'sfp' : range(49, 53), 'sfp' : range(49, 53),
'poe' : range(1, 53), 'poe' : range(1, 53),
...@@ -157,7 +160,8 @@ HP_PROCURVE_MAP = { ...@@ -157,7 +160,8 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING, IPv6_MGMT, POE, DHCP_SNOOPING, DHCPv6_SNOOPING,
RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, RA_GUARD, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX,
GIGABIT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, GIGABIT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
'sfp' : range(25, 29), 'sfp' : range(25, 29),
'poe' : range(1, 25), 'poe' : range(1, 25),
...@@ -168,7 +172,7 @@ HP_PROCURVE_MAP = { ...@@ -168,7 +172,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD, IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD,
MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, GIGABIT, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, GIGABIT,
RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
'sfp' : range(49, 53), 'sfp' : range(49, 53),
}, },
...@@ -178,7 +182,7 @@ HP_PROCURVE_MAP = { ...@@ -178,7 +182,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD, IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD,
MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, GIGABIT, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, GIGABIT,
RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
'sfp' : range(25, 29), 'sfp' : range(25, 29),
}, },
...@@ -188,7 +192,7 @@ HP_PROCURVE_MAP = { ...@@ -188,7 +192,7 @@ HP_PROCURVE_MAP = {
'features' : [ 'features' : [
IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD, IPv6_MGMT, DHCP_SNOOPING, DHCPv6_SNOOPING, RA_GUARD,
MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, GIGABIT, MLD_SNOOPING, IGMP_SNOOPING, SNTP_NEW_SYNTAX, GIGABIT,
RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, RADIUS_DAE, FILTER_MDNS, ARP_PROTECT, IPv6_LOGGING,
], ],
'sfp' : range(9, 11), 'sfp' : range(9, 11),
}, },
......
...@@ -35,7 +35,7 @@ console inactivity-timer 30 ...@@ -35,7 +35,7 @@ console inactivity-timer 30
;--- Logs --- ;--- Logs ---
{%- for server in log_servers %} {%- for server in log_servers %}
logging {{ server|ipv4 }} logging {{ server|ipv4 }}
{%- if IPv6_MGMT in features %} {%- if IPv6_MGMT in features and IPv6_LOGGING in features %}
logging {{ server|ipv6 }} logging {{ server|ipv6 }}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
...@@ -163,9 +163,9 @@ interface {{ port.num }} ...@@ -163,9 +163,9 @@ interface {{ port.num }}
{%- if DHCP_SNOOPING in features %} {%- if DHCP_SNOOPING in features %}
dhcp-snooping trust dhcp-snooping trust
{%- endif %} {%- endif %}
{%- if ARP_PROTECT in features %}
arp-protect trust
{%- endif %} {%- endif %}
{%- if ARP_PROTECT in features and port.arp_protect_trust %}
arp-protect trust
{%- endif %} {%- endif %}
{%- if port.trusted and DHCPv6_SNOOPING in features %} {%- if port.trusted and DHCPv6_SNOOPING in features %}
dhcpv6-snooping trust dhcpv6-snooping trust
......
...@@ -316,6 +316,12 @@ class Port(object): ...@@ -316,6 +316,12 @@ class Port(object):
"""Indique si le PoE doit être actif sur ce port""" """Indique si le PoE doit être actif sur ce port"""
return self.poe and (self.poe_enabled or self.bornes) return self.poe and (self.poe_enabled or self.bornes)
@property
def arp_protect_trust(self):
"""Indique si on active la protection arp.
Désactivé sur nos prises ainsi que sur le wifi (because roaming)"""
return self.bornes or self.trusted
@property @property
def poe_level(self): def poe_level(self):
"""Indique la priorité accordée à ce port PoE""" """Indique la priorité accordée à ce port PoE"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment