====== Linux: Network Namespaces ====== * https://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/ * https://blogs.igalia.com/dpino/2016/04/10/network-namespaces/ * https://serverfault.com/questions/127636/force-local-ip-traffic-to-an-external-interface * http://www.opencloudblog.com/?p=66 * https://www.opencloudblog.com/?p=96 sudo ip netns add blue sudo ip netns add red sudo ifconfig ens2f0 up sudo ifconfig ens2f1 up sudo ip link set dev ens2f0 netns blue sudo ip link set dev ens2f1 netns red sudo ip netns exec blue ifconfig ens2f0 10.1.1.1/24 up sudo ip netns exec blue ifconfig lo up # bring up Loopback sudo ip netns exec red ifconfig ens2f1 10.1.1.2/24 up sudo ip netns exec red ifconfig lo up # bring up Loopback # showing the current config (needs to be executed in the relevant namespace) sudo ip netns exec blue ifconfig sudo ip netns exec red ifconfig sudo ip netns exec red ping 10.1.1.1 sudo ip netns exec red ping 10.1.1.2 sudo ip netns exec blue ping 10.1.1.2 sudo ip netns exec blue iperf -s -p 8001 sudo ip netns exec red iperf -c 10.1.1.1 -p 8001 -t 10 -i 2 ==== Simulation ==== * https://serverfault.com/questions/655317/simulate-slow-connection-between-two-ubuntu-server-machines * https://wiki.linuxfoundation.org/networking/netem