-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Closed
Copy link
Labels
area/networkingNetworkingNetworkingkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shiny
Description
Hello !
TL;DR:
When I create a docker network with a bridge that is already configured, Docker overrides the addressing I've set up. Could it be possible that when I create a docker network with an already configured bridge, if I do not supply any additionnal parameters, it configures the IPAM with the in place bridge configuration ?
More details
What I have :
root@machine # ip address show br0
27: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 0c:c4:7a:07:6a:7f brd ff:ff:ff:ff:ff:ff
inet 172.18.4.1/24 brd 172.18.4.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::ec4:7aff:fe07:6a7f/64 scope link
valid_lft forever preferred_lft foreverThen I create my network
root@machine # docker network create --driver bridge -o com.docker.network.bridge.name=br0 mynetwork
c228be0db663a5add797899688d9feb8c2699fc4b0a309edd0476a88526e576b
root@machine # docker network inspect c228be0db663a5add797899688d9feb8c2699fc4b0a309edd0476a88526e576b
[
{
"Name": "mynetwork",
"Id": "c228be0db663a5add797899688d9feb8c2699fc4b0a309edd0476a88526e576b",
"Scope": "local",
"Driver": "bridge",
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.19.0.0/16",
"Gateway": "172.19.0.1/16"
}
]
},
"Containers": {},
"Options": {
"com.docker.network.bridge.name": "br0"
}
}
]
root@machine # ip address show br0
27: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 0c:c4:7a:07:6a:7f brd ff:ff:ff:ff:ff:ff
inet 172.19.0.1/16 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::ec4:7aff:fe07:6a7f/64 scope link
valid_lft forever preferred_lft foreverThe bridge addressing went from 172.18.4.0/24 to 172.19.0.0/16. Could it be relevant to use already in place configuration ?
Also, side remark, could the bridge not be deleted if it has not been created with Docker networks ?
Thanks a lot !
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/networkingNetworkingNetworkingkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shinyFunctionality or other elements that the project doesn't currently have. Features are new and shiny