Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create network without gateway is not possible #568

Open
2 of 3 tasks
egorse opened this issue Jan 21, 2019 · 3 comments
Open
2 of 3 tasks

Create network without gateway is not possible #568

egorse opened this issue Jan 21, 2019 · 3 comments

Comments

@egorse
Copy link

egorse commented Jan 21, 2019

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

When there is network created without gateway specified, the attached network wont have the gateway

Actual behavior

There is always gateway IP created from subnet range.
This became significant problem, when you try to connect container to multiple networks and only from proper one the gateway shall be used.

Steps to reproduce the behavior

$docker network create test-network --subnet 10.10.0.0/16
$docker network inspect test-network # <- there wont be gateway
$docker run --rm -it --network=test-network ubuntu-debootstrap ip route show
default via 10.10.0.1 dev eth0  # <- this is totally unexpected
10.10.0.0/16 dev eth0  proto kernel  scope link  src 10.10.0.2 

Output of docker version:

Client:
 Version:           18.09.1
 API version:       1.39
 Go version:        go1.10.6
 Git commit:        4c52b90
 Built:             Wed Jan  9 19:35:23 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.1
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.6
  Git commit:       4c52b90
  Built:            Wed Jan  9 19:02:44 2019
  OS/Arch:          linux/amd64
  Experimental:     false

Output of docker info:

Containers: 8
 Running: 8
 Paused: 0
 Stopped: 0
Images: 85
Server Version: 18.09.1
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: 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 local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 96ec2177ae841256168fcf76954f7177af9446eb
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-43-generic
Operating System: Ubuntu 16.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 15.56GiB
Name: some.host.domain.net
ID: KGJP:WWP4:YK7H:I3JA:KEZW:X3JY:PQ7M:7PAP:HNR2:G5UI:QOI2:JL6Q
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: API is accessible on http://0.0.0.0:2376 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
@ChrisSalisbury
Copy link

ChrisSalisbury commented Mar 29, 2019

I don't have much to add, other than I have this same issue. For my use case, I am able to use veth pairs without a docker network as a workaround -- this would be a nice thing to have as a standard docker feature as well, but being unable to create a network without a gateway does seem like a bug.

@chauhanshubham-dev
Copy link

Hi @ChrisSalisbury
How do you manage multi-host docker networking without docker overlay network, using veth pairs?

@mdbraber
Copy link

mdbraber commented Jun 6, 2019

Creating a network without a gateway might not be possible according to docker network inspect - but when you create a network with the flag --internal and also connect networks that have specifically defined a --gateway docker will set the gateway to that network.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants