On 2009-06-08, Xavier Beaudouin <[email protected]> wrote:
> Hello,
>
> I use OpenBSD 4.5 on one of my router. I'd like to ADD a community to
> group of peer.
>
> I have currenlty such statements :
>
>
> # Set transit communities
> match from group Transit set { community 35189:9000, med 20 }
>
> # Set peering communities
> match from group Peering set { community 35189:8000, med 15 }
That works just fine. Look at "bgpctl sh rib detail".
The path received over a session with a member of group Transit will have
35189:9000 applied, and the path received over a session with a member
of group Peering will have 35189:8000 applied.
Here's an example, I'm applying 41103:3344 to paths from 3344, and
41103:25577 to paths from 25577, I receive 193.131.248/22 from both and
this is how it looks:
# bgpctl sh rib d 193.131.248/22
BGP routing table entry for 193.131.248.0/22
3344 21099 4589
Nexthop 85.116.1.209 (via 85.116.1.209) from kewlio.sorcerer (85.116.0.23)
Origin IGP, metric 5, localpref 250, external, valid, best
Last update: 07w0d01h ago
Communities: 41103:3344 3344:21099 3344:60000 3344:63300 21099:60000
21099:60001
^^^^^^^^^^
BGP routing table entry for 193.131.248.0/22
25577 25577 25577 4589
Nexthop 84.45.104.81 (via 84.45.104.81) from c4l-1 (10.134.221.14)
Origin IGP, metric 0, localpref 250, external, valid
Last update: 1d03h11m ago
Communities: 41103:25577 4589:1 4589:2 4589:14400 11341:1 11341:10
25577:21000 25577:21100 25577:21120
^^^^^^^^^^^
> Problem, if that I have same subnet on 2 group Transit and Peering so
> I cannot have both of them on the route.
I don't quite understand what this means. What does a subnet have
to do with anything?
> Is there any way to do :
>
> match from group Peering set { community +35189:8000, med 15 }
that is exactly what happens when you do
"match from group Peering set { community 35189:8000, med 15 }"
You aren't expecting to have Peering's filters applied to paths received
from Transit, are you?