How to run loxilb in standalone mode

This guide will help users to run loxilb in a standalone mode decoupled from kubernetes.


This guide uses Ubuntu 20.04.5 LTS as the base operating system

Install golang

sudo snap install --classic --channel=1.18/stable go

Install gobgp

wget && tar -xzf gobgp_3.5.0_linux_amd64.tar.gz &&  sudo mv gobgp* /usr/sbin/ && rm LICENSE

Enable IPv6 (if running NAT64/NAT66)

sysctl net.ipv6.conf.all.disable_ipv6=0
sysctl net.ipv6.conf.default.disable_ipv6=0

Install loxilb

sudo dpkg -i loxilb_0.8.4-amd64.deb

Setup and Configuration

In this example, the loxilb node has two interfaces - enp0s3 and enp0s5. “enp0s3” for serving incoming requests and “enp0s5” for internal end-points. The topology is as follows:


The configuration can be simply done as follows:

ip addr add 3ffe::1/64 dev enp0s3
ip addr add 2001::1/128 dev lo   ## Note 2001::1 is the LB service VIP
ip addr add dev enp0s5

Any other required configuration can be done in a similar way. Now, let's create a LB entry by using the command:

loxicmd create lb 2001::1 --tcp=2020:8080 --endpoints=

Validate entry is created using the command:

loxicmd get lb -o wide

In the above we are using NAT64 with a single end-point. There are various options to create LB entries in loxilb.

Working with gobgp

loxilb works in tandem with gobgp when bgp services are required. As a first step, create a file gobgp.conf and add the basic necessary fields :

  as = 64512
  router-id = ""

    neighbor-address = ""
    peer-as = 64512

Copy this file to actual config file used by gobgp :

sudo mkdir -p /etc/gobgp/
sudo cp -f gobgp.conf /etc/gobgp/gobgp.conf

The gobgp daemon should pick the configuration. The neighbors can be verified by :

gobgp neighbor

At run time, there are two ways to change gobgp configuration. Ephemeral configuration can simply be done using “gobgp” command as detailed here. If persistence is required, then one can change the gobgp config file /etc/gobgp/gobgp.conf and apply SIGHUP to gobgpd process for loading the edited configuration.

pkill -1 gobgpd

Persistent LB entries

To save the created rules across reboots, one can use the following command:

sudo mkdir -p /etc/loxilb/
sudo loxicmd save --lb