additional attributes of static routes
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; }; } But I don't see any communities on this route in the master RIB: bird> show route all for 0.0.0.0/0 table master 0.0.0.0/0 unreachable [def_route 2017-02-26] ! (200) Type: static unicast univ So my question is simple: can I implement this behaviour (set attributes on static routes) this way? -- Anton.
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@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."
Hello, Ondrej. 2017-03-07 20:32 GMT+03:00 Ondrej Zajicek <santiago@crfreenet.org>:
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.
Yeah. You're right. But with other community values I don't see changes anyway.
You could also use per-route commands:
route 0.0.0.0/0 reject { bgp_community.add((64512, 101)); bgp_community.add((64512, 211)); };
I think this is version related issue. I use debian version of bird (1.4.5), that is obviosly outdated. I'll going to use the newer version in the lab to check it. Thanks for help! -- Anton.
participants (2)
-
Anton Danilov -
Ondrej Zajicek