Search code examples
linuxnetwork-programminglxclinux-namespaces

How LXC implements network namespace?


I would like to know how LXC implement network namespace. One particular aspect is how it connects the virtual interface in a namespace to the physical interface. Assume that the network in a namespace connects to a veth, and the root namespace uses eth0, how does LXC connect veth to eth0? Does it use Linux bridge, or OpenVswitch?


Solution

  • There are different ways to connect containers to the network, described here. I always use the SimpleBridge method, because it's easy to setup and I never had any problems with it.