Configuring Native Container Routing
You are viewing documentation for a release that is no longer supported. The latest supported version of version 3 is [3.11]. For the most recent version 4, see
The following describes a general network setup:
11.11.0.0/16 is the container network.
The 11.11.x.0/24 subnet is reserved for each node and assigned to the Docker Linux bridge.
The router has routes for each node, so it can be directed to the right node.
IP forwarding is enabled on each node.
The following diagram shows the container networking setup described in this topic. It uses one Linux node with two network interface cards serving as a router, two switches, and three nodes connected to these switches.
You can set up container networking using existing switches and routers, and the kernel networking stack in Linux.
As a network administrator, you must modify, or create a script to modify, the router or routers when new nodes are added to the cluster.
You can adapt this process to use with any type of router.
Modify the Docker startup script to use the new bridge. By default, the startup script is the file:
# docker -d -b lbr0 --other-options
Enable IP forwarding on the node:
The following procedure assumes a Linux box with multiple NICs is used as a router. Modify the steps as required to use the syntax for a particular router:
Enable IP forwarding on the router:
Add a route for each node added to the cluster:
# ip route add <node_subnet> via <node_ip_address> dev <interface through which node is L2 accessible>