2018-05-01 23:58:33 -05:00
|
|
|
{# the range of hash_seed is 0-15 #}
|
2017-10-29 13:50:57 -05:00
|
|
|
{# set default hash seed to 0 #}
|
|
|
|
{% set hash_seed = 0 %}
|
2020-10-08 11:05:37 -05:00
|
|
|
{% set hash_seed_offset = 0 %}
|
2017-10-29 13:50:57 -05:00
|
|
|
{% if DEVICE_METADATA.localhost.type %}
|
|
|
|
{% if DEVICE_METADATA.localhost.type == "ToRRouter" %}
|
2018-05-01 23:58:33 -05:00
|
|
|
{% set hash_seed = 0 %}
|
2017-10-29 13:50:57 -05:00
|
|
|
{% elif DEVICE_METADATA.localhost.type == "LeafRouter" %}
|
2018-05-01 23:58:33 -05:00
|
|
|
{% set hash_seed = 10 %}
|
2019-08-28 17:46:48 -05:00
|
|
|
{% elif DEVICE_METADATA.localhost.type == "SpineRouter" %}
|
2020-10-08 11:05:37 -05:00
|
|
|
{% set hash_seed = 25 %}
|
2017-10-29 13:50:57 -05:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2020-10-08 11:05:37 -05:00
|
|
|
{% if DEVICE_METADATA.localhost.namespace_id %}
|
|
|
|
{% set hash_seed_offset = DEVICE_METADATA.localhost.namespace_id | int %}
|
|
|
|
{% endif %}
|
|
|
|
{% set hash_seed_value = hash_seed_offset + hash_seed %}
|
2017-10-29 13:50:57 -05:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"SWITCH_TABLE:switch": {
|
2020-10-08 11:05:37 -05:00
|
|
|
"ecmp_hash_seed": "{{ hash_seed_value }}",
|
|
|
|
"lag_hash_seed": "{{ hash_seed_value }}",
|
2019-06-15 17:57:10 -05:00
|
|
|
"fdb_aging_time": "600"
|
2017-10-29 13:50:57 -05:00
|
|
|
},
|
|
|
|
"OP": "SET"
|
|
|
|
}
|
|
|
|
]
|