-
Notifications
You must be signed in to change notification settings - Fork 1
Setup Gateway
Alexander Sohn edited this page Mar 16, 2023
·
2 revisions
The gateway is responsible for forwarding the internet traffic. We use an Ubuntu server host. We provide an ansible playbook, that generates a netplan config, a dnsmasq config and the nftables rules for a given number of VXLANs. This playbook will only work with an Ubuntu host and might need some tweaking to fit your use case.
- Install
frr
on the gateway. - Copy
sample-configs/gateway/daemons
andsample-configs/gateway/frr.conf
to the directory/etc/frr/
. Check the permissions and ownership afterward withls -l /etc/frr
. They should look like this:
-rw-r----- 1 frr frr daemons
-rw-r----- 1 frr frr frr.conf
- Replace placeholder values in sample configs with actual values
- Restart
frr
- Create all vxlan interfaces with the script
sample-configs/gateway/setup_vxlan.sh
. The script creates one bridge and one vxlan interface for every vni.
An alternative approach to using this script is using netplan
. An advantage is that the interfaces will be created at boot. A sample netplan configuration can be found in sample-configs/gateway/netplan.config
.
- Execute
sudo sysctl -w net.ipv4.ip_forward=1
to allow IPv4 forwarding. - Execute
sudo sysctl -w net.ipv6.conf.all.forwarding=1
to allow IPv6 forwarding.
- Install
nftables
- Copy
sample-configs/gateway/nftables.conf
. Adapt the variables vxlans and uplinks according to your setup.
- Install
dnsmasq
as dhcp-server on the gateway. - Copy dnsmasq config.
sample-configs/gateway/dnsmasq.conf
. This is a config file matching the default setup ofsample-configs/gateway/setup_vxlan.sh
. If you change anything within this script, the config probably has to be updated. - Restart dnsmasq.