<div style="font-family: Arial, sans-serif; font-size: 14px;">Hi,</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">I have the following configuration:</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span></span><div><span></span></div><span>define ospf_v4_routes = [</span><div><span> 198.19.0.0/16</span></div><div><span>];</span></div><div><br></div><div><span>filter ospf_export {</span></div><div><span> if (net.type = NET_IP4 && ! (net ~ [ 0.0.0.0/0 ])) then reject;</span></div><div> accept;</div><div><span>}</span></div><div><br></div><div><span>filter ospf_import {</span></div><div> if (net.type = NET_IP4 && net ~ ospf_v4_routes) then accept;</div><div> reject;</div><div><span>}</span></div><div><br></div><div><span>protocol ospf v2 ospfv4 {</span></div><div><span> debug all;</span></div><div><span> ipv4 {</span></div><div><span> import filter ospf_import;</span></div><div><span> export filter ospf_export;</span></div><div><span> };</span></div><div><span> area 0.0.0.0 {</span></div><div><span> interface "lo1" { stub yes; };</span></div><div><span> interface "vlan600" {</span></div><div><span> type ptp;</span></div><div><span> cost 15;</span></div><div><span> bfd on;</span></div><div><span> };</span></div><div><span> };</span></div><span>}</span><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">I would expect the metric around 300 + cost of the interface but I get this route metric </div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span><br></span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span>"E2 0.0.0.0/0 [15/10000] via 198.19.4.65, vlan600"</span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span><br></span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span>in the switch.</span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span><br></span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span>When I set the metric manually in the export function:</span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span>filter ospf_export {</span><div><span> if (net.type = NET_IP4 && ! (net ~ [ 0.0.0.0/0 ])) then reject;</span></div><div> ospf_metric1 = 300; unset(ospf_metric2);</div><div><span> accept;</span></div><span>}</span><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">I get the correct metric:</div><div style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span>E1 0.0.0.0/0 [315] via 198.19.4.65, vlan600</span><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">```</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Any idea what could be the issue ?</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div><div style="font-family: Arial, sans-serif; font-size: 14px;">Did I misunderstood the usage of the `default cost` setting?</div><div style="font-family: Arial, sans-serif; font-size: 14px;"><span><br></span></div><div style="font-family: Arial, sans-serif; font-size: 14px;"><br></div>
<div class="protonmail_signature_block" style="font-family: Arial, sans-serif; font-size: 14px;">
<div class="protonmail_signature_block-user">
<div style="font-style: normal; font-weight: normal; letter-spacing: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; color: rgb(0, 0, 0);">BenoƮt </div></div>
</div>