Skip to content

Knowledge Base⚓︎

How do I add extra network interfaces to my UPF, PGW, SMF or AMF?⚓︎

Network segments (subnets/VLANs/VPCs/etc) are configured under the global section of the values.yaml file used to drive the xCore/xRouter installation and configuration, e.g:

global:
  networks:
    n6:
      create: true
      cniVersion: 0.3.1
      type: macvlan # (macvlan/ipvlan/macvlan/host-device/sr-iov/bridge)
      master: enp4s0 # (eth0/enp3s0/nic-1/wlp2s0)
      ipam:
        type: host-local # (whereabouts/multus-dhcp)
        subnet: 198.19.19.0/24
        rangeStart: 198.19.19.254
        rangeEnd: 198.19.19.254
For details on available types and options see the official Multus documentation and the official MetalLB documentation.

Each Multus interface will show up as an extra netX interface in the Kubernetes Pod, Static Routes can be modified and added using the route-override CNI and dynamic routes can be modified using the FRR routing daemon section.

Multus network with Static Route:

global:
  networks:
    n6:
      create: true
      cniVersion: 0.3.1
      plugins:
      - type: macvlan
        master: eth0
        ipam:
          type: whereabouts
          subnet: 198.19.19.0/24
          rangeStart: 198.19.19.254
          rangeEnd: 198.19.19.254
      - type: route-override
        flushroutes: false
        delroutes:
          - dst: 192.168.255.0/24
        addroutes:
          - dst: 192.168.255.0/24
            gw: 198.19.19.1
Multus network with Dynamic Routes:
global:
  networks:
    n6:
      create: true
      cniVersion: 0.3.1
      plugins:
      - type: macvlan
        master: eth0
        ipam:
          type: whereabouts
          subnet: 198.19.19.0/24
          rangeStart: 198.19.19.254
          rangeEnd: 198.19.19.254
  frr:
    - name: n6bgp
      bgp:
        routers:
          - asn: 64512
            neighbors:
            - address: 198.19.19.1
              asn: 64512
              disableMP: false
              port: 179
              toAdvertise:
                allowed:
                  mode: all
                  #mode: filtered
                  #prefixes:
                  #- 172.30.0.0/16
                  #- 10.128.0.0/14
              toReceive:
                allowed:
                  mode: all
                  #mode: filtered
                  #- prefix:  192.168.255.0/24
                  #  ge: 24
                  #  le: 32
            prefixes:
            - 172.30.0.0/16
            - 10.128.0.0/14
MetalLB interfaces are created dynamically by the MetalLB daemonset and traffic is forwarded to the eth0 interface of the Pod, additional routes can be added/removed using the FRR section. Note that FRR configuration can affect the advertisement of MetalLB interfaces when allowed advertisements are specified.

global:
  networks:
    n2mlb:
      # Note that any addresses for networks wiht advertisementType "bgp" will
      # need to be included in the allowed prefixes of bgp routers defined in
      # the frr section.
      create: false
      apiVersion: metallb.io/v1beta1
      advertisementType: bgp
      addresses:
        - 192.168.10.0/24
        - 192.168.9.1-192.168.9.5
        - fc00:f853:0ccd:e799::/124

There is no limit on the number of networks that can be configured and the naming is left to the discression of the operator. Some networking types might not be available on cloud hosted K8s implementation, notable GKE and AKS don't allow Multus or MetalLB networking and the default NodePort interfaces need to be used.