[FRR]: Aligned configs for unified/separated modes. (#2987)
* [FRR]: Aligned configs for unified/separated modes. * Fixed IPv6 neighbors issue: #2986 Signed-off-by: Nazarii Hnydyn <nazariig@mellanox.com>
This commit is contained in:
parent
0f665bdd06
commit
ee7b4a20e5
@ -77,6 +77,12 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||
{% endif %}
|
||||
neighbor {{ neighbor_addr }} activate
|
||||
neighbor {{ neighbor_addr }} soft-reconfiguration inbound
|
||||
{% if bgp_session['rrclient'] | int != 0 %}
|
||||
neighbor {{ neighbor_addr }} route-reflector-client
|
||||
{% endif %}
|
||||
{% if bgp_session['nhopself'] | int != 0 %}
|
||||
neighbor {{ neighbor_addr }} next-hop-self
|
||||
{% endif %}
|
||||
maximum-paths 64
|
||||
exit-address-family
|
||||
{% endif %}
|
||||
@ -87,6 +93,15 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||
{% endif %}
|
||||
neighbor {{ neighbor_addr }} activate
|
||||
neighbor {{ neighbor_addr }} soft-reconfiguration inbound
|
||||
{% if bgp_session['rrclient'] | int != 0 %}
|
||||
neighbor {{ neighbor_addr }} route-reflector-client
|
||||
{% endif %}
|
||||
{% if bgp_session['nhopself'] | int != 0 %}
|
||||
neighbor {{ neighbor_addr }} next-hop-self
|
||||
{% endif %}
|
||||
{% if bgp_session['asn'] != DEVICE_METADATA['localhost']['bgp_asn'] %}
|
||||
neighbor {{ neighbor_addr }} route-map set-next-hop-global-v6 in
|
||||
{% endif %}
|
||||
maximum-paths 64
|
||||
exit-address-family
|
||||
{% endif %}
|
||||
@ -138,3 +153,6 @@ route-map ISOLATE permit 10
|
||||
set as-path prepend {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||
{% endif %}
|
||||
!
|
||||
route-map set-next-hop-global-v6 permit 10
|
||||
set ipv6 next-hop prefer-global
|
||||
!
|
||||
|
@ -7,12 +7,12 @@ CONFIG_TYPE=`sonic-cfggen -d -v 'DEVICE_METADATA["localhost"]["docker_routing_co
|
||||
if [ -z "$CONFIG_TYPE" ] || [ "$CONFIG_TYPE" == "separated" ]; then
|
||||
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/frr/bgpd.conf
|
||||
sonic-cfggen -d -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/frr/zebra.conf
|
||||
touch /etc/frr/vtysh.conf
|
||||
echo "no service integrated-vtysh-config" > /etc/frr/vtysh.conf
|
||||
rm -f /etc/frr/frr.conf
|
||||
elif [ "$CONFIG_TYPE" == "unified" ]; then
|
||||
sonic-cfggen -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/frr.conf.j2 >/etc/frr/frr.conf
|
||||
echo "service integrated-vtysh-config" > /etc/frr/vtysh.conf
|
||||
rm -f /etc/frr/bgpd.conf /etc/frr/vtysh.conf
|
||||
rm -f /etc/frr/bgpd.conf /etc/frr/zebra.conf
|
||||
fi
|
||||
|
||||
sonic-cfggen -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
|
||||
|
Reference in New Issue
Block a user