Skip to content

docker container failed to collect two IP from the same network #34571

@walty8

Description

@walty8

Description
The docker container tried to collect two IP from the SAME bridge network. (For experiments of load balancing.) I tried to create a docker container, and use docker connect to get two IP, but only one IP appeared.

Steps to reproduce the issue:

  1. docker-compose create

  2. docker network create -d bridge --gateway=172.26.0.1 --subnet=172.26.0.0/16 network_2

  3. docker network connect network_2 container_2 --ip=172.26.0.3

  4. docker network connect network_2 container_2 --ip=172.26.0.4

no error message here

  1. docker-compose up -d

  2. docker exec -it container_2 ifconfig

Describe the results you received:

One interface with IP of 172.26.0.3

Describe the results you expected:

Two interfaces with IP of 172.26.0.3 and 172.26.0.4 respectively

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Client:
 Version:      17.06.1-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 22:53:49 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.06.1-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 23:01:50 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:

Containers: 2
 Running: 1
 Paused: 0
 Stopped: 1
Images: 4
Server Version: 17.06.1-ce
Storage Driver: overlay
 Backing Filesystem: extfs
 Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-514.26.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 992.6MiB
Name: vultr.guest
ID: GM42:AYK5:WZZQ:DJLQ:ELTZ:FV3G:3IOG:GNCQ:DTP6:T332:S7A7:UQ3H
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingNetworkingkind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.version/17.06

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions