Hello, What is easiest or efficent way to get bgp commynity info out from bird? Our need is make some iptables forward rules for traffic accounting based by bgp communities. Can we get communities to syslog when advertisement comes or can we read current status of them with birdc? -- F-Solutions Oy Tapio Haapala PL7, 90571 Oulu GSM 0400 998371 Skype burner- IRC Burner@ircnet
On Wed, Mar 07, 2012 at 12:46:03PM +0200, Tapio Haapala wrote:
Hello,
Hello.
What is easiest or efficent way to get bgp commynity info out from bird? Our need is make some iptables forward rules for traffic accounting based by bgp communities. Can we get communities to syslog when advertisement comes or can we read current status of them with birdc?
You can use print bgp_community in filters to print bgp_community content into syslog.
Am 07.03.12 12:10, schrieb Oleg:
On Wed, Mar 07, 2012 at 12:46:03PM +0200, Tapio Haapala wrote:
Hello,
Hello.
What is easiest or efficent way to get bgp commynity info out from bird? Our need is make some iptables forward rules for traffic accounting based by bgp communities. Can we get communities to syslog when advertisement comes or can we read current status of them with birdc?
You can use print bgp_community in filters to print bgp_community content into syslog.
Thanks for that. Have some ideas about this feature ;-) Two birdc answers: show route table master where (0,65512) ~ bgp_community or for extended communities: show route table master where (rt,0,65512) ~ bgp_ext_community Rgds, Stefan
7.3.2012 13:10, Oleg kirjoitti:
On Wed, Mar 07, 2012 at 12:46:03PM +0200, Tapio Haapala wrote:
Hello, Hello.
What is easiest or efficent way to get bgp commynity info out from bird? Our need is make some iptables forward rules for traffic accounting based by bgp communities. Can we get communities to syslog when advertisement comes or can we read current status of them with birdc? You can use print bgp_community in filters to print bgp_community content into syslog.
Can you give sample? I try and I get only commynity values but not prefixes where they affects. -- F-Solutions Oy Tapio Haapala PL7, 90571 Oulu GSM 0400 998371 Skype burner- IRC Burner@ircnet
On Thu, Mar 08, 2012 at 01:46:36AM +0200, Tapio Haapala wrote:
7.3.2012 13:10, Oleg kirjoitti:
On Wed, Mar 07, 2012 at 12:46:03PM +0200, Tapio Haapala wrote:
Hello, Hello.
What is easiest or efficent way to get bgp commynity info out from bird? Our need is make some iptables forward rules for traffic accounting based by bgp communities. Can we get communities to syslog when advertisement comes or can we read current status of them with birdc? You can use print bgp_community in filters to print bgp_community content into syslog.
Can you give sample? I try and I get only commynity values but not prefixes where they affects.
May be this is what you want: filter print_comm { print net,bgp_community; }
On Wed, Mar 07, 2012 at 12:46:03PM +0200, Tapio Haapala wrote:
Hello, What is easiest or efficent way to get bgp commynity info out from bird? Our need is make some iptables forward rules for traffic accounting based by bgp communities.
As cmmunities already answered by others, i just note that for traffic accounting probably the better way than using iptables is to use ip realms for routes (route attribute krt_realm in BIRD), kernel automatically keeps statistics for different realms. -- 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."
participants (5)
-
lego12239@yandex.ru -
Oleg -
Ondrej Zajicek -
Stefan Jakob -
Tapio Haapala