MetalLB in BGP-Mode Configuration

MetalLB in BGP-mode provides a more robust configuration for the Node Management Network (NMN), Hardware Management Network (HMN), and Customer Access Network (CAN). This configuration is generated from the csi config init input values. BGP-mode is enabled by updating the protocols in these configuration files.

MetalLB Peer Configuration

The content for metallb_bgp_peers is generated by the csi config init command. In addition to the MetalLB configuration, there is configuration needed on the spine switches to set up the BGP router on these switches.

The MetalLB ConfigMap can also be viewed:

peers:
- peer-address: 10.252.0.1
  peer-asn: 65533
  my-asn: 65533
- peer-address: 10.252.0.3
  peer-asn: 65533
  my-asn: 65533

To retrieve data about BGP peers:

ncn-m001# kubectl get cm config -n metallb-system

The speakers get their peering configuration from the MetalLB ConfigMap. This configuration specifies the IP address of the spine or aggregate switch, as well as the Autonomous System Number (ASN) for the speaker and the switch with which it is peering. This ASN should be the same for both.

CAN Configuration

This network has two MetalLB address pools, one for static IP allocation and the other for dynamic IP allocation. Static allocation guarantees the same IP allocation for services using this pool across deployment and installations. Dynamic allocations means that the allocated IP addresses will be in this pool, but may change depending on the timing and ordering of the IP allocation.

View the address pool configurations in the MetalLB ConfigMap after localization occurs. The MetalLB ConfigMap should not be edited directly. The following is an example of the values in the ConfigMap:

- name: can-dynamic-pool
  **protocol: bgp**
  addresses:
    **- 10.102.5.128/25**
- name: can-static-pool
  **protocol: bgp**
  addresses:
    **- 10.102.5.112/28**

The CAN configuration is set in the csi config init input:

linux# csi config init
.
.
.
     --can-cidr 10.102.5.0/26
     --can-gateway 10.102.5.27
     --can-static-pool 10.102.5.28/30
     --can-dynamic-pool 10.102.5.32/27
.
.
.