Jump to content

Custom docker network on vlan


Go to solution Solved by Alpha.Ars,

Recommended Posts

I have a setup where I have a network leading to my main external ip being on br0 and trough a vlan a secondary extrenal network that I will use for some apps (being br0.1200)
NETWORK ID     NAME                DRIVER    SCOPE
1921e1b644da   br0                 ipvlan    local
d89713dz571b   br0.1200            ipvlan    local

I made a custom network using: docker create network my-custom-network

Which work and the data exists trough ip on br0

But no I want to create a new custom network that will exit all the data trough the vlan on br0.1200
I tried several commands with (-o parent=br0.1200) but it did not work.

What I aim to have is that the container port being on a subnet and the host ip to be the ip that br0.1200 get. (I think the correct term is bridged)

 

Link to comment
  • 2 months later...
  • Solution

Hi, sadly I did not find a way to do that. I looked a little online and only found people saying it was not possible because of the kernel version or something like that.

So the way I worked arround it is using a vpn docker container, (or a torrent installer + vpn docker container) and setting the network for the other containers to point to the vpn container. At first I did not want to go this way but this is the easiest way.

Edited by Alpha.Ars
Link to comment
  • 3 months later...
On 6/17/2023 at 9:09 PM, Alpha.Ars said:

I have a setup where I have a network leading to my main external ip being on br0 and trough a vlan a secondary extrenal network that I will use for some apps (being br0.1200)
NETWORK ID     NAME                DRIVER    SCOPE
1921e1b644da   br0                 ipvlan    local
d89713dz571b   br0.1200            ipvlan    local
 

Did you try with macvlan driver?

Also, can you share how did you configure your interface for the vlan? Did you allocate an IP to it?

Did you also try to create the particular custom network from the GUI Page of the Docker Settings? As the ones defined from cli are not persisting...

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...