additional attributes of static routes

Ondrej Zajicek santiago at crfreenet.org
Tue Mar 7 18:32:09 CET 2017


On Tue, Mar 07, 2017 at 08:01:53PM +0300, Anton Danilov wrote:
> Hello folks.
> I have a strange desire to set the bgp community to static routes to
> implement the advanced route policy on my border router.
> I've written this configuration of additional static protocol with
> only default route to advertise it to other peers:
> 
> protocol static def_route
> {
>     route 0.0.0.0/0 reject;
>     import filter {
>         bgp_community.add((135402, 101));
>         bgp_community.add((135402, 211));
>         accept;
>     };
> }

> So my question is simple: can I implement this behaviour (set
> attributes on static routes) this way?

Hello

This is a correct way, but (135402, 101) is not a correct community -
each field is 16b, so maximum is (65535, 65535). There are probably
related error messages in the log.

You could also use per-route commands:

  route 0.0.0.0/0 reject {
     bgp_community.add((64512, 101));
     bgp_community.add((64512, 211));
  };

-- 
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."


More information about the Bird-users mailing list