<div dir="ltr"><div>Hi,<br><br></div>You have:<br><br><p class="MsoNormal"><span lang="EN-GB">WAN (Mobile): 10.6.90.187 / 255.0.0.0</span></p>
<p class="MsoNormal"><span lang="EN-GB">OpenVPN interface (tap0): 10.9.140.33 / 255.255.252.0<br></span></p><p class="MsoNormal"><br></p><p class="MsoNormal"><span lang="EN-GB">protocol bgp BGP1 from RR_LTE { neighbor 10.9.140.1 as 1; preference 140;};</span></p><p class="MsoNormal"><br></p><p class="MsoNormal">So you are trying to reach <span lang="EN-GB">10.9.140.1. If you have no additional routes, than this address falls into </span><br></p><p class="MsoNormal"><span lang="EN-GB"><span lang="EN-GB">10.6.90.187 / 255.0.0.0 network, i.e. WAN interface and will be routed there.<br></span></span></p><p class="MsoNormal"><span lang="EN-GB"></span></p><p class="MsoNormal"><span lang="EN-GB"></span></p></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 8, 2017 at 8:20 AM, Magnus Löfqvist <span dir="ltr"><<a href="mailto:ml@vmi.se" target="_blank">ml@vmi.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="#0563C1" vlink="#954F72" lang="SV">
<div class="m_-8944933558678678424WordSection1">
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span lang="EN-GB">I have some mobile routers (connected over LTE) and with openvpn.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Over the openvpn we are running a BGP to allow distribute some routes and export routes.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Some of the routers are having wrong netmask (255.0.0.0 instead of 255.255.255.252).
<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">This seems to work (ie internet are working, and the openvpn connection is established).<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">But when we are trying to get the BGP connection up, it tries to send the BGP connection over the WAN istead of openvpn connection.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">I guess that I have made some mistake in the config.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">It should take smaller path before matching the larger..<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">WAN (Mobile): 10.6.90.187 / 255.0.0.0<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">OpenVPN interface (tap0): 10.9.140.33 / 255.255.252.0<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Bird config:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">template bgp RR_LTE {<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> debug all; <wbr> # debug BGP<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> description "BIRD RR";<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> local as 1; <wbr> # the AS used by the local BGP speaker<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> direct;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> gateway direct;<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> import filter import_ATM; <wbr> # just accept everything<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> export filter export_ATM; <wbr> # and advertise it to all the neigbors<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> connect retry time 10; # reconnect try after 10s<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"> hold time 240; <wbr> # hold time send in BGP messages<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">}<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">protocol bgp BGP1 from RR_LTE { neighbor 10.9.140.1 as 1; preference 140;};<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">root@client1:/etc# tcpdump -ni wwan0 tcp port 179 and host 10.9.140.1<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">tcpdump: verbose output suppressed, use -v or -vv for full protocol decode<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">listening on wwan0, link-type EN10MB (Ethernet), capture size 65535 bytes<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">15:29:08.755188 IP 10.6.90.187.34974 > 10.9.140.1.179: Flags [S], seq 1482209106, win 14600, options [mss 1460,sackOK,TS val 88007 ecr 0,nop,wscale 8], length 0<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">15:29:11.762726 IP 10.6.90.187.45591 > 10.9.140.1.179: Flags [S], seq 1681977930, win 14600, options [mss 1460,sackOK,TS val 88307 ecr 0,nop,wscale 8], length 0<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt">Med vänlig hälsning / Best regards<span class="HOEnZb"><font color="#888888"><u></u><u></u></font></span></span></p><span class="HOEnZb"><font color="#888888">
<p class="MsoNormal"><span style="font-size:10.0pt">Magnus Löfqvist<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
</font></span></div>
</div>
</blockquote></div><br></div>