Command Syntax for BIRD configuration

Ondrej Zajicek santiago at crfreenet.org
Mon Jan 25 11:14:04 CET 2010


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 * =]

[1] http://bird.network.cz/?get_doc&f=bird-5.html

> 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 crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20100125/21b3ee2c/attachment-0001.asc>


More information about the Bird-users mailing list