-
Notifications
You must be signed in to change notification settings - Fork 9
Description
A configuration program should read a config file with the customer information and configure the system with the right VLAN interfaces, routes, etc...
A configuration file could be a YAML file like:
interfaces:
- ifname: eth0
customers:
- id: 100
outer_vlan: 1000
inner_vlan: 400
ip_addresses:
- 10.0.0.1/32
- 2a00::1/64and will probably need some more information. The configuration utility reads this and sets up the right interfaces and routes to get traffic to and from the right interfaces, set needed sysctls, etc. This will also include installing the dhcp-relay XDP program on the physical interface(s), and any future BPF setup.
Just setting up VLAN interfaces and routes is a good start; this issue is meant as a place to flesh out exactly what we need to include in this configuration.
The utility itself should probably be written in a high-level language (i.e,. not C). Python comes to mind as a contender; the pyroute2 library should cover most of the configuration needs via netlink. For attaching BPF programs we can shell out to external utilities, or we can look into adding Python bindings for libbpf/libxdp.