<% if @interface[:metric] -%>
Metric=<%= @interface[:metric] %>
<% end -%>
+<% if @interface[:source_route_table] -%>
+
+[Route]
+Gateway=<%= @interface[:inet][:gateway] %>
+GatewayOnLink=true
+<% if @interface[:metric] -%>
+Metric=<%= @interface[:metric] %>
+<% end -%>
+Table=<%= @interface[:source_route_table] %>
+
+[RoutingPolicyRule]
+From=<%= @interface[:inet][:address] %>
+Table=<%= @interface[:source_route_table] %>
+<% end -%>
<% end -%>
<% if @interface.dig(:inet6, :gateway) && @interface[:inet6][:gateway] != @interface[:inet6][:address] -%>
<% if @interface[:metric] -%>
Metric=<%= @interface[:metric] %>
<% end -%>
+<% if @interface[:source_route_table] -%>
+
+[Route]
+Gateway=<%= @interface[:inet6][:gateway] %>
+GatewayOnLink=true
+<% if @interface[:metric] -%>
+Metric=<%= @interface[:metric] %>
+<% end -%>
+Table=<%= @interface[:source_route_table] %>
+
+[RoutingPolicyRule]
+From=<%= @interface[:inet6][:address] %>
+Table=<%= @interface[:source_route_table] %>
+<% end -%>
<% end -%>
<% Hash(@interface.dig(:inet, :routes)).sort.each do |destination, details| -%>
<% unless details[:via] == @interface[:inet][:address] -%>
:external_cogent => {
:interface => "bond0.2",
:role => :external,
+ :source_route_table => 100,
:inet => {
:address => "130.117.76.3",
:prefix => "27",
:interface => "bond0.3",
:role => :external,
:metric => 150,
+ :source_route_table => 150,
:inet => {
:address => "184.104.179.131",
:prefix => "27",