<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.E-postmall18
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="SV" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB">I have some mobile routers (connected over LTE) and with openvpn.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></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).
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">This seems to work (ie internet are working, and the openvpn connection is established).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></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.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I guess that I have made some mistake in the config.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">It should take smaller path before matching the larger..<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">WAN (Mobile): 10.6.90.187 / 255.0.0.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">OpenVPN interface (tap0): 10.9.140.33 / 255.255.252.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Bird config:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">template bgp RR_LTE {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> debug all; # debug BGP<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> description "BIRD RR";<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> local as 1; # the AS used by the local BGP speaker<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> direct;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> gateway direct;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> import filter import_ATM; # just accept everything<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> export filter export_ATM; # and advertise it to all the neigbors<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> connect retry time 10; # reconnect try after 10s<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"> hold time 240; # hold time send in BGP messages<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">protocol bgp BGP1 from RR_LTE { neighbor 10.9.140.1 as 1; preference 140;};<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">root@client1:/etc# tcpdump -ni wwan0 tcp port 179 and host 10.9.140.1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">tcpdump: verbose output suppressed, use -v or -vv for full protocol decode<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">listening on wwan0, link-type EN10MB (Ethernet), capture size 65535 bytes<o:p></o:p></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<o:p></o:p></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<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;mso-fareast-language:SV">Med vänlig hälsning / Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;mso-fareast-language:SV">Magnus Löfqvist<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
</body>
</html>