[bgp] Enable BGP Graceful Restart based on device role (#9486)
What I did: Updated Jinja Template to enable BGP Graceful Restart based on device role. By default it will be enable only if the device role type is TorRouter. Why I did:- By default FRR is configured in Graceful Helper mode. Graceful Restart is needed on T0/TorRouter only since the device can go for warm-reboot. For T1/LeafRouter it need to be in Helper mode only
This commit is contained in:
parent
6402a02261
commit
6c0da4bcf0
@ -67,7 +67,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||
bgp bestpath as-path multipath-relax
|
||||
{% endif %}
|
||||
!
|
||||
{% if constants.bgp.graceful_restart.enabled is defined and constants.bgp.graceful_restart.enabled %}
|
||||
{% if constants.bgp.graceful_restart.enabled is defined and constants.bgp.graceful_restart.enabled and DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %}
|
||||
bgp graceful-restart restart-time {{ constants.bgp.graceful_restart.restart_time | default(240) }}
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
|
@ -3,7 +3,8 @@
|
||||
"localhost": {
|
||||
"hostname": "new_hostname",
|
||||
"bgp_asn": "55555",
|
||||
"sub_role": "FrontEnd"
|
||||
"sub_role": "FrontEnd",
|
||||
"type": "ToRRouter"
|
||||
}
|
||||
},
|
||||
"LOOPBACK_INTERFACE": {
|
||||
|
@ -2,7 +2,8 @@
|
||||
"DEVICE_METADATA": {
|
||||
"localhost": {
|
||||
"bgp_asn": "55555",
|
||||
"sub_role": "FrontEnd"
|
||||
"sub_role": "FrontEnd",
|
||||
"type": "ToRRouter"
|
||||
}
|
||||
},
|
||||
"LOOPBACK_INTERFACE": {
|
||||
|
@ -2,7 +2,8 @@
|
||||
"DEVICE_METADATA": {
|
||||
"localhost": {
|
||||
"bgp_asn": "55555",
|
||||
"sub_role": "FrontEnd"
|
||||
"sub_role": "FrontEnd",
|
||||
"type": "ToRRouter"
|
||||
}
|
||||
},
|
||||
"LOOPBACK_INTERFACE": {
|
||||
|
@ -39,10 +39,6 @@ router bgp 55555
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 55.55.55.56
|
||||
!
|
||||
|
@ -3,7 +3,8 @@
|
||||
"localhost": {
|
||||
"bgp_asn": "55555",
|
||||
"sub_role": "FrontEnd",
|
||||
"switch_type": "chassis-packet"
|
||||
"switch_type": "chassis-packet",
|
||||
"type": "SpineRouter"
|
||||
}
|
||||
},
|
||||
"LOOPBACK_INTERFACE": {
|
||||
|
@ -39,10 +39,6 @@ router bgp 55555
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 55.55.55.56
|
||||
!
|
||||
|
@ -3,7 +3,8 @@
|
||||
"localhost": {
|
||||
"bgp_asn": "55555",
|
||||
"sub_role": "",
|
||||
"switch_type": "voq"
|
||||
"switch_type": "voq",
|
||||
"type": "SpineRouter"
|
||||
}
|
||||
},
|
||||
"LOOPBACK_INTERFACE": {
|
||||
|
@ -3,7 +3,8 @@
|
||||
"localhost": {
|
||||
"bgp_asn": "55555",
|
||||
"hostname": "test_hostname",
|
||||
"sub_role": "FrontEnd"
|
||||
"sub_role": "FrontEnd",
|
||||
"type": "ToRRouter"
|
||||
}
|
||||
},
|
||||
"INTERFACE": {
|
||||
|
@ -58,10 +58,6 @@ router bgp 65100
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 8.0.0.5
|
||||
!
|
||||
|
@ -58,10 +58,6 @@ router bgp 65100
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 10.1.0.32
|
||||
!
|
||||
|
@ -63,10 +63,6 @@ router bgp 4000
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 4.0.0.0
|
||||
!
|
||||
|
@ -58,10 +58,6 @@ router bgp 65100
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 8.0.0.5
|
||||
!
|
||||
|
@ -58,10 +58,6 @@ router bgp 65100
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 10.1.0.32
|
||||
!
|
||||
|
@ -63,10 +63,6 @@ router bgp 4000
|
||||
!
|
||||
bgp bestpath as-path multipath-relax
|
||||
!
|
||||
bgp graceful-restart restart-time 240
|
||||
bgp graceful-restart
|
||||
bgp graceful-restart preserve-fw-state
|
||||
bgp graceful-restart select-defer-time 45
|
||||
!
|
||||
bgp router-id 4.0.0.0
|
||||
!
|
||||
|
Loading…
Reference in New Issue
Block a user