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
bash-1 | default via 10.20.30.1 dev eth0
bash-1 | 10.20.30.0/24 dev eth0 scope link src 10.20.30.156
bash-1 | 172.16.5.0/24 dev eth1 scope link src 172.16.5.2
bash-1 exited with code 0
bash-1 | default via 172.16.5.1 dev eth0
bash-1 | 10.20.30.0/24 dev eth1 scope link src 10.20.30.156
bash-1 | 172.16.5.0/24 dev eth0 scope link src 172.16.5.2
bash-1 exited with code 0
Via docker run:
Both IPv4
truenas_admin@prometheus[~]$ sudo docker network create --driver bridge --ipv6=false --ipv4=true internal
9e407d74b51752b4ddeb147ee7eb0de334e26ef1e1d8aee12ced9ef3ff18df70
truenas_admin@prometheus[~]$ sudo docker network create --driver macvlan --subnet=10.20.30.0/24 --gateway=10.20.30.1 -o parent=br1 --ipv6=false --ipv4=true maclvan
7b2dc465e8da616cb0a77fbafc912bdeb180fcbb0e1dc371a1bb6e4c428bd2d5
truenas_admin@prometheus[~]$ sudo docker run --rm \
--network name=maclvan,gw-priority=1000 \
--network internal \
bash ip r
default via 10.20.30.1 dev eth1
10.20.30.0/24 dev eth1 scope link src 10.20.30.2
172.16.5.0/24 dev eth0 scope link src 172.16.5.2
One IPv6
truenas_admin@prometheus[~]$ sudo docker network create --driver bridge --ipv6=true --ipv4=true internal
2c90ee776b0847270b92cb2d77eb69d599afe026e7485c7e53107a03c9677cfc
truenas_admin@prometheus[~]$ sudo docker network create --driver macvlan --subnet=10.20.30.0/24 --gateway=10.20.30.1 -o parent=br1 --ipv6=false --ipv4=true maclvan
8195c1746b73915b2cf93bf35fc2eccf3c5f3e23be4854bbc1c91602aa94c1c3
truenas_admin@prometheus[~]$ sudo docker run --rm \
--network name=maclvan,gw-priority=1000 \
--network internal \
bash ip r
default via 172.16.5.1 dev eth1
10.20.30.0/24 dev eth0 scope link src 10.20.30.2
172.16.5.0/24 dev eth1 scope link src 172.16.5.2
Description
Looks like there is a FIXME regarding this in-code (
moby/daemon/libnetwork/default_gateway.go
Lines 196 to 202 in 53390f8
Initial report was done in compose (docker/compose#13511 (comment))
Reproduce
Gives
Gives
Via docker run:
Both IPv4
One IPv6
Expected behavior
No response
docker version
Client: Docker Engine - Community Version: 28.3.1 API version: 1.51 Go version: go1.24.4 Git commit: 38b7060 Built: Wed Jul 2 20:57:06 2025 OS/Arch: linux/amd64 Context: default Server: Docker Engine - Community Engine: Version: 28.3.1 API version: 1.51 (minimum version 1.24) Go version: go1.24.4 Git commit: 5beb93d Built: Wed Jul 2 20:57:06 2025 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.27 GitCommit: 05044ec0a9a75232cad458027ca83437aae3f4da runc: Version: 1.2.5 GitCommit: v1.2.5-0-g59923ef docker-init: Version: 0.19.0 GitCommit: de40ad0docker info
Additional Info
No response