BGP Action
A BGP Action is an action configured with a type of "bgp-v4" for IPv4 announcements, and "bgp-v6" for IPv6 announcements. When this action is started, one or more BGP announcements are made based on its configuration, and withdrawn when the action is stopped.
[actions.BgpExample]
type = "bgp-v4"
# Determines what prefix(es) are announced. If destination resolves to multiple prefixes,
# this action will result in multiple announcements
destination = "detected"
# The next hop address for each route
next-hop = "192.0.2.100"
# An IPv6 next-hop is only valid for type "bgp-v6"
# next-hop = "2001:db8::F00"
# If present, any prefix longer than this value will be announced with this mask
# length.
# WARNING - this may not respect zone boundaries, it is your responsibility to
# make sure this feature is applied properly.
# Optional
# Must be <=32 for "bgp-v4", and <=128 for "bgp-v6"
aggregate = 24
# Zero or more communities to add to the announcement.
# Optional.
communities = [
"NO_EXPORT",
"64496:123",
]
# Zero or more large communities (RFC 8092) to add to the announcement.
# Optional
large-communities = [
"123:456:789",
]
# Set the AS Path of the announcement
# Optional
as-path = [64496, 64496, 64496]
# Sets BGP LOCAL_PREF attribute.
# Optional
local-pref = 100
# Sets BGP MULTI_EXIT_DISC attribute - multiple exit discriminator.
# Optional
multi-exit-disc = 10
# Sets AIGP attribute (RFC 7311)
# Optional
aigp-metric = 10
# Just log, don't actually announce anything
# Optional, default is false
no-op = true
Keys
The following sets of keys can be configured for a BGP Action:
destination: A required value identifying the set of prefixes that will be announced by this BGP Action. The set of acceptable values maps to thedestinationspecial data type. It can be set to match what triggered theworkflow(potentially producing multiple prefixes) or set to a static value. If multiple prefixes are produced by thedestinationvalue, this will result in multiple announcements. If a static value, this must match the address family of theactiontype(i.e. IPv4 for "bgp-v4" and IPv6 for "bgp-v6").next-hop: A reguired value identifying the next hop address for each route. Must match the address family of theactiontype(i.e. IPv4 for "bgp-v4" and IPv6 for "bgp-v6").aggregate: An optional value, that if configured, uses this value to mask announcements for longer prefixes. For example, if there was a single detected IPv4 /32 host, andaggregatewas set to /24, it would announce the /24 that encloses that /32.
warning
Depending on the aggregate value, the derived announcement could affect traffic to a Zone other than the one associated with this action's workflow. You are responsible for deconflicting cases where a Zone may have routing that is affected by these overlaps.
communities: An optional list of BGP Communities that will be used in the announcement. Each entry can be one of the values from the community special type.large-communities" An optional list of BGP Large Communities to add to the announcement. Each entry requires three colon-separated numbers between 0 and 4294967295, such as "123:456:789".as-path: An optional list of AS numbers that will be set as the AS Path in the announcement. This can be used when you want to do path prepending.local-pref: An optional value that, when set, modifies the BGP LOCAL_PREF attribute that will be used in the announcement.multi-exit-disc: An optional value that, when set, modifies the BGP MULTI_EXIT_DISC attribute that will be used in the announcement.aigp-metric: An optional value that, when set, modifies the BGP AIGP attribute used in the announcement. The metric value used will be the value field set within the AIGP TLV.no-op: An optional value that, when set to true, indicates this BGP Action should be logged only, but not actively make announcements. This can be useful to test your configuredactionto ensure that any BGP announcements are being made as you expect, without actually redirecting any traffic.