Configuration

OpenPERouter requires two main configuration components: the Underlay configuration for external router connectivity and a VPN specific configuration for overlays.

OpenPERouter supports two overlay technologies:

All Custom Resources (CRs) must be created in the same namespace where OpenPERouter is deployed (typically openperouter-system).

Underlay Configuration #

The underlay configuration establishes BGP sessions with external routers (typically Top-of-Rack switches).

Basic Underlay Configuration #

apiVersion: openpe.openperouter.github.io/v1alpha1
kind: Underlay
metadata:
  name: underlay
  namespace: openperouter-system
spec:
  asn: 64514
  interfaces:
    - type: NetworkDevice
      networkDevice:
        interfaceName: toswitch
  neighbors:
    - asn: 64512
      address: 192.168.11.2

For the full list of configuration fields, see the API Reference documentation.

Multiple Interfaces and Neighbors #

OpenPERouter supports configuring multiple physical network interfaces and multiple BGP neighbors for production deployments with redundancy and multi-path networking.

Example with multiple neighbors and interfaces:

apiVersion: openpe.openperouter.github.io/v1alpha1
kind: Underlay
metadata:
  name: underlay
  namespace: openperouter-system
spec:
  asn: 64514
  
  # Multiple interfaces for redundancy
  interfaces:
    - type: NetworkDevice
      networkDevice:
        interfaceName: toswitch
    - type: NetworkDevice
      networkDevice:
        interfaceName: toswitch2
  
  # Multiple neighbors for dual-ToR setup
  neighbors:
    - asn: 64512
      address: 192.168.11.2
    - asn: 64512
      address: 192.168.11.3
    - asn: 64513
      address: 192.168.12.2
    - asn: 64513
      address: 192.168.12.3

Validation requirements:

  • At least one neighbor must be configured
  • At least one NIC must be configured
  • Neighbor addresses must be unique
  • NIC names must be unique
  • Local ASN must differ from all neighbor ASNs

Per-Node Configuration #

The Underlay resource supports an optional nodeSelector field that allows you to target specific configurations to specific nodes. This is useful for multi-rack deployments, multi-datacenter clusters, or heterogeneous hardware environments.

For detailed information and examples, see the Node Selector Configuration documentation.

Using Helm Values #

You can specify the Multus network annotation using Helm values:

# values.yaml
openperouter:
  multusNetworkAnnotation: "macvlan-conf"

Or when installing with Helm:

helm install openperouter ./charts/openperouter \
  --set openperouter.multusNetworkAnnotation="macvlan-conf"

This will add the annotation k8s.v1.cni.cncf.io/networks: macvlan-conf to the router pods.

Using Kustomize #

Alternatively, you can use kustomize to add the annotation to the router pod:

# kustomization.yaml
patches:
- target:
    kind: DaemonSet
    name: router
  patch: |-
    - op: add
      path: /spec/template/metadata/annotations
      value:
        k8s.v1.cni.cncf.io/networks: macvlan-conf

Sysctl Configuration #

OpenPERouter automatically tunes several kernel sysctl settings inside the router’s network namespace (IP forwarding, ARP accept, IPv6 Neighbor Advertisement accept). Some of these settings require a minimum kernel version.

For the full list of sysctls and kernel requirements, see the Sysctl Configuration documentation.