[Xorp-hackers] Xorp newbie: dynamic BGP policies
Marko Zec
zec at icir.org
Fri Apr 27 01:12:38 PDT 2007
On Friday 27 April 2007 06:44, Andreas Voellmy wrote:
> Hi all,
>
> I'm just getting started with Xorp and have a question about BGP
> policy (or maybe xorp routing policy in general):
>
> I've noticed in a couple papers (such as "Decoupling Policy from
> Protocols") dynamic BGP configurations for Xorp, such as something
> like
> "metric=metric*2" or "MED += 1". However I haven't seen this in the
> official manual - there I've only come across static values in
> configurations. Are these sorts of dynamic settings (such as
> incrementing, multiplying, etc.) valid policies for the BGP
> implementation that Xorp provides? Or is this something I'd need to
> extend the basic BGP code to do? If so, could someone point me in the
> right direction in the code; i.e. how does one add a new stack
> operation to a protocol?
Hi,
I think at the moment our configuration / policy parser cannot support
constructs such as "metric = metric * 2", but simulating such a
functionality using a slightly different syntax should be relatively
simple to achieve. For example, adding support for an equivalent of a
"MED += N" statement that would take syntax form of "med-incr N" can be
achieved by solely extending the bgp configuration template (see the
attached patch). Note that "add" and "sub" operators are already
implemented in the policy parser and stack machinery, so adding support
for "med-decr N" operator should also be trivial. For adding new
operators to the parser / stack machine you would have to tackle both
the router manager and policy parsers, and that probably wouldn't be
that most straightforward thing to do...
Hope this helps (for the start),
Marko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: med-incr-diff
Type: text/x-diff
Size: 1502 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20070427/02fde2f5/attachment.bin
More information about the Xorp-hackers
mailing list