diff options
author | Alyssa Ross <hi@alyssa.is> | 2020-12-19 16:07:22 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-04-14 23:42:56 +0000 |
commit | a71eb59d8acf8f02328db002b89d4db78bb9ae56 (patch) | |
tree | 8dc0f45b8af0a90039c06296174f1eba4f7d1be6 /pkgs/os-specific/linux/spectrum/linux | |
parent | 03f8ca8da40dd26d0a2542fef51d28eb943d4442 (diff) | |
download | nixpkgs-a71eb59d8acf8f02328db002b89d4db78bb9ae56.tar nixpkgs-a71eb59d8acf8f02328db002b89d4db78bb9ae56.tar.gz nixpkgs-a71eb59d8acf8f02328db002b89d4db78bb9ae56.tar.bz2 nixpkgs-a71eb59d8acf8f02328db002b89d4db78bb9ae56.tar.lz nixpkgs-a71eb59d8acf8f02328db002b89d4db78bb9ae56.tar.xz nixpkgs-a71eb59d8acf8f02328db002b89d4db78bb9ae56.tar.zst nixpkgs-a71eb59d8acf8f02328db002b89d4db78bb9ae56.zip |
spectrumPackages.sys-vms.net: init
This is a VM that acts as a router. It handles talking to network hardware, and other VMs can be connected to it by attaching virtual ethernet devices. It expects to get a physical ethernet device passed through to it using VFIO. Wi-Fi should work too, but would need to be configured so I've stuck with Ethernet for now. We use ConnMan[1] to configure physical network interfaces, and it automatically takes care of DHCP and stuff for us. I chose ConnMan over NetworkManager because it was easier to get set up. Virtual ethernet devices are identified by a specific OUI in their MAC address. The NIC part of the MAC address is used to encode the last three octets of the IPv4 address this VM should assign to the interface. This way, the host can tell this VM what the address of each virtual interface is without having to resort to a secondary communication channel. The first octet will always be 100, as the intention is to use the IPv4 shared address space (aka the CGNAT space) for inter-VM networks to match the behaviour of Chromium OS[2]. Every networking client will be connected to a router VM with a /31, where the low address is for the router, and the high address is for the client. This way the host's job is as simple as possible -- it just has to connect two TAPs together, without worrying about any routing rules or anything -- that can all happen in the VM. This does mean that the router has to have a virtio-net device for every client, though. We may run into scaling limitations with this approach, in which case we might have to revisit how this works on the host. [1]: https://git.kernel.org/pub/scm/network/connman/connman.git/about/ [2]: https://chromium.googlesource.com/chromiumos/platform2/+/39e48f668a937d266638f3f7d31d3427a4966464/patchpanel/address_manager.cc#13 Message-Id: <20210411115740.29615-15-hi@alyssa.is> Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Diffstat (limited to 'pkgs/os-specific/linux/spectrum/linux')
0 files changed, 0 insertions, 0 deletions