[interfaces]: Use default table instead of main table for forced_mgmt_routes (#635)
If routes are inserted in main table, they wont' be overwritten by the routes learned via BGP. Then the routes will be missing from the ASIC. Thus a default table is used so that control plane and data plane routes are isolated and could be configured independently.
This commit is contained in:
parent
122c03caee
commit
bd52f411ff
@ -29,13 +29,13 @@ iface eth0 inet static
|
||||
up ip route add default via {{ minigraph_mgmt_interface['gwaddr'] }} dev eth0 table default
|
||||
up ip rule add from {{ minigraph_mgmt_interface['addr'] }}/32 table default
|
||||
{% for prefix in forced_mgmt_routes %}
|
||||
up ip route add {{ prefix }} via {{ minigraph_mgmt_interface['gwaddr'] }} dev eth0
|
||||
up ip rule add to {{ prefix }} table default
|
||||
{% endfor %}
|
||||
# management port down rules
|
||||
down ip route delete default via {{ minigraph_mgmt_interface['gwaddr'] }} dev eth0 table default
|
||||
down ip rule delete from {{ minigraph_mgmt_interface['addr'] }}/32 table default
|
||||
{% for prefix in forced_mgmt_routes %}
|
||||
down ip route delete {{ prefix }} via {{ minigraph_mgmt_interface['gwaddr'] }} dev eth0
|
||||
down ip rule delete to {{ prefix }} table default
|
||||
{% endfor %}
|
||||
{# TODO: COPP policy type rules #}
|
||||
{% else %}
|
||||
|
Loading…
Reference in New Issue
Block a user