Building a Linux Container Using Namespaces: Part – 1 (2020)
polarsparc.com
polarsparc.com
* The What, Why and How of Containers (https://www.annwan.me/computers/what-why-how-containers/)
* Containers from Scratch (https://ericchiang.github.io/post/containers-from-scratch/)
* Linux Containers From Scratch in C (https://www.lucavall.in/blog/barco-linux-containers-from-scr...)
* Life of a Container (https://indradhanush.github.io/blog/life-of-a-container/)
* 10-part series explaining all relevant Linux container mechanisms ( https://www.schutzwerk.com/blog/linux-container-intro/ )
You could possibly just use network namespaces.
While I am too familiar with it to suggest effort required, looking at the Openstack project and how they provision tenant networks may help.
It is just python with a three tier model with a message bus. But how they interface with libvirt may help if the namespace abstraction support for the 'ip' command is too clunky for you.
It doesn't give you independent stacks and openvswitch will let you build almost anything you would need.
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36