sonic-buildimage/dockers/docker-router-advertiser/radvd.conf.j2
kellyyeh 017547dad3
[201911][radv] Support multiple ipv6 prefixes per vlan interface and change radv interval to 3min (#10016)
* [radv] Support multiple ipv6 prefixes per vlan interface (#9934)
* Radvd.conf.j2 template creates two copies of the vlan interface when there are more than one ipv6 address assigned to a single vlan interface. Changed the format to add prefixes under the same vlan interface block.
2022-02-18 07:40:55 -08:00

50 lines
1.4 KiB
Django/Jinja

{% block banner %}
# =========== Managed by sonic-cfggen -- DO NOT edit manually! ====================
# Generated by /usr/share/sonic/templates/radvd.conf.j2 using config DB data
# File: /etc/radvd.conf
#
{% endblock banner %}
# Config file for radvd, the router advertisement daemon
# See man page for radvd.conf for descriptions of all available options
#
{# If our configuration has VLAN interfaces... #}
{% if VLAN_INTERFACE %}
{% set vlan_list = dict() %}
{% for (name,prefix) in VLAN_INTERFACE|pfx_filter %}
{% if name is not in vlan_list and prefix | ipv6 %}
{% set prefix_list = [] %}
{% set _ = vlan_list.update({name: prefix_list}) %}
{% endif %}
{% if prefix | ipv6 %}
{# If our configuration has VLAN interfaces... #}
{% set prefix_list = vlan_list.get(name) %}
{% set _ = prefix_list.append(prefix) %}
{% set _ = vlan_list.update({name: prefix_list}) %}
{% endif %}
{% endfor %}
{% endif %}
{% for name, prefixes in vlan_list.items() %}
interface {{ name }}
{
IgnoreIfMissing on;
AdvSendAdvert on;
MinRtrAdvInterval 60;
MaxRtrAdvInterval 180;
AdvManagedFlag on;
AdvOtherConfigFlag off;
AdvLinkMTU 9100;
AdvHomeAgentFlag off;
{% for prefix in prefixes %}
prefix {{ prefix | network }}/{{ prefix | prefixlen }} {
AdvOnLink on;
AdvAutonomous off;
AdvRouterAddr off;
AdvValidLifetime infinity;
AdvPreferredLifetime infinity;
};
{% endfor %}
};
{% endfor %}