You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run a container with: docker run --rm -it --net=local busybox
and attach my isolated network afterward, i have the following routing table within the container:
/ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.28.0.1 0.0.0.0 UG 0 0 0 eth1
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
172.28.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
so eth1 becomes the default gateway (the isolated bridge) which was not my attempt.
If i change the network attach order: starting in the isolated network and connecting to the local network my routing table results in:
/ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 172.28.0.1 0.0.0.0 UG 0 0 0 eth0
172.28.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
So my gateway always ends in the isolated bridge. After a lot of try and error my founding is, that the default gateway is elected by the name order of the network. Naming my default network to allow_default solves the problem, but the solution seams really ugly.
The text was updated successfully, but these errors were encountered:
I have created two bridges with the docker network API one bridged named local the other one is named isolated.
When I run a container with:
docker run --rm -it --net=local busybox
and attach my isolated network afterward, i have the following routing table within the container:
so eth1 becomes the default gateway (the isolated bridge) which was not my attempt.
If i change the network attach order: starting in the isolated network and connecting to the local network my routing table results in:
So my gateway always ends in the isolated bridge. After a lot of try and error my founding is, that the default gateway is elected by the name order of the network. Naming my
default
network toallow_default
solves the problem, but the solution seams really ugly.The text was updated successfully, but these errors were encountered: