Command Syntax for BIRD configuration

Affandi INDRAJI affandi.indraji at
Tue Jan 26 02:24:24 CET 2010

Hi Ondrej,

Thanks a lot for your explanation.

Affandi Indraji

-----Original Message-----
From: Ondrej Zajicek [mailto:santiago at]
Sent: Monday, January 25, 2010 6:14 PM
To: Affandi INDRAJI
Cc: bird-users at
Subject: Re: Command Syntax for BIRD configuration

On Mon, Jan 25, 2010 at 05:19:09PM +0800, Affandi INDRAJI wrote:
> Hi Ondrej,
> Thanks for prompt reply.
> A couple of question:

> 1. How to configure based on match AS for example in cisco, they have
> regular expression like _7898$, what is the equivalent of this command
> in BIRD config file (do you use the same regular expression syntax)?

You can use generalized pattern matching expressions like:

bgp_path ~ [= * 1234 * =]

(that matches any path containing 1234, see [1] section bgpmask for details).

or faster first/last expressions like:

bgp_path.first = 1234
bgp_path.last = 1234

that checks first/last ASN in the AS path.

These expressions can be used in import/export filters (in 'if' expressions) and can be also used in 'show route' commands to filter routes to show:

show route where bgp_path ~ [= * 1234 * =]


> 2. I managed to set the community to let say 1000:1234, how to put it
> in the filter to match this community (let say, we want to advertise
> to certain peer only the routes that match community 1000:1234)

The expression is:

(1000,1234) ~ bgp_community

Elen sila lumenn' omentielvo

Ondrej 'SanTiago' Zajicek (email: santiago at OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, "To err is human -- to blame it on a computer is even more so."

More information about the Bird-users mailing list