<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Aptos;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
{font-family:"Arial Black";
panose-1:2 11 10 4 2 1 2 2 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<p style="font-family:Arial Black;font-size:10pt;color:#DBE5F1;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
Classified as: Hitachi Rail – Public<br>
</p>
<br>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Soha,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Got it. Many thanks for your explanation in detail.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">With Best Regards,<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif;color:#1F497D">Chris<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div><br>
<p style="font-family:Arial Black;font-size:10pt;color:#DBE5F1;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Center">
Hitachi Rail – Public<br>
</p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Soha Jin <soha@jin.sh>
<br>
<b>Sent:</b> Tuesday, June 4, 2024 12:22 PM<br>
<b>To:</b> LIU Chris <chris-zq.liu@urbanandmainlines.com><br>
<b>Cc:</b> 'BIRD Users' <bird-users@network.cz><br>
<b>Subject:</b> RE: bird BGP not advertise local routing, unless make it blackhole<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" align="left" width="100%" style="width:100.0%">
<tbody>
<tr>
<td style="background:#A6A6A6;padding:5.25pt 1.5pt 5.25pt 1.5pt"></td>
<td width="100%" style="width:100.0%;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 11.25pt">
<div>
<p class="MsoNormal" style="mso-element:frame;mso-element-frame-hspace:2.25pt;mso-element-wrap:around;mso-element-anchor-vertical:paragraph;mso-element-anchor-horizontal:column;mso-height-rule:exactly">
<span style="font-size:9.0pt;font-family:"Segoe UI",sans-serif;color:#212121">You don't often get email from
<a href="mailto:soha@jin.sh">soha@jin.sh</a>. <a href="https://aka.ms/LearnAboutSenderIdentification">
Learn why this is important</a><o:p></o:p></span></p>
</div>
</td>
<td width="75" style="width:56.25pt;background:#EAEAEA;padding:5.25pt 3.75pt 5.25pt 3.75pt;align:left">
</td>
</tr>
</tbody>
</table>
<div>
<p class="MsoNormal"><span style="font-size:10.5pt">Hello Chris,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">According to the documentation,
<a href="https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.17">https://bird.network.cz/?get_doc&v=20&f=bird-6.html#ss6.17</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">A route requires at least one next hop. “route 192.168.0.0/16;” should not pass the configuration check.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">Valid routes can be:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">route 192.168.0.0/16 blackhole; # drop packets to the destination<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">route 192.168.0.0/16 reject; # reject packets to the destination
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:10.5pt">route 192.168.0.0/16 via eth0;<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">route 192.168.0.0/16 via 192.168.1.1; # 192.168.1.1 is directly reachable<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">route 192.168.0.0/16 recursive 192.168.1.1; # use next hop by resolving the route to 192.168.1.1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">When you announcing the prefix to your neighbor, the neighbor finds next hop with bgp_next_hop, it only knows that 192.168.0.0/16 is reachable via your router, and doesn’t know that prefix is blackholed on
your router.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">Static routes are the reachability information defined statically on your router, which should be told to the kernel to be effective. If you are not exporting the routes to your kernel (this is actually what
you did in the configuration you provided), the blackhole here will not affect your IP packet forwarding.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="FR" style="font-size:10.5pt">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt">Soha<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Bird-users <<a href="mailto:bird-users-bounces@network.cz">bird-users-bounces@network.cz</a>>
<b>On Behalf Of </b>LIU Chris via Bird-users<br>
<b>Sent:</b> Tuesday, June 4, 2024 11:24 PM<br>
<b>To:</b> BIRD Users <<a href="mailto:bird-users@network.cz">bird-users@network.cz</a>><br>
<b>Subject:</b> bird BGP not advertise local routing, unless make it blackhole<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:5.0pt"><span style="font-size:10.0pt;font-family:"Arial Black",sans-serif;color:#DBE5F1">Classified as: Hitachi Rail – Public<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:SimSun"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">I am new for bird/BGP. My configuration as below. Basically it is working as expected except one thing.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">This static routing, I want to advertise this route to BGP peers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">If I just configured as : route 192.168.0.0/16, Bird doesn’t advertise this route unless add it as blackhole<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">blackhole is sink or just drop, why ?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">protocol static static_bgp {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> ipv4;
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> check link;
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> <span style="background:yellow;mso-highlight:yellow">route 192.168.0.0/16 blackhole;</span>
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">router id 1.1.1.1;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">filter Filter_Export_Kernel {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> if net ~ [ 10.1.0.0/16 ] then {
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> accept;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> }<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> else<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> reject;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">protocol kernel {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> scan time 10;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> ipv4 {
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> export filter Filter_Export_Kernel;
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> };<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">protocol device {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> scan time 10;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">protocol static static_bgp {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> ipv4;
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> check link;
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> <span style="background:yellow;mso-highlight:yellow">route 192.168.0.0/16 blackhole;</span>
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">protocol bgp BGP_INSTANCE_1 {
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> local xx.xx.xx.xx as 10001;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> neighbor yy.yy.yy.yy as 10002;
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> ipv4 {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> import all;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> export where proto ="static_bgp";<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> preference 200;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> };
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> hold time 3;
<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> bfd on;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">}<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">protocol bfd BFD_INSTANCE_1 {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> interface "eth1" {<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> min rx interval 1 s;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> min tx interval 1 s;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> idle tx interval 3000 ms;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> multiplier 3;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> };<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif"> neighbor yy.yy.yy.yy local xx.xx.xx.xx;<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.25in"><span lang="EN-CA" style="font-size:10.0pt;font-family:"Verdana",sans-serif">}</span><span lang="EN-CA" style="font-size:11.0pt"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p style="margin-right:5.0pt"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif">---------------------------------<span style="color:black"><o:p></o:p></span></span></p>
</div>
<p class="MsoNormal"><span style="font-family:SimSun"><o:p> </o:p></span></p>
<p align="center" style="margin:5.0pt;text-align:center"><span style="font-size:10.0pt;font-family:"Arial Black",sans-serif;color:#DBE5F1">Hitachi Rail – Public<o:p></o:p></span></p>
</div>
</div>
</div>
</body>
</html>