moby / moby/libnetwork

Docker Swarm Host - dockerd w/ Multiple Interfaces (eth0 & eth1)

Open
#2,395 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
875
PR merge metrics
No merged PRs in 30d

Description

I have a docker swarm cluster running engine 18.09-ce. One node, running Amazon Linux 2 (a fork of Centos 7), has two physical interfaces on the same subnet (ENIs attached to an AWS EC2 Instance) with 1-to-1 NATing from public IP addresses to these RFC1918 addresses associated with the ENIs.

I can successfully:

  • ping the host externally (from my laptop on a different network) via both public addresses
  • access traditional host services running on both interfaces (e.g. service start nginx responds on both ENIs via curl <public-address-1> and curl <public-address-2>)
  • containers in --network=host mode work on both interfaces (e.g. can curl <public-address-1> and curl <public-address-2> a running nginx container via both ENIs)

I cannot access via the second ENI:

  • when run as docker run -d -p 0.0.0.0:80:80 nginx
  • when run as a docker swarm service with 'host-mode' publishing

In both of these 'failure' scenarios I can still access the container from the primary ENI.

I have noticed some issues that may be relevant:

  1. https://github.com/docker/libnetwork/issues/758
  2. https://github.com/moby/moby/issues/24317

Is it possible to accept traffic from multiple physical interfaces when scheduling services with Docker Swarm? Is there some internal restriction with the data-plane or another docker engine feature that is prohibiting this? Are there other ways to make it work?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names docker run port publishing and Docker Swarm services with host-mode publishing, but no source files or tests. Start by reproducing the two-interface setup and compare published traffic through each ENI. Done means establishing whether both interfaces are supported and documenting the confirmed limitation or required configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, docker
Domain
networking
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.