Sunday, March 15, 2020

Network Isolation of Namespaces

First, here is a quick intro to namespaces. Note that namespaces and cgroups are orthogonal by design.
- Historical discussions
https://lwn.net/Articles/219794/  (2007)
https://lwn.net/Articles/531114/ (2013)

- Modern descriptions:
 https://jvns.ca/blog/2016/10/10/what-even-is-a-container/, and then newer discussion on network namespaces on linux: https://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/
"Each network namespace is a logically a separate networking stack, with separate addresses, separate firewall rules, separate qos policies etc.
Network devices and sockets belong to a particular network namespace and everything else figures out which network namespace you are talking about from the socket or network device."

This has nothing to do with systemd etc.
in this picture we created 3 pairs

  • ns1_veth0, globalns_veth1 (1st pair)
  • ns2_veth0, globalns_veth2 (2nd pair)
  • ns1_veth1, ns2_veth1 (3rd pair)
Originally all pairs exist in the default/global namespace, and we can assign them to different namespaces so that the picture looks like this:


https://etherarp.net/network-isolation-of-services-with-systemd/

Saturday, March 7, 2020

Infra Layers


Got this picture from https://www.theregister.co.uk/2017/12/06/what_is_terraform/, and it was enjoyable for me to see how I moved from the layer above (@Uber) to a layer below (@OCI)