<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:x="urn:schemas-microsoft-com:office:excel" 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=koi8-r">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 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:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{mso-style-priority:99;
mso-style-link:"Текст выноски Знак";
margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.a
{mso-style-name:"Текст выноски Знак";
mso-style-priority:99;
mso-style-link:"Текст выноски";
font-family:"Tahoma","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:2.0cm 42.5pt 2.0cm 3.0cm;}
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="RU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hello.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We have bird 1.4.5 on servers with CentOS 6.5.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We use it for advertise loopback sub-interfaces by OSPF. All subifs with /32 mask.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">We use IPVS+keepalived to bring up and down loopback subifs.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Ifconfig:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># ifconfig<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">eth0.79 Link encap:Ethernet HWaddr 00:50:56:BA:37:70
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> inet addr:10.1.79.2 Bcast:10.1.79.255 Mask:255.255.255.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> inet6 addr: fe80::250:56ff:feba:3770/64 Scope:Link<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> RX packets:34948906 errors:0 dropped:0 overruns:0 frame:0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TX packets:34154161 errors:0 dropped:0 overruns:0 carrier:0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> collisions:0 txqueuelen:1000 <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> RX bytes:3954197378 (3.6 GiB) TX bytes:3820153316 (3.5 GiB)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">lo Link encap:Local Loopback <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> inet addr:127.0.0.1 Mask:255.0.0.0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> inet6 addr: ::1/128 Scope:Host<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> UP LOOPBACK RUNNING MTU:65536 Metric:1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> RX packets:19544 errors:0 dropped:0 overruns:0 frame:0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> TX packets:19544 errors:0 dropped:0 overruns:0 carrier:0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> collisions:0 txqueuelen:0 <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> RX bytes:977404 (954.4 KiB) TX bytes:977404 (954.4 KiB)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">lo:34 Link encap:Local Loopback <o:p>
</o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> inet addr:10.9.200.100 Mask:255.255.255.255<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> UP LOOPBACK RUNNING MTU:65536 Metric:1<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">OSPF works on eth0.79 interface.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Problem – when IPVS+keepalived brings up any loopback subif – Bird additionally accept same network but with /8 mask and advertise it to the network.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">From Bird log:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Jun 11 10:36:23 bird: net accepted:10.0.0.0/8<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">2015-06-11 10:36:22 <INFO> net accepted:10.9.200.100/32<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">So in network I see:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">10.0.0.0/8, ubest/mbest: 1/0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> *via 10.1.79.2, Vlan79, [110/10], 00:02:06, ospf-0, type-2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">and<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">10.9.200.100/32, ubest/mbest: 1/0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> *via 10.1.79.2, Vlan79, [110/10], 02:12:08, ospf-0, type-2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Filter for the Bird to advertise loopbacks:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">protocol direct {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> interface "lo*"; # Restrict network interfaces it works with<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">filter connected_OSPF {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># redistribute connected<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> if ( source = RTS_DEVICE ) then {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> print "net accepted:", net;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> ospf_metric2 = 10;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> accept;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">As workaround we configure another filter that accept only /32 nets:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">filter connected_OSPF<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"># redistribute connected<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">prefix set DEVICE_NETWORKS;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">{<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> DEVICE_NETWORKS = [ 0.0.0.0/0{32,32} ];<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> if ( source = RTS_DEVICE && net ~ DEVICE_NETWORKS ) then {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> print "net accepted:", net;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> ospf_metric2 = 10;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> accept;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> reject;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Is it expected behavior of Bird to advertise prefixes like this or I missed something?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Alexey<o:p></o:p></span></p>
</div>
</body>
</html>