In case Network Manager does not help.For setting up policy routing on Linux, I am using the tutorial here: https://blog.scottlowe.org/2013/05/29/a ... y-routing/
Policy routing is much older and complicated than network namespaces. If you create 2 network namespaces each with a single interface in it, you can be assured any process in that namespace will only use that interface and none other. You'll get the effect of policy routing sans the complicated source-dependent routing tables.
To segregate a wireless interface to a namespace, you need to send its phy to the namespace, with something like "iw phy phy0 set netns name nswl0" to send wlan0 (attached to phy0) to a namespace called nswl0.
That case is specific to wireless. For ethernet, you can use the "ip" command instead (see link below)
To send regular processes like iperf to a specific namespace, you can use command "ip netns exec foons barproc", see https://baturin.org/docs/iproute2/#ip-netns
With a little bit of coaxing, you can even export physical interfaces to a running docker container if you require a richer environment: https://stackoverflow.com/a/32249814
Statistics: Posted by epoch1970 — Tue Jul 23, 2024 6:54 pm