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