<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)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:等线;
        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:Aptos;}
@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:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle19
        {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="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'>You can take a look at <a href="https://bird.network.cz/?get_doc&v=20&f=bird-5.html#ss5.2">https://bird.network.cz/?get_doc&v=20&f=bird-5.html#ss5.2</a>, the pair/ec/lc set is for bgp_community/bgp_ext_community/bgp_large_community.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'>6509:4804 is written as a pair of number, (6509,4804), in BIRD. In your example, you can write `bgp_community  ~ [(6509,4809), (6509,4810)]` to match any one of them. You can also use a range interval like `bgp_community ~ [(6509, 4809..4810)]`. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'>Soha<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Aptos",sans-serif;mso-fareast-language:ZH-CN'><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='mso-ligatures:none;mso-fareast-language:ZH-CN'>From:</span></b><span lang=EN-US style='mso-ligatures:none;mso-fareast-language:ZH-CN'> Bird-users <bird-users-bounces@network.cz> <b>On Behalf Of </b>skanda<br><b>Sent:</b> Thursday, May 9, 2024 1:29 PM<br><b>To:</b> bird-users@network.cz<br><b>Subject:</b> community matching<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Hi Bird experts,<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>If I want match two communities, how does the syntax works in bird ?<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>standard communities to matched<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>6509:4804 and 6509:4810<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 like this <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU style='mso-ligatures:none'><img border=0 width=584 height=115 style='width:6.0833in;height:1.1979in' id="Picture_x0020_1" src="cid:image001.png@01DAA218.B69D5510"></span><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>What are the pair inside the brackets means?<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>Or <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-AU>filter labips {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU>if (([(65001,4809, 4810)] ~ bgp_community) then<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU>accept<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-AU>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></div></body></html>