OpenBGP: 3 doubts regarding localpref, rib out and announcement

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenBGP: 3 doubts regarding localpref, rib out and announcement

Eduardo Meyer
Hello,

I have 3 simple but yet annoying doubts. First, it's about localpref.
Today I have a /23 prefix which I announce only to one peer and which
I also go upstream to this very only peer. However the upstream policy
I had to use "pf route-to" to achieve the desired behavior. I could
not arrange to sort a match filter which would allow me to set
localpref to any destionation for a prefix of mine (outgoing). I cam,
for sure, arrange to set destination based localpref. Say, I can raise
or lower localpref for a given destination, but not for all
destionations from a /23 source of mine. Tried things like:

match to $peer_2 prefix X.Y.Z.0/23 set localpref +50

But it wont work as I need. Please remember X.Y.Z.0/23 is announced by me.

By second doubts is regarding "bgpctl show rib out". This command
shows what I announce in one OpenBGP router but does not shows on any
other one. I have read the man pages, I have softreconfig set o yes
for both in and out (which is the default, btw, as mentioned on man
page and as bgpd -nv shows me). Sometimes I use "bgpctl net show" but
thats not as nice as "sh rib out".

Finally, my last doubt. I want to re-announce the bogon prefix I get
from cymru projet to by internal BGP servers. I do "announce all" but
the bogon list prefixes I get from cymru don't get announced. I
managed to " set community delete NO_EXPORT" since I believed the
NO_EXPORT community cymru sends me is the cause of non-reannouncement
on "announce all" desired behavior.

However its still dont get announced to my peers.

I tried things like:

allow to $my_inner_peer community $cymruas:888

But they did not work. Any other suggestions?

Thank you.

--
===========
Eduardo Meyer
pessoal: [hidden email]
profissional: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: OpenBGP: 3 doubts regarding localpref, rib out and announcement

Henning Brauer
* Eduardo Meyer <[hidden email]> [2010-05-23 13:51]:

> Hello,
>
> I have 3 simple but yet annoying doubts. First, it's about localpref.
> Today I have a /23 prefix which I announce only to one peer and which
> I also go upstream to this very only peer. However the upstream policy
> I had to use "pf route-to" to achieve the desired behavior. I could
> not arrange to sort a match filter which would allow me to set
> localpref to any destionation for a prefix of mine (outgoing). I cam,
> for sure, arrange to set destination based localpref. Say, I can raise
> or lower localpref for a given destination, but not for all
> destionations from a /23 source of mine. Tried things like:
>
> match to $peer_2 prefix X.Y.Z.0/23 set localpref +50
>
> But it wont work as I need. Please remember X.Y.Z.0/23 is announced by me.

localpref for outgoing? that is useless. localpref is, well, local,
and not transmitted to the peer. and since you're setting it outbound
(after all route decisions) it is a noop.
 
> By second doubts is regarding "bgpctl show rib out". This command
> shows what I announce in one OpenBGP router but does not shows on any
> other one. I have read the man pages, I have softreconfig set o yes
> for both in and out (which is the default, btw, as mentioned on man
> page and as bgpd -nv shows me). Sometimes I use "bgpctl net show" but
> thats not as nice as "sh rib out".

sounds like you're after sh ri out nei foo

> Finally, my last doubt. I want to re-announce the bogon prefix I get
> from cymru projet to by internal BGP servers. I do "announce all" but
> the bogon list prefixes I get from cymru don't get announced. I
> managed to " set community delete NO_EXPORT" since I believed the
> NO_EXPORT community cymru sends me is the cause of non-reannouncement
> on "announce all" desired behavior.
> However its still dont get announced to my peers.

i bet this is an invalid nexthop case. set nexthop-self might be
required.

--
Henning Brauer, [hidden email], [hidden email]
BS Web Services, http://bsws.de
Full-Service ISP - Secure Hosting, Mail and DNS Services
Dedicated Servers, Rootservers, Application Hosting

Reply | Threaded
Open this post in threaded view
|

Re: OpenBGP: 3 doubts regarding localpref, rib out and announcement

Eduardo Meyer
On Sun, May 23, 2010 at 3:10 PM, Henning Brauer <[hidden email]> wrote:
>> match to $peer_2 prefix X.Y.Z.0/23 set localpref +50
>>
>> But it wont work as I need. Please remember X.Y.Z.0/23 is announced by me.
>
> localpref for outgoing? that is useless. localpref is, well, local,
> and not transmitted to the peer. and since you're setting it outbound
> (after all route decisions) it is a noop.

I believe I was not clear. I need to set a certain prefix of mine with
a higher localpref. It's not expected to be transmitted to the peer,
it's a local router policy decision to set localpref for a local /23.

Today I do this with pf route-to.

pass route-to peer2_ip from x.y.z.0/23 to any

> sounds like you're after sh ri out nei foo

Thats excactly what I wanted, thank you a lot Brauer.

>
>> Finally, my last doubt. I want to re-announce the bogon prefix I get
>> from cymru projet to by internal BGP servers. I do "announce all" but
>> the bogon list prefixes I get from cymru don't get announced. I
>> managed to " set community delete NO_EXPORT" since I believed the
>> NO_EXPORT community cymru sends me is the cause of non-reannouncement
>> on "announce all" desired behavior.
>> However its still dont get announced to my peers.
>
> i bet this is an invalid nexthop case. set nexthop-self might be
> required.

That's why I like talking to whom knows. You are absolutely right,
thank you again :) I could export it setting it to a reachable
nexthop.

But now I tried something else which did not work.

My scenario:

group "cymru" {
 ...
 set community $myasn:6
 ...
 peer $cymru1 {
   ...
   ...
 }
 peer $cymru2 {
   ...
 }
}

#match from any community $myasn:6 set community delete NO_EXPORT #
[1] works great
match to $transit_peer1 community $myasn:6 set community delete
NO_EXPORT # [2] wont work, never gets deleted

My intention: export selectively what I get from group cymru, by
selectively removing the NO_EXPORT community.

If I comment [1] and uncomment [2] the rule wont match. [1] always match fine...

In fact I tested a number o rules and nome with "match to .. set X"
worked, when I am dealing with a prefix I got from someone else (not
announced by be).

What am I missing?


--
===========
Eduardo Meyer
pessoal: [hidden email]
profissional: [hidden email]