Skip to main content
Version: 3.28 (latest)

BGP configuration

A BGP configuration resource (BGPConfiguration) represents BGP specific configuration options for the cluster or a specific node.

Sample YAML

apiVersion: projectcalico.org/v3
kind: BGPConfiguration
metadata:
name: default
spec:
logSeverityScreen: Info
nodeToNodeMeshEnabled: true
nodeMeshMaxRestartTime: 120s
asNumber: 63400
serviceClusterIPs:
- cidr: 10.96.0.0/12
serviceExternalIPs:
- cidr: 104.244.42.129/32
- cidr: 172.217.3.0/24
listenPort: 178
bindMode: NodeIP
communities:
- name: bgp-large-community
value: 63400:300:100
prefixAdvertisements:
- cidr: 172.218.4.0/26
communities:
- bgp-large-community
- 63400:120

BGP configuration definition

Metadata

FieldDescriptionAccepted ValuesSchema
nameUnique name to describe this resource instance. Required.Alphanumeric string with optional ., _, or -.string
  • The resource with the name default has a specific meaning - this contains the BGP global default configuration.
  • The resources with the name node.<nodename> contain the node-specific overrides, and will be applied to the node <nodename>. When deleting a node the BGPConfiguration resource associated with the node will also be deleted. Only prefixAdvertisements, listenPort, and logSeverityScreen can be overridden this way.

Spec

FieldDescriptionAccepted ValuesSchemaDefault
logSeverityScreenGlobal log levelDebug, Info, Warning, Error, FatalstringInfo
nodeToNodeMeshEnabledFull BGP node-to-node mesh. Only valid on the global default BGPConfiguration.true, falsestringtrue
asNumberThe default local AS Number that Calico should use when speaking with BGP peers. Only valid on the global default BGPConfiguration; to set a per-node override, use the bgp field on the Node resource.A valid AS Number, may be specified in dotted notation.integer/string64512
serviceClusterIPsThe CIDR blocks for Kubernetes Service Cluster IPs to be advertised over BGP. Only valid on the global default BGPConfiguration: will be ignored otherwise.A list of valid IPv4 or IPv6 CIDR blocks.List of cidr: <ip>/<prefix length> values.Empty List
serviceExternalIPsThe CIDR blocks for Kubernetes Service External IPs to be advertised over BGP. Kubernetes Service External IPs will only be advertised if they are within one of these blocks. Only valid on the global default BGPConfiguration: will be ignored otherwise.A list of valid IPv4 or IPv6 CIDR blocks.List of cidr: <ip>/<prefix length> values.Empty List
serviceLoadBalancerIPsThe CIDR blocks for Kubernetes Service status.LoadBalancer IPs to be advertised over BGP. Kubernetes LoadBalancer IPs will only be advertised if they are within one of these blocks. Only valid on the global default BGPConfiguration: will be ignored otherwise.A list of valid IPv4 or IPv6 CIDR blocks.List of cidr: <ip>/<prefix length> values.Empty List
listenPortThe port where BGP protocol should listen.A valid port number.integer179
bindModeIndicates whether to listen for BGP connections on all addresses (None) or only on the node's canonical IP address Node.Spec.BGP.IPvXAddress (NodeIP). If this field is changed when calico-node is already running, the change will not take effect until calico-node is manually restarted.None, NodeIP.stringNone
communitiesList of BGP community names and their values, communities are not advertised unless they are used in prefixAdvertisements.List of communities
prefixAdvertisementsList of per-prefix advertisement properties, like BGP communities.List of prefixAdvertisements
nodeMeshPasswordBGP password for the all the peerings in a full mesh configuration.BGPPasswordnil (no password)
nodeMeshMaxRestartTimeRestart time that is announced by BIRD in the BGP graceful restart capability and that specifies how long the neighbor would wait for the BGP session to re-establish after a restart before deleting stale routes in full mesh configurations. Note: extra care should be taken when changing this configuration, as it may break networking in your cluster. When not specified, BIRD uses the default value of 120 seconds.10s, 120s, 2m etc.[Duration string][parse-duration]nil (empty config, BIRD will use the default value of 120s)
ignoredInterfacesList of network interfaces to be excluded when reading device routes.A list of network interface names. The names can contain the wildcard character asterisk * to specify groups of interface names.List of stringnil (no extra interfaces to be ignored)

communities

FieldDescriptionAccepted ValuesSchema
nameName or identifier for the community. This should be used in prefixAdvertisements to advertise the community value.string
valueStandard or large BGP community value.For standard community, value should be in aa:nn format, where both aa and nn are 16 bit integers.
For large community, value should be aa:nn:mm format, where aa, nn and mm are all 32 bit integers.
Where aa is an AS Number, nn and mm are per-AS identifier.
string

prefixAdvertisements

FieldDescriptionAccepted ValuesSchema
cidrCIDR for which properties should be advertised.cidr: XXX.XXX.XXX.XXX/XXstring
communitiesBGP communities to be advertised.Communities can be list of either community names already defined in communities or community value of format aa:nn or aa:nn:mm.
For standard community, value should be in aa:nn format, where both aa and nn are 16 bit integers.
For large community, value should be aa:nn:mm format, where aa, nn and mm are all 32 bit integers.
Where aa is an AS Number, nn and mm are per-AS identifier.
List of string

Supported operations

Datastore typeCreateDeleteDelete (Global default)UpdateGet/ListNotes
etcdv3YesYesNoYesYes
Kubernetes API serverYesYesNoYesYes