Skip to main content
Calico Enterprise 3.20 (latest) documentation

Early Network Configuration

Early network configuration supplies labels and AS numbers to apply to each Calico Enterprise node, as well as peering and other network configuration to use during node startup prior to receiving BGPPeer and BGPConfiguration resources from the datastore. Early network configuration will be superseded by any BGPPeer or BGPConfiguration resources after successful startup.

Early network configurations are intended for use only when Calico Enterprise is being run in "early networking" mode, i.e. when operating a "dual ToR" networking configuration. If you are not running a dual-plane cluster, this is probably not what you are looking for! For configuring BGP networking under normal circumstances (when Calico Enterprise is running), see BGPConfiguration, BGPPeer, and BGPFilter.

For a detailed guide on how to set up dual ToR, see Deploy a dual ToR cluster.

Sample YAML

EarlyNetworkConfiguration differs from other Calico Enterprise resources, in that it is not directly applied with kubectl / calicoctl.

Instead, an EarlyNetworkConfiguration should be wrapped in a config-map named "bgp-layout" and placed in the "tigera-operator" namespace. It should also be copied to the filesystem of each node, so that Calico Enterprise, running in early networking mode, may read it, prior to any Kubernetes services being available.

apiVersion: projectcalico.org/v3
kind: EarlyNetworkConfiguration
spec:
platform: openshift
nodes:
# worker1
- interfaceAddresses:
- 172.31.11.3
- 172.31.12.3
stableAddress:
address: 172.31.10.3
asNumber: 65001
peerings:
- peerIP: 172.31.11.100
- peerIP: 172.31.12.100
labels:
rack: ra
# worker2
- interfaceAddresses:
- 172.31.21.4
- 172.31.22.4
stableAddress:
address: 172.31.20.4
asNumber: 65002
peerings:
- peerIP: 172.31.21.100
- peerIP: 172.31.22.100
labels:
rack: rb
legacy:
nodeAddressIPDetection: false
unconditionalDefaultRouteProgramming: false

Sample ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
name: bgp-layout
namespace: tigera-operator
data:
earlyNetworkConfiguration: |
apiVersion: projectcalico.org/v3
kind: EarlyNetworkConfiguration
spec:
nodes:
# worker1
- interfaceAddresses:
...

Early Network Configuration Definition

Spec

FieldDescriptionAccepted ValuesSchema Default
platformThe platform the cluster runs on. Unless running on OpenShift, can be left empty."", "openshift"""
nodesList of ConfigNode objects; provides the information necessary for each node to bootstrap dual ToR networkingConfigNode listEmpty
legacyLegacyConfig object, for toggling legacy behaviorLegacyConfig objectEmpty

ConfigNode

FieldDescriptionAccepted ValuesSchema Default
interfaceAddressesList of IP addresses assigned to interfaces on this nodelist of IP addressesEmpty
asNumberThe AS number of this node's BIRD.integer0
stablesAddressThe ConfigStableAddress that Calico Enterprise should assign to this node, describing the IP address that normal traffic should use for communicating with the nodeConfigStableAddress objectEmpty
peeringsList of ConfigPeering objects. Provides information about a node's ToRs, so that Calico Enterprise early-networking can establish a BGP session with themConfigPeering listEmpty
labelsAny labels that the node should have, so as to match the right BGPPeer definitions for its rack, when cnx-node runs as a Kubernetes pod.labels mapEmpty

LegacyConfig

FieldDescriptionAccepted ValuesSchema Default
nodeIPFromDefaultRouteToggles legacy behavior, where Calico Enterprise early networking would use the src IP of a default route to identify which ConfigNode to use.true, falsefalse
unconditionalDefaultRouteProgrammingToggles legacy behavior, where Calico Enterprise early networking would unconditionally program a default route to a ToR, regardless of whether one existed prior to startup.true, falsefalse

ConfigStableAddress

FieldDescriptionAccepted ValuesSchema Default
addressIP address which Calico Enterprise should provision during early networking as the "stable" addressIP Address string""

ConfigPeering

FieldDescriptionAccepted ValuesSchema Default
peerIPThe IP address of the ToRIP Address string""
peerASNumberThe AS number of the ToR. When left as 0, Calico Enterprise early networking will use its own node's AS numberinteger0