Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration utility #12

Open
tohojo opened this issue Nov 10, 2021 · 0 comments
Open

Configuration utility #12

tohojo opened this issue Nov 10, 2021 · 0 comments

Comments

@tohojo
Copy link
Member

tohojo commented Nov 10, 2021

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/64

and 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant