Network namespaces in the Linux kernel

Namespaces and cgroups are two of the main kernel technologies most of the new trend on software containerization (think Docker) rides on. To put it simple, cgroups are a metering and limiting mechanism, they control how much of a system resource (CPU, memory) you can use. On the other hand, namespaces limit what you can see. Thanks to namespaces processes have their own view of the system’s resources.

The Linux kernel provides 6 types of namespaces: pid, net, mnt, uts, ipc and user. For instance, a process inside a pid namespace only sees processes in the same namespace. Thanks to the mnt namespace, it’s possible to attach a process to its own filesystem (like chroot). In this article I focus only in network namespaces.

If you have grasped the concept of namespaces you may have at this point an intuitive idea of what a network namespace might offer. Network namespaces provide a brand-new network stack for all the processes within the namespace. That includes network interfaces, routing tables and iptables rules.


  1. 2016-04-14 1:07 am
    • 2016-04-14 5:45 am
      • 2016-04-14 12:12 pm
        • 2016-04-14 10:12 pm
      • 2016-04-14 7:17 pm
        • 2016-04-14 10:34 pm
      • 2016-04-14 7:48 pm
        • 2016-04-15 4:23 am
      • 2016-04-15 1:51 pm
      • 2016-04-15 6:33 pm
        • 2016-04-18 9:47 pm
    • 2016-04-15 1:39 pm
  2. 2016-04-14 7:18 am