Configure les ip sur tous les vlans

This commit is contained in:
chirac 2018-07-12 01:20:11 +02:00
parent 8a4212c101
commit ab37b30b3c

View file

@ -44,16 +44,16 @@ vlan {{ id }}
{%- if vlan["ports_untagged"] %} {%- if vlan["ports_untagged"] %}
untagged {{ vlan["ports_untagged"]|join(',') }} untagged {{ vlan["ports_untagged"]|join(',') }}
{%- endif %} {%- endif %}
{%- if switch.subnet.0.vlan_id == id %} {%- for ipv4, subnet in switch.interfaces_subnet.items() %}
ip address {{ switch.ipv4 }}/{{ switch.subnet.0.netmask_cidr }} {%- if subnet.0.vlan_id == id %}
{%- else %} ip address {{ ipv4 }}/{{ subnet.0.netmask_cidr }}
no ip address
{%- endif %} {%- endif %}
{%- if switch.subnet.0.vlan_id == id %} {%- endfor %}
ipv6 address {{ switch.ipv6 }}/{{ switch.subnet6.netmask_cidr }} {%- for ipv6, subnet6 in switch.interfaces6_subnet.items() %}
{%- else %} {%- if subnet6.vlan_id == id %}
no ipv6 enable ipv6 address {{ ipv6 }}/{{ subnet6.netmask_cidr }}
{%- endif %} {%- endif %}
{%- endfor %}
{%- if id in additionals.igmp_vlans %} {%- if id in additionals.igmp_vlans %}
ip igmp ip igmp
no ip igmp querier no ip igmp querier