Get port -> get_port_profile + supprime l'unauth vlan id

master
detraz 5 years ago
parent 4d0219b691
commit cc221f9d03

@ -138,20 +138,19 @@ ipv6 ra-guard ports {{ additionals.ra_guarded|join(',')}}
{%- endif %} {%- endif %}
;--- Config des prises --- ;--- Config des prises ---
{%- for port in switch.ports %} {%- for port in switch.ports %}
{%- if port.get_port_profil.radius_type == "802.1X" %} {%- if port.get_port_profile.radius_type == "802.1X" %}
aaa port-access authenticator {{ port.port }} aaa port-access authenticator {{ port.port }}
{%- if port.get_port_profil.mac_limit %} {%- if port.get_port_profile.mac_limit %}
aaa port-access authenticator {{ port.port }} client-limit {{ port.get_port_profil.mac_limit }} aaa port-access authenticator {{ port.port }} client-limit {{ port.get_port_profile.mac_limit }}
{%- endif %} {%- endif %}
aaa port-access authenticator {{ port.port }} logoff-period 3600 aaa port-access authenticator {{ port.port }} logoff-period 3600
{%- endif %} {%- endif %}
{%- if port.get_port_profil.radius_type == "MAC-radius" %} {%- if port.get_port_profile.radius_type == "MAC-radius" %}
aaa port-access mac-based {{ port.port }} aaa port-access mac-based {{ port.port }}
{%- if port.get_port_profil.mac_limit %} {%- if port.get_port_profile.mac_limit %}
aaa port-access mac-based {{ port.port }} addr-limit {{ port.get_port_profil.mac_limit }} aaa port-access mac-based {{ port.port }} addr-limit {{ port.get_port_profile.mac_limit }}
{%- endif %} {%- endif %}
aaa port-access mac-based {{ port.port }} logoff-period 3600 aaa port-access mac-based {{ port.port }} logoff-period 3600
aaa port-access mac-based {{ port.port }} unauth-vid 1
{%- endif %} {%- endif %}
interface {{ port.port }} interface {{ port.port }}
{%- if port.state %} {%- if port.state %}
@ -160,20 +159,20 @@ interface {{ port.port }}
disable disable
{%- endif %} {%- endif %}
name "{{ port.pretty_name }}" name "{{ port.pretty_name }}"
{%- if port.get_port_profil.flow_control %} {%- if port.get_port_profile.flow_control %}
flow-control flow-control
{%- endif %} {%- endif %}
{%- if not port.get_port_profil.dhcp_snooping %} {%- if not port.get_port_profile.dhcp_snooping %}
dhcp-snooping trust dhcp-snooping trust
{%- endif %} {%- endif %}
{%- if not port.get_port_profil.arp_protect %} {%- if not port.get_port_profile.arp_protect %}
arp-protect trust arp-protect trust
{%- endif %} {%- endif %}
{%- if not port.get_port_profil.dhcpv6_snooping %} {%- if not port.get_port_profile.dhcpv6_snooping %}
dhcpv6-snooping trust dhcpv6-snooping trust
{%- endif %} {%- endif %}
{%- if port.get_port_profil.speed != "auto" %} {%- if port.get_port_profile.speed != "auto" %}
speed-duplex {{port.get_port_profil.speed}} speed-duplex {{port.get_port_profile.speed}}
{%- endif %} {%- endif %}
no lacp no lacp
exit exit

Loading…
Cancel
Save