<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:宋体;
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:等线;
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:"\@等线";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Arial Black";
panose-1:2 11 10 4 2 1 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle20
{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:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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=ZH-CN link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Hello Chris,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US 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 lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US 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 lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'>Valid routes can be:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US 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 lang=EN-US 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 lang=EN-US 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 lang=EN-US 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 lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US 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 lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US 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 lang=EN-US 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 lang=EN-US style='font-size:10.5pt'>Soha<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Bird-users <bird-users-bounces@network.cz> <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 <bird-users@network.cz><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><span lang=EN-US><o:p> </o:p></span></p><p style='margin:5.0pt'><span lang=EN-US 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 lang=EN-US style='font-family:宋体'><o:p> </o:p></span></p><div><p class=MsoNormal><span lang=EN-US 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 lang=EN-US 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 lang=EN-US 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 lang=EN-US style='font-size:11.0pt'>blackhole is sink or just drop, why ?<o:p></o:p></span></p><p class=MsoNormal style='margin-left:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><span lang=EN-CA style='font-size:10.0pt;font-family:"Verdana",sans-serif'>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'><o:p> </o:p></span></p><div><div><div><div><div><div><div><p class=MsoNormal style='margin-left:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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:18.0pt'><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 lang=EN-US 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 lang=EN-US style='font-family:宋体'><o:p> </o:p></span></p><p align=center style='margin:5.0pt;text-align:center'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial Black",sans-serif;color:#DBE5F1'>Hitachi Rail – Public<o:p></o:p></span></p></div></div></body></html>