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 %}
|
2022-04-07 23:49:42 -05:00
|
|
|
{% if "ToRRouter" in DEVICE_METADATA.localhost.type or DEVICE_METADATA.localhost.type in ["EPMS", "MgmtTsToR"] %}
|
2018-05-01 23:58:33 -05:00
|
|
|
{% set hash_seed = 0 %}
|
2020-11-10 17:06:35 -06:00
|
|
|
{% elif "LeafRouter" in DEVICE_METADATA.localhost.type %}
|
2018-05-01 23:58:33 -05:00
|
|
|
{% set hash_seed = 10 %}
|
2020-11-10 17:06:35 -06:00
|
|
|
{% elif "SpineRouter" in DEVICE_METADATA.localhost.type %}
|
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 }}",
|
2022-01-06 18:40:50 -06:00
|
|
|
"fdb_aging_time": "600",
|
|
|
|
{% if DEVICE_METADATA.localhost.type and "LeafRouter" in DEVICE_METADATA.localhost.type %}
|
|
|
|
"ordered_ecmp": "true"
|
|
|
|
{% else %}
|
|
|
|
"ordered_ecmp": "false"
|
|
|
|
{% endif %}
|
2017-10-29 13:50:57 -05:00
|
|
|
},
|
|
|
|
"OP": "SET"
|
|
|
|
}
|
|
|
|
]
|