diff --git a/dockers/docker-fpm-frr/frr/frr.conf.j2 b/dockers/docker-fpm-frr/frr/frr.conf.j2 index 99900790366c..11878f8db9aa 100644 --- a/dockers/docker-fpm-frr/frr/frr.conf.j2 +++ b/dockers/docker-fpm-frr/frr/frr.conf.j2 @@ -13,8 +13,6 @@ agentx ! {% include "zebra/zebra.interfaces.conf.j2" %} ! -{% include "staticd/staticd.default_route.conf.j2" %} -! {% include "staticd/staticd.loopback_route.conf.j2" %} ! {% include "bgpd/bgpd.main.conf.j2" %} diff --git a/dockers/docker-fpm-frr/frr/staticd/staticd.conf.j2 b/dockers/docker-fpm-frr/frr/staticd/staticd.conf.j2 index 4831325276c7..6d00ac6609c7 100644 --- a/dockers/docker-fpm-frr/frr/staticd/staticd.conf.j2 +++ b/dockers/docker-fpm-frr/frr/staticd/staticd.conf.j2 @@ -8,7 +8,5 @@ ! {% include "common/daemons.common.conf.j2" %} ! -{% include "staticd.default_route.conf.j2" %} -! {% include "staticd.loopback_route.conf.j2" %} ! diff --git a/dockers/docker-fpm-frr/frr/staticd/staticd.default_route.conf.j2 b/dockers/docker-fpm-frr/frr/staticd/staticd.default_route.conf.j2 deleted file mode 100644 index 22d61ebbd0ff..000000000000 --- a/dockers/docker-fpm-frr/frr/staticd/staticd.default_route.conf.j2 +++ /dev/null @@ -1,10 +0,0 @@ -! -{% block default_route %} -! set static default route to mgmt gateway as a backup to learned default -{% for (name, prefix) in MGMT_INTERFACE|pfx_filter %} -{% if prefix | ipv4 %} -ip route 0.0.0.0/0 {{ MGMT_INTERFACE[(name, prefix)]['gwaddr'] }} 200 -{% endif %} -{% endfor %} -{% endblock default_route %} -! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf index e977d2b5cffc..a43da1beedaf 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/frr.conf.j2/all.conf @@ -32,10 +32,6 @@ link-detect ! !! ! -! set static default route to mgmt gateway as a backup to learned default -ip route 0.0.0.0/0 10.10.10.1 200 -!! -! ! add static ipv6 /64 loopback route to allow bgpd to advertise the loopback route prefix ipv6 route fc00::/64 Loopback0 !! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf index 59bbe983af76..0a2a7d4effba 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf @@ -14,8 +14,6 @@ log facility local4 ! ! end of template: common/daemons.common.conf.j2! ! -! set static default route to mgmt gateway as a backup to learned default -ip route 0.0.0.0/0 10.10.10.1 200 !! ! ! add static ipv6 /64 loopback route to allow bgpd to advertise the loopback route prefix diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf.json index 0cbd67c7ef68..3b46cc276aee 100644 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf.json +++ b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.conf.json @@ -4,11 +4,6 @@ "hostname": "new_hostname" } }, - "MGMT_INTERFACE": { - "eth0|10.10.10.10/24": { - "gwaddr": "10.10.10.1" - } - }, "LOOPBACK_INTERFACE": { "Loopback0|FC00:1::32/128": {} } diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.default_route.conf b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.default_route.conf deleted file mode 100644 index 11adb98ebc3c..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.default_route.conf +++ /dev/null @@ -1,4 +0,0 @@ -! -! set static default route to mgmt gateway as a backup to learned default -ip route 0.0.0.0/0 10.10.10.1 200 -! diff --git a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.default_route.conf.json b/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.default_route.conf.json deleted file mode 100644 index 80cd218a790e..000000000000 --- a/src/sonic-bgpcfgd/tests/data/sonic-cfggen/staticd/staticd.default_route.conf.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "MGMT_INTERFACE": { - "eth0|10.10.10.10/24": { - "gwaddr": "10.10.10.1" - } - } -} diff --git a/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py b/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py index a9c93749d5c4..c11ddafa4838 100644 --- a/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py +++ b/src/sonic-bgpcfgd/tests/test_sonic-cfggen.py @@ -69,12 +69,6 @@ def test_common_functions(): "common/functions.conf.json", "common/functions.conf") -def test_staticd_default_route(): - run_test("staticd.default_route.conf.j2", - "staticd/staticd.default_route.conf.j2", - "staticd/staticd.default_route.conf.json", - "staticd/staticd.default_route.conf") - def test_staticd_loopback_route(): run_test("staticd.loopback_route.conf.j2", "staticd/staticd.loopback_route.conf.j2", diff --git a/src/sonic-config-engine/tests/sample_output/py2/frr.conf b/src/sonic-config-engine/tests/sample_output/py2/frr.conf index 0b0c22db6809..259415e89e65 100644 --- a/src/sonic-config-engine/tests/sample_output/py2/frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py2/frr.conf @@ -35,10 +35,6 @@ link-detect ! !! ! -! set static default route to mgmt gateway as a backup to learned default -ip route 0.0.0.0/0 10.0.0.1 200 -!! -! ! ! add static ipv6 /64 loopback route to allow bgpd to advertise the loopback route prefix ipv6 route fc00:1::/64 Loopback0 diff --git a/src/sonic-config-engine/tests/sample_output/py3/frr.conf b/src/sonic-config-engine/tests/sample_output/py3/frr.conf index 032eb26c5337..02173159ae9b 100644 --- a/src/sonic-config-engine/tests/sample_output/py3/frr.conf +++ b/src/sonic-config-engine/tests/sample_output/py3/frr.conf @@ -35,10 +35,6 @@ link-detect ! !! ! -! set static default route to mgmt gateway as a backup to learned default -ip route 0.0.0.0/0 10.0.0.1 200 -!! -! ! ! add static ipv6 /64 loopback route to allow bgpd to advertise the loopback route prefix ipv6 route fc00:1::/64 Loopback0 diff --git a/src/sonic-config-engine/tests/test_frr.py b/src/sonic-config-engine/tests/test_frr.py index 4998db2d5b25..3934f8c7d70c 100644 --- a/src/sonic-config-engine/tests/test_frr.py +++ b/src/sonic-config-engine/tests/test_frr.py @@ -69,6 +69,4 @@ def test_bgpd_frr(self): def test_zebra_frr(self): self.assertTrue(*self.run_case('zebra/zebra.conf.j2', 'zebra_frr.conf')) - def test_staticd_frr(self): - self.assertTrue(*self.run_case('staticd/staticd.conf.j2', 'staticd_frr.conf'))