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

Setting fixed address/network for docker0 raises fatal error #14425

Closed
deas opened this issue Jul 7, 2015 · 2 comments
Closed

Setting fixed address/network for docker0 raises fatal error #14425

deas opened this issue Jul 7, 2015 · 2 comments

Comments

@deas
Copy link

deas commented Jul 7, 2015

I would like to assign a fixed configuration to the docker0 interface. I was expecting

docker -d --bip=172.17.42.1/16

to do the trick, but it does not. Instead it fails:

FATA[0000] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: bridge IPv4 (10.1.42.1) does not match requested configuration 172.17.42.1

I understand it can be done setting up the interface before launching he daemon using -b, but that seems overly complicated. Besides if that's what you should do, what would be the purpose of --bip?

➜  ~  docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): linux/amd64
Server version: 1.7.0
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 0baf609
OS/Arch (server): linux/amd64
➜  ~  docker info   
Containers: 112
Images: 914
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Backing Filesystem: extfs
 Dirs: 1138
 Dirperm1 Supported: true
Execution Driver: native-0.2
Logging Driver: json-file
Kernel Version: 3.19.0-21-generic
Operating System: Ubuntu 15.04
CPUs: 8
Total Memory: 31.33 GiB
Name: bruce
ID: TUZV:ZHGP:GRHH:EJMH:BXHJ:NSUN:SGF2:L3LX:AK3X:OQ4A:PAT3:FNJO
Username: deas
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
➜  ~  uname -a
Linux bruce 3.19.0-21-generic #21-Ubuntu SMP Sun Jun 14 18:31:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
➜  ~ 
@GordonTheTurtle
Copy link

Hi!

Please read this important information about creating issues.

If you are reporting a new issue, make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.

If you suspect your issue is a bug, please edit your issue description to include the BUG REPORT INFORMATION shown below. If you fail to provide this information within 7 days, we cannot debug your issue and will close it. We will, however, reopen it if you later provide the information.

This is an automated, informational response.

Thank you.

For more information about reporting issues, see https://github.com/docker/docker/blob/master/CONTRIBUTING.md#reporting-other-issues


BUG REPORT INFORMATION

Use the commands below to provide key information from your environment:

docker version:
docker info:
uname -a:

Provide additional environment details (AWS, VirtualBox, physical, etc.):

List the steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Provide additional info you think is important:

----------END REPORT ---------

#ENEEDMOREINFO

@mrjana
Copy link
Contributor

mrjana commented Jul 7, 2015

@deas This is expected and intended behavior. As a rule, docker does not try to change the IP address of docker0 if one is already configured and is not the same as the one you are requesting using --bip. To make this work please remove the IP address from docker0 and then launch the daemon with the appropriate --bip configuration and it should work. Alternatively you can completely delete the docker0 bridge before you use this configuration. Daemon will create and set the right IP address for you

@cpuguy83 cpuguy83 closed this as completed Jul 7, 2015
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