<div dir="ltr"><div dir="ltr"><font size="4">Hello, I can be exported unreachable on other servers</font><br><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div>protocol static BGP_Prefix{</div><div> ipv6<span style="color:rgb(106,153,85)">;</span></div><div> route 2602:feda:ab4::/48 reject<span style="color:rgb(106,153,85)">;</span></div><div>}</div></div></div><div><br></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div>function bgp_export() </div><div>prefix set allowed_prefix<span style="color:rgb(106,153,85)">;</span></div><div>int set allowed_prefix_origins<span style="color:rgb(106,153,85)">;</span></div><div>{</div><div> include <span style="color:rgb(206,145,120)">"/etc/bird/filters/allowed_prefix.conf"</span><span style="color:rgb(106,153,85)">;</span></div><div><span style="color:rgb(106,153,85)"># print AS_HUIZE;</span></div><div> if net !~ allowed_prefix then {</div><div><span style="color:rgb(106,153,85)"># if net ~ OUR_PREFIXES then print " net",net," is not echo to AS_HUIZE";</span></div><div> return false<span style="color:rgb(106,153,85)">;</span></div><div> }</div><div> if is_bogon() then return false<span style="color:rgb(106,153,85)">;</span></div><div> if <span style="color:rgb(86,156,214)">proto</span> = <span style="color:rgb(206,145,120)">"BGP_Prefix"</span> then return true<span style="color:rgb(106,153,85)">;</span></div><div> if source != RTS_BGP then return false<span style="color:rgb(106,153,85)">;</span></div><div> if bgp_path !~ [= <span style="color:rgb(86,156,214)">141011</span> =] then return false<span style="color:rgb(106,153,85)">; </span></div><div> return true<span style="color:rgb(106,153,85)">;</span></div><div>}</div></div></div><div><br></div></div><font size="4">I use the static protocol to announce the prefix that needs to be announced</font><span style="font-size:large">.</span><div><font size="4"><br></font><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 17 Aug 2021 at 19:14, Yakov Sh. <<a href="mailto:yman@protonmail.ch">yman@protonmail.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>`show route where bgp_export() all` output states that 2602:feda:ab4::/48 prefix is unreachable. That most probably reason to not export it. As it is static route it's probably point to some interface in DOWN state, or unreachable gateway.</div><div><br></div><div><div><div>Yakov Sh.<br></div><div>telegram: @darkyman<br></div></div><div></div></div><div><br></div><div>
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br>
On Tuesday, August 17th, 2021 at 1:30 PM, 智慧雨泽 <<a href="mailto:zhihuiyuze@gmail.com" target="_blank">zhihuiyuze@gmail.com</a>> wrote:<br>
<blockquote type="cite">
<div dir="ltr"><div>Hi, bird user</div><div> It seems that the image attachment cannot be seen by others, so I resend it (<br> I want to export 2602:feda:ab4::/48. I wrote 「if bgp_export() then accept」 in the BGP template, but it was not exported to BGP correctly. But bgp_export() outputs 2602:feda:ab4::/48.</div><div> I can't find the BGP in the bird document under what circumstances will not export prefix, please tell me, thanks!</div><div> <span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">bird> show route export Hurricane_Electric_LLC</span><br>Table master6:<br>2a10:cc44:100::/44 unicast [UNM_Exch_RS2 2021-08-13 from 2602:ffb1:200:0:192:34:27:253] * (100) [AS38281i]<br> via 2602:ffb1:200:0:192:34:27:6 on ens19<br>2a10:cc44:109::/48 unicast [LL_IX 15:22:24.526] * (100) [AS38281i]<br> via 2602:feda:ab2:5247:5247:5247:5247:5247 on ll_ix<br>2001:df6:9f80::/48 unicast [EVIX_RS1 2021-08-13 from 2602:fed2:fff:ffff::1] * (100) [AS38281i]<br> via 2602:fed2:fff:ffff::107 on ens20<br>2602:feda:ab2::/48 unicast [LL_IX 2021-08-15] * (100) [AS141011i]<br> via 2602:feda:ab2:5247:5247:5247:5247:5247 on ll_ix<br>bird><br><br></span><span style="font-family:monospace"><br></span><span style="font-family:monospace"><span style="color:rgb(0,0,0)">bird> show route where bgp_export() all</span><br>Table master6:<br>2602:feda:ab2::/48 unicast [LL_IX 2021-08-15] * (100) [AS141011i]<br> via 2602:feda:ab2:5247:5247:5247:5247:5247 on ll_ix<br> Type: BGP univ<br> BGP.origin: IGP<br> BGP.as_path: 141011<br> BGP.next_hop: 2602:feda:ab2:5247:5247:5247:5247:5247 fe80::200:5efe:5bd:ff6b<br> BGP.local_pref: 100<br>2602:feda:ab4::/48 unreachable [BGP_Prefix 2021-08-13] (200)<br> Type: static univ<br>bird><br><br></span><span style="font-family:monospace"><br></span></div><div><div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre-wrap"><div>template bgp tpl_bgp {</div><div> graceful restart on<span style="color:rgb(106,153,85)">;</span></div><div> local as LOCAL_ASN<span style="color:rgb(106,153,85)">;</span></div><div> ipv6 {</div><div> next hop self<span style="color:rgb(106,153,85)">;</span></div><div> import filter peer_in_v6<span style="color:rgb(106,153,85)">;</span></div><div> <span style="color:rgb(106,153,85)">#export where bgp_export();</span></div><div> export filter{</div><div> <span style="color:rgb(106,153,85)">#if my_opt_prefix() then bgp_path.prepend(LOCAL_ASN); </span></div><div> if bgp_export() then accept<span style="color:rgb(106,153,85)">;</span></div><div> if bgp_export_downstream() then accept<span style="color:rgb(106,153,85)">;</span></div><div> else reject<span style="color:rgb(106,153,85)">;</span></div><div> }<span style="color:rgb(106,153,85)">;</span></div><div> }<span style="color:rgb(106,153,85)">;</span></div><div>}</div></div></div></div>
</blockquote><br>
</div></blockquote></div></div></div>