Wednesday, November 30, 2022

Re: bgp conditional advertisement

On Thu, Dec 01, 2022 at 01:01:16AM +0200, Gregory Edigarov wrote:
> Hello,
>
> Having two sites in different physical locations, siteA is connected
> via uplink1 and uplink2, siteB is connected via uplink3 and uplink4.
> I want to announce prefixes from siteB if ASn not found originating
> from siteA, and vice versa. I.e. a feature that will work alike 'enforce
> localas yes' but start announces when ASn is gone. I could done it with
> some scripting, but would prefer to have it in bgpd.
> Is this possible solely with OpenBGPD?

Run an ibgp session between siteA and siteB. Announce only your prefixes
on those sessions. Tag them with a community. Make sure that these
prefixes are more preferred than the one you put in as backup. Filter out
prefixes with the tag. More or less like this:

# backup route using low localpref to be less preferred
network 192.0.2.0/24 set { localpref 1 }

# send my networks to siteA tagged with community
deny to siteA
allow to siteA prefix-set mynetworks set community local-as:42
# filter out announcement originated from siteA
deny to any community local-as:42

--
:wq Claudio

No comments:

Post a Comment