[dualtor] Disable zebra link-detect for vlan interfaces (#17784)
* [dualtor] Disable zebra link-detect for vlan interfaces Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
This commit is contained in:
parent
e173987a56
commit
9a9ab183c8
@ -24,5 +24,13 @@ interface {{ pc }}
|
|||||||
link-detect
|
link-detect
|
||||||
!
|
!
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% if (DEVICE_METADATA is defined) and ('localhost' in DEVICE_METADATA) and ('subtype' in DEVICE_METADATA['localhost']) and (DEVICE_METADATA['localhost']['subtype'].lower() == 'dualtor') %}
|
||||||
|
! Disable link-detect on VLAN interfaces for dualtor
|
||||||
|
{% for (name, prefix) in VLAN_INTERFACE|pfx_filter|unique(attribute=0) %}
|
||||||
|
interface {{ name }}
|
||||||
|
no link-detect
|
||||||
|
!
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
{% endblock interfaces %}
|
{% endblock interfaces %}
|
||||||
!
|
!
|
||||||
|
@ -0,0 +1,49 @@
|
|||||||
|
!
|
||||||
|
! =========== Managed by sonic-cfggen DO NOT edit manually! ====================
|
||||||
|
! generated by templates/zebra/zebra.conf.j2 using config DB data
|
||||||
|
! file: zebra.conf
|
||||||
|
!
|
||||||
|
!
|
||||||
|
! Force disable next hop group support
|
||||||
|
no zebra nexthop kernel enable
|
||||||
|
! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages
|
||||||
|
no fpm use-next-hop-groups
|
||||||
|
!
|
||||||
|
fpm address 127.0.0.1
|
||||||
|
!
|
||||||
|
! template: common/daemons.common.conf.j2
|
||||||
|
!
|
||||||
|
hostname switch-t0
|
||||||
|
password zebra
|
||||||
|
enable password zebra
|
||||||
|
!
|
||||||
|
log syslog informational
|
||||||
|
log facility local4
|
||||||
|
!
|
||||||
|
! end of template: common/daemons.common.conf.j2!
|
||||||
|
!
|
||||||
|
!
|
||||||
|
! Enable nht through default route
|
||||||
|
ip nht resolve-via-default
|
||||||
|
ipv6 nht resolve-via-default
|
||||||
|
! Enable link-detect (default disabled)
|
||||||
|
interface PortChannel03
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
interface PortChannel02
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
interface PortChannel01
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
interface PortChannel04
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
! Disable link-detect on VLAN interfaces for dualtor
|
||||||
|
interface Vlan2000
|
||||||
|
no link-detect
|
||||||
|
!
|
||||||
|
interface Vlan1000
|
||||||
|
no link-detect
|
||||||
|
!
|
||||||
|
!!
|
@ -0,0 +1,49 @@
|
|||||||
|
!
|
||||||
|
! =========== Managed by sonic-cfggen DO NOT edit manually! ====================
|
||||||
|
! generated by templates/zebra/zebra.conf.j2 using config DB data
|
||||||
|
! file: zebra.conf
|
||||||
|
!
|
||||||
|
!
|
||||||
|
! Force disable next hop group support
|
||||||
|
no zebra nexthop kernel enable
|
||||||
|
! Uses the old known FPM behavior of including next hop information in the route (e.g. RTM_NEWROUTE) messages
|
||||||
|
no fpm use-next-hop-groups
|
||||||
|
!
|
||||||
|
fpm address 127.0.0.1
|
||||||
|
!
|
||||||
|
! template: common/daemons.common.conf.j2
|
||||||
|
!
|
||||||
|
hostname switch-t0
|
||||||
|
password zebra
|
||||||
|
enable password zebra
|
||||||
|
!
|
||||||
|
log syslog informational
|
||||||
|
log facility local4
|
||||||
|
!
|
||||||
|
! end of template: common/daemons.common.conf.j2!
|
||||||
|
!
|
||||||
|
!
|
||||||
|
! Enable nht through default route
|
||||||
|
ip nht resolve-via-default
|
||||||
|
ipv6 nht resolve-via-default
|
||||||
|
! Enable link-detect (default disabled)
|
||||||
|
interface PortChannel01
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
interface PortChannel02
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
interface PortChannel03
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
interface PortChannel04
|
||||||
|
link-detect
|
||||||
|
!
|
||||||
|
! Disable link-detect on VLAN interfaces for dualtor
|
||||||
|
interface Vlan1000
|
||||||
|
no link-detect
|
||||||
|
!
|
||||||
|
interface Vlan2000
|
||||||
|
no link-detect
|
||||||
|
!
|
||||||
|
!!
|
@ -74,3 +74,7 @@ class TestCfgGen(TestCase):
|
|||||||
def test_bgpd_frr_dualtor(self):
|
def test_bgpd_frr_dualtor(self):
|
||||||
extra_data = {"DEVICE_METADATA": {"localhost": {"subtype": "DualToR"}}}
|
extra_data = {"DEVICE_METADATA": {"localhost": {"subtype": "DualToR"}}}
|
||||||
self.assertTrue(*self.run_case('bgpd/bgpd.conf.j2', 'bgpd_frr_dualtor.conf', extra_data=extra_data))
|
self.assertTrue(*self.run_case('bgpd/bgpd.conf.j2', 'bgpd_frr_dualtor.conf', extra_data=extra_data))
|
||||||
|
|
||||||
|
def test_zebra_frr_dualtor(self):
|
||||||
|
extra_data = {"DEVICE_METADATA": {"localhost": {"subtype": "DualToR"}}}
|
||||||
|
self.assertTrue(*self.run_case('zebra/zebra.conf.j2', 'zebra_frr_dualtor.conf', extra_data=extra_data))
|
||||||
|
Loading…
Reference in New Issue
Block a user