(SOLVED) Vlan oddity?


Recommended Posts

Ive always ran my unraid without Vlans setup, most dockers use the host ip with different ports, and i split out my Unifi docker to have its own IP in the network. 

 

Ive now split into Vlans and sort of have this working, but cant understand why unraid now answers on 2 Ip addresses (one in each Vlan)

 

My setup is:

 

Few of other Vlans i won't bore you with, CCTV, IOT etc

Lans of interest:

 

192.168.2.0/25  - VLAN2 (Main Network) Unraid exists here with IP 192.168.2.8 - no problems, i can get to it on the network etc

192.168.1.0/25 - VLAN1 (Mgmt Network) I have set this up as Vlan1 (Tagged) as Vlan 2 is untagged) - this is where i want my Unifi Docker to exist

 

UnraidNic.thumb.png.ba6e32a59bf1ed2a384fe46d499f9dbf.png

 

Above is how i have it setup, and it sort of works - i can get to unraid on 192.168.2.8, but i can also get to the main unraid GUI on 192.168.1.8 which i wasn't expecting. I have assigned interface br0.1 to the docker that i want in Vlan 1 (my unifi docker, which is where my AP's and USG reside) and this works, the docker is in Vlan1 with IP 192.168.1.13 

 

Now, im assuming that the vlan interface i have created is basically a 'leg' in the 192.168.1.8 subnet, so Unraid has to have an IP in that subnet, and then you give your dockers other addresses in this range. 

 

Is this right, is this how its supposed to operate? I just wasn't expected to be able to hit the unraid gui at 192.168.2.8 and 192.168.1.8 from the 192.168.2.0/25 subnet

Edited by rorton
Link to comment

You can access unRAID on 192.168.1.8 because you gave it an IP on that VLAN and your router on the main network is happily routing requests between networks.

It doesn't need an IP on that VLAN, unless that VLAN is isolated or you want devices on that VLAN to access unRAID without routing.

Link to comment

thanks for the reply. 

 

So i removed the IP on Vlan1, and now i can no longer allocate the vlan1 interface to the docker, i think i read that you have to have an ip address allocated to the vlan if using the vlan for a docker. 

 

really i just wanted the whole of the unraid box to be available on vlan2, apart from this 1 docker, which i want in vlan 1, without exposing the gui in vlan 1, but cant work out if thats possible

Link to comment

When there's no IP assigned to an interface, you will need to go to the Dockers settings page, click on Advanced view, and configure the docker network manually, since unRAID has no idea what your network on that interface without the IP address assignment.

see my config

image.thumb.png.03f94be26c387874e021540ec0a66106.png

as should be obvious, my main networ is 192.168.2.0/24 and my VLAN 3 is 10.0.3.0/24

 

Link to comment

Ahh, brilliant, thanks so much. 

 

i hadn't got the advanced option selected in the docker settings, so could work out how it knew which network to be part of. 

 

So i have Vlan 1 created in the Network settings, with no IP, then in docker settings, i assigned 192.168.1.0/25 to the new vlan 1 interface br0.1 and it works like a dream - thanks :)

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.