nnn21
nnn21

Reputation: 31

Multiple NIC and Docker containers

I'm trying to solve specific problem regarding Docker containers and routing.

A Docker host is running several network interfaces (3G USB modems), each having internet access. So, in short;

eth0 - WAN IP 1
ppp0 - WAN IP 2
ppp1 - WAN IP 3
ppp2 - WAN IP 4

How to specify which NIC each container should use if I want container to use a specific one?

Upvotes: 3

Views: 1964

Answers (1)

Polinux
Polinux

Reputation: 1074

Yes I ahed very similar issue. Unfortunately I had to use VirtualBox for this to work properly.

I have used Vagrant to create VirtualBox Virtual Machine and provisioned it with Ansible and then changed default route of that VM. Something like this:

route add default gw IP2

That would mean creating 4 different VM's but thats how I would approach the problem.

Upvotes: 1

Related Questions