Commit ab37b30b authored by chirac's avatar chirac

Configure les ip sur tous les vlans

parent 8a4212c1
......@@ -43,17 +43,17 @@ vlan {{ id }}
{%- endif %}
{%- if vlan["ports_untagged"] %}
untagged {{ vlan["ports_untagged"]|join(',') }}
{%- endif %}
{%- 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 %}
ip address {{ switch.ipv4 }}/{{ switch.subnet.0.netmask_cidr }}
{%- else %}
no ip address
{%- 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
......
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