eclist matching question

Alexander Shikov a.shikov at dtel-ix.net
Wed Jul 1 14:06:30 CEST 2020


On Tue, Jun 30, 2020 at 22:27:54 +0200, Ondrej Zajicek wrote:
> Hello
> 
> Works for me, at least in some similar setups.
> 
> Could you check if it works for expressions like:
> 
> bird> show route all where (rt,65001,28773) ~ bgp_ext_community
> 
> 
> Or (function in config file):
> 
> function test2(int peer_as)
> {
>  if (rt,65001,peer_as) ~ bgp_ext_community then {
>      return true;
>   }
>   return false;
> }
> 
> bird> show route all where test2(28773)

Hello!

bird> show route 109.68.40.0/21 all
BIRD 1.6.8 ready.
109.68.40.0/21     via 193.25.180.17 on bge0 [ITCONS 2020-07-01 15:02:20] * (100) [AS25372i]
        Type: BGP unicast univ
        BGP.origin: IGP
        BGP.as_path: 25372
        BGP.next_hop: 193.25.180.17
        BGP.local_pref: 100
        BGP.community: (25372,3) (65005,10804) (31210,31210)
        BGP.ext_community: (rt, 65001, 28773) (rt, 31210, 31210)

bird> show route 109.68.40.0/21 all where (rt,65001,28773) ~ bgp_ext_community
- output is empty, matching failed.

But matching against second value in a ec list works:
bird> show route 109.68.40.0/21 all where (rt,31210,31210) ~ bgp_ext_community
109.68.40.0/21     via 193.25.180.17 on bge0 [ITCONS 2020-07-01 15:02:20] * (100) [AS25372i]
        Type: BGP unicast univ
        BGP.origin: IGP
        BGP.as_path: 25372
        BGP.next_hop: 193.25.180.17
        BGP.local_pref: 100
        BGP.community: (25372,3) (65005,10804) (31210,31210)
        BGP.ext_community: (rt, 65001, 28773) (rt, 31210, 31210)
        BGP.large_community: (31210, 31210, 31210)

-- 
Alexander Shikov
Technical Staff, Digital Telecom IX
Tel.: +380 44 201 14 07
Mob.: +380 50 410 30 57
http://dtel-ix.net/


More information about the Bird-users mailing list