ksl28
(Ksl28)
December 30, 2022, 7:55pm
1
Hi
Im fairly new to docker, and ive been running a simplified setup for about a year now, and wanted to dig deeper into it.
I would like to assign “real routeable ips” to my containers, instead of using the hosts own IP. This is the setup im using for the test:
docker host:
VLAN: 10
IP: 192.168.2.35/24
docker network - internal
VLAN: 10
Range: 192.168.2.0/24
docker network - dmz
VLAN: 20
Range: 192.168.4.0/24
Ive been following this guide:
Im able to create the networks, run a httpd container, but there is no network communication - and i cant seem to figure out why.
Any suggestions?
rimelek
(Ákos Takács)
December 31, 2022, 1:52pm
2
The guide you linked just creates a new local docker network. It won’t be on your lan (vlan). You need macvlan or ipvlan.
If you use the same network for local docker networks as your LAN network, routing will not work.
ksl28
(Ksl28)
January 1, 2023, 2:27pm
3
Thanks for the update! Looks like ipvlan is the thing i have to look into.
But what do you mean by If you use the same network for local docker networks as your LAN network, routing will not work. ?
So i have to create a new L3 network, that only docker uses - and then create network routes to the docker host or?