Skip to content

Commit

Permalink
[interfaces]: Use default table instead of main table for forced_mgmt…
Browse files Browse the repository at this point in the history
…_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.
  • Loading branch information
taoyl-ms authored and Shuotian Cheng committed May 27, 2017
1 parent 122c03c commit bd52f41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions files/image_config/interfaces/interfaces.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down

0 comments on commit bd52f41

Please sign in to comment.