Skip to content

Commit 3f29b28

Browse files
lolyumssonicbld
authored andcommitted
[dualtor] Disable zebra link-detect for vlan interfaces (#17784)
* [dualtor] Disable zebra link-detect for vlan interfaces Signed-off-by: Longxiang Lyu <[email protected]>
1 parent 0fbdc2b commit 3f29b28

File tree

4 files changed

+110
-0
lines changed

4 files changed

+110
-0
lines changed

dockers/docker-fpm-frr/frr/zebra/zebra.interfaces.conf.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,13 @@ interface {{ pc }}
2424
link-detect
2525
!
2626
{% endfor %}
27+
{% if (DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'].lower() == 'dualtor') %}
28+
! Disable link-detect on VLAN interfaces for dualtor
29+
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter|unique(attribute=0) %}
30+
interface {{ name }}
31+
no link-detect
32+
!
33+
{% endfor %}
34+
{% endif %}
2735
{% endblock interfaces %}
2836
!
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
!
2+
! =========== Managed by sonic-cfggen DO NOT edit manually! ====================
3+
! generated by templates/zebra/zebra.conf.j2 using config DB data
4+
! file: zebra.conf
5+
!
6+
!
7+
! Force disable next hop group support
8+
no zebra nexthop kernel enable
9+
! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages
10+
no fpm use-next-hop-groups
11+
!
12+
fpm address 127.0.0.1
13+
!
14+
! template: common/daemons.common.conf.j2
15+
!
16+
hostname switch-t0
17+
password zebra
18+
enable password zebra
19+
!
20+
log syslog informational
21+
log facility local4
22+
!
23+
! end of template: common/daemons.common.conf.j2!
24+
!
25+
!
26+
! Enable nht through default route
27+
ip nht resolve-via-default
28+
ipv6 nht resolve-via-default
29+
! Enable link-detect (default disabled)
30+
interface PortChannel03
31+
link-detect
32+
!
33+
interface PortChannel02
34+
link-detect
35+
!
36+
interface PortChannel01
37+
link-detect
38+
!
39+
interface PortChannel04
40+
link-detect
41+
!
42+
! Disable link-detect on VLAN interfaces for dualtor
43+
interface Vlan2000
44+
no link-detect
45+
!
46+
interface Vlan1000
47+
no link-detect
48+
!
49+
!!
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
!
2+
! =========== Managed by sonic-cfggen DO NOT edit manually! ====================
3+
! generated by templates/zebra/zebra.conf.j2 using config DB data
4+
! file: zebra.conf
5+
!
6+
!
7+
! Force disable next hop group support
8+
no zebra nexthop kernel enable
9+
! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages
10+
no fpm use-next-hop-groups
11+
!
12+
fpm address 127.0.0.1
13+
!
14+
! template: common/daemons.common.conf.j2
15+
!
16+
hostname switch-t0
17+
password zebra
18+
enable password zebra
19+
!
20+
log syslog informational
21+
log facility local4
22+
!
23+
! end of template: common/daemons.common.conf.j2!
24+
!
25+
!
26+
! Enable nht through default route
27+
ip nht resolve-via-default
28+
ipv6 nht resolve-via-default
29+
! Enable link-detect (default disabled)
30+
interface PortChannel01
31+
link-detect
32+
!
33+
interface PortChannel02
34+
link-detect
35+
!
36+
interface PortChannel03
37+
link-detect
38+
!
39+
interface PortChannel04
40+
link-detect
41+
!
42+
! Disable link-detect on VLAN interfaces for dualtor
43+
interface Vlan1000
44+
no link-detect
45+
!
46+
interface Vlan2000
47+
no link-detect
48+
!
49+
!!

src/sonic-config-engine/tests/test_frr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,7 @@ def test_zebra_frr(self):
7474
def test_bgpd_frr_dualtor(self):
7575
extra_data = {"DEVICE_METADATA": {"localhost": {"subtype": "DualToR"}}}
7676
self.assertTrue(*self.run_case('bgpd/bgpd.conf.j2', 'bgpd_frr_dualtor.conf', extra_data=extra_data))
77+
78+
def test_zebra_frr_dualtor(self):
79+
extra_data = {"DEVICE_METADATA": {"localhost": {"subtype": "DualToR"}}}
80+
self.assertTrue(*self.run_case('zebra/zebra.conf.j2', 'zebra_frr_dualtor.conf', extra_data=extra_data))

0 commit comments

Comments
 (0)