Aggregate outgoing address.
Hello. In my test configuration of bird i want to announce two prefixes: 11.11.11.0/24 and 12.12.12.0/24. But i do not understand how. vlan3001 11.11.11.1/28 (direct connected) vlan3002 11.11.11.17/28 (direct connected) vlan3003 11.11.11.65/26 (direct connected) bird.conf #v+ protocol static static_bgp { route 11.11.11.128/25 via 11.11.11.66; route 12.12.12.0/24 via 11.11.11.66; } protocol direct { interface "*"; } #v- This configration announce as is - two times /28, one /26 and one /25 of 11.11.11.0/24 prefix. How to aggregate this in one /24 prefix in this sample? -- damkol@gmail.com
Hi, On Thu, Nov 10, 2011 at 11:55:09AM +0100, damkol@gmail.com wrote:
Hello.
In my test configuration of bird i want to announce two prefixes: [1]11.11.11.0/24 and [2]12.12.12.0/24.
But i do not understand how.
vlan3001 [3]11.11.11.1/28 (direct connected)
vlan3002 [4]11.11.11.17/28 (direct connected)
vlan3003 [5]11.11.11.65/26 (direct connected)
bird.conf
#v+
protocol static static_bgp {
route [6]11.11.11.128/25 via 11.11.11.66; route [7]12.12.12.0/24 via 11.11.11.66; }
protocol direct { interface "*"; }
#v-
This configration announce as is - two times /28, one /26 and one /25 of [8]11.11.11.0/24 prefix.
How to aggregate this in one /24 prefix in this sample?
Firstly, the term "announce" usually applies to BGP, but I cannot see anny configuration related to BGP. Secondly, every route being announced via BGP should be confirmed with some IGP protocol, for example, static. Thus if you have no 11.11.11.0/24 in IGP then 11.11.11.0/24 will not be announced via BGP. It seems you do not have 11.11.11.0/24 in IGP. Thirdly, if you want to announce only two /24 networks then make a outbound BGP filter and include them into it. -- MINO-RIPE
2011/11/16 Alexander Shikoff <minotaur@crete.org.ua>
Firstly, the term "announce" usually applies to BGP, but I cannot see anny configuration related to BGP.
Secondly, every route being announced via BGP should be confirmed with some IGP protocol, for example, static. Thus if you have no 11.11.11.0/24 in IGP then 11.11.11.0/24 will not be announced via BGP. It seems you do not have 11.11.11.0/24 in IGP.
Thirdly, if you want to announce only two /24 networks then make a outbound BGP filter and include them into it.
I omitted bgp configuration and filters because it is not my problem. Outgoing filtr is: #+ function net_local() { return net ~ [ 11.11.11.0/24+, 12.12.12.0/24+ ]; } function rt_export() { if proto = "static_bgp" then return true; if source != RTS_BGP then return false; if net_martian() then return false; if bgp_path.len > 45 then return false; return bgp_path.first ~ [ 111 ]; } filter bgp_out_222 { if net_local() then accept; else reject; if ! rt_export() then reject; accept; } #v- I dont know how to announce two /24 to test-peer AS222 -- damkol@gmail.com
On Wed, Nov 16, 2011 at 12:35:13PM +0100, damkol@gmail.com wrote:
2011/11/16 Alexander Shikoff <[1]minotaur@crete.org.ua> #v- I dont know how to announce two /24 to test-peer AS222
I think the problem is that BIRD does not automatically aggregate routes. It just export routes from other protocol (like static or direct) according to filters. If you just want to announce two /24, then add two /24 routes using static protocol. (and you probably does not need direct routes from direct protocol to generate subnet routes). See this example: https://git.nic.cz/redmine/projects/bird/wiki/BGP_example_1 Where two aggregate routes (A.B.C.0/24 and D.E.F.0/24) are exported. -- 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."
2011/11/17 Ondrej Zajicek <santiago@crfreenet.org>
I think the problem is that BIRD does not automatically aggregate routes. It just export routes from other protocol (like static or direct) according to filters.
If you just want to announce two /24, then add two /24 routes using static protocol. (and you probably does not need direct routes from direct protocol to generate subnet routes).
See this example:
https://git.nic.cz/redmine/projects/bird/wiki/BGP_example_1
Where two aggregate routes (A.B.C.0/24 and D.E.F.0/24) are exported.
Of course i seen this example, but i need to route 11.11.11.128/25 via 11.11.11.66, and the rest directly connected in this /24 prefix. Without (even manually) forcing prefix aggregation, bird is a bit useless. Or how to do in other way which i not know? -- damkol@gmail.com
On Thu, Nov 17, 2011 at 08:54:46PM +0100, damkol@gmail.com wrote:
2011/11/17 Ondrej Zajicek <[1]santiago@crfreenet.org>
I think the problem is that BIRD does not automatically aggregate routes. It just export routes from other protocol (like static or direct) according to filters. If you just want to announce two /24, then add two /24 routes using static protocol. (and you probably does not need direct routes from direct protocol to generate subnet routes). See this example: [2]https://git.nic.cz/redmine/projects/bird/wiki/BGP_example_1 Where two aggregate routes (A.B.C.0/24 and D.E.F.0/24) are exported.
Of course i seen this example, but i need to route [3]11.11.11.128/25 via 11.11.11.66,
and the rest directly connected in this /24 prefix.
Without (even manually) forcing prefix aggregation, bird is a bit useless.
Or how to do in other way which i not know?
Try protocol static static_bgp { route 11.11.11.128/25 via 11.11.11.66; route 11.11.11.0/24 drop; } And leave only /24 in announces via filtering. -- MINO-RIPE
2011/11/17 Alexander Shikoff <minotaur@crete.org.ua>
Try protocol static static_bgp { route 11.11.11.128/25 via 11.11.11.66; route 11.11.11.0/24 drop; }
And leave only /24 in announces via filtering.
#v+ protocol static static_bgp { route 11.11.11.128/25 via 11.11.11.66; route 11.11.11.0/24 drop; } protocol device { scan time 30; } #v- This announce 11.11.11.0/24 and 11.11.11.128/25. In outgoing filter i changed to "if net ~ [ 11.11.11.0/24, 12.12.12.0/24 ] then accept;" and i have announced only two /24. I was convinced that there may be two routes in the configuration - the route down the larger prefix exclude smaller. Thanks guys. -- damkol@gmail.com
On Thu, Nov 17, 2011 at 08:54:46PM +0100, damkol@gmail.com wrote:
See this example:
[2]https://git.nic.cz/redmine/projects/bird/wiki/BGP_example_1
Where two aggregate routes (A.B.C.0/24 and D.E.F.0/24) are exported.
Of course i seen this example, but i need to route [3]11.11.11.128/25 via 11.11.11.66, and the rest directly connected in this /24 prefix.
In that case you keep the route 11.11.11.128/25 via 11.11.11.66 in static, there is no problem with that. You can have both 11.11.11.128/25 and 11.11.11.0/24 in the table, also you can have the directly connected subnets (but as they are usually already provided by OS, so it is usually useless to have them in BIRD table). The use of aggregate 'reject' routes is explained in the opening text in the example, but perhaps not clear enough. (i see that it is not mentioned in the example that the propagated routes in static_bgp proto may be aggregates of subnets used in OSPF). I don't really see the problem with that way in your case. Perhaps if you want to have some kind of dynamic aggregation, it might be problem. -- 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 (3)
-
Alexander Shikoff -
damkol@gmail.com -
Ondrej Zajicek