I don't know why this is causing me so much trouble. It seems straightforward, but here we are. I'm going to try to describe what I did and highlight areas in bold where I think I may have made a mistake or have a misunderstanding. I've been at this for several hours, so I'm hoping someone can help.
Setup
Here is my setup. I have a GL-MT6000 (flint2) router that shipped with the gl-inet OpenWRT variant. The WAN ethernet-port is connected directly to the modem. The other LAN ethernet ports are connected to various devices including unmanaged switches which are effectively just increasing the number of ethernet ports on the router. I have a main WIFI SSID already setup for 2G and 5G that connect devices in the LAN. I want all of this to remain the same. I also have the guest WIFI setup for guests.
Based on my understanding, my network topology looks roughly like this:
╙── modem
└─╼ flint2-router-wan
└─╼ flint2-router
├─╼ flint2-router-lan2
│ └─╼ unmanaged-switch-1
│ ├─╼ device2
│ ├─╼ device3
│ └─╼ device4
├─╼ flint2-router-lan3
│ └─╼ unmanaged-switch-2
│ ├─╼ device5
│ └─╼ device6
├─╼ flint2-router-lan4
│ └─╼ device1
├─╼ flint2-router-lan5
└─╼ flint2-router-wifi-ssid1
├─╼ device7
├─╼ device8
└─╼ device9
Goal
The new thing I want to do is create a separate SSID that IOT devices can talk to the internet and also talk to each other. This means I can't use the guest network out of the box because it seems to disable devices from communicating within the network and instead just gives them access to the WAN.
From what I understand the way you do this is with a VLAN. My understanding is each new VLAN will require a: device, an interface, firewall rules, and an finally an Wireless SSID.
Steps Taken
I attempted to set this up in LUCI.
Step 1:
I went to Network > Interfaces and then clicked the devices tab. From there I clicked "Add Device Configuration". I changed the following values in the popup:
Device type: VLAN (802.1q)
Base device: 'Ethernet Switch "etho0"'
VLAN ID: 40
Note: this autopopulated
Device name: br-lan.40
I'm unsure about what the base device is doing here. Other options where 'Ethernet Adapter: "acpli0"', 'Wireless Netwowrk Master "HOME-WIFI" (lan)' (which resolved to ra0), the guest wifi which resolved to ra1, 'Ethernet Switch "etho0"', 'Ethernet Adapter: "eth1" (wan)', 'Bridge: "br-lan" (lan)' . I've also seen other tutorials use a VLAN bridge here, and I don't know if I should be doing that.
Then I clicked "Save & Apply"
Step 2:
I went to Network > Interfaces and then "Add new interface...". I changed the following values in the popup:
Name: VLAN40
Protocol: Static address
Device: br-lan.40
Then I clicked "Create Interface".
From there I changed the popup values:
IPv4 address: 192.168.40.1
IPv4 netmask: 255.255.255.0
# In the "DHCP Server" tab, I clicked "setup dhcp server"
I then clicked "Save". Then I clicked "Save & Apply".
Step 3:
I went to Network > Firewall. Under Zones I clicked "Add", and changed the popup values:
Name: iot40
Input: reject
Output: accept
Forward: reject
Covered networks: VLAN40
Allow forward to destination zones: wan
I then clicked "Save". Then I clicked "Save & Apply".
Step 4:
I then went to Network > Wireless.
I found the radio device I want to add the SSID to, which was "mt798611 Generic 802.11bgnax Channel: 9 (2.452 GHz) | Bitrate: 573 Mbit/s". In the row for "mt798611" I clicked "Add".
I then changed the popup values:
ESSID: IOT40-WIFI
Network: VLAN40
# In the wireless security tab
Encryption: WPA2-PSK
Key: <the-wifi-password>
I then clicked "Save". Then I clicked "Save & Apply".
Confusion
And here is where I'm stuck. At this point I would expect to see a IOT40-WIFI SSID come up as an available network to connect to, but I don't see anything. The new row in the Wireless Overview table says: disabled - SSID: IOT40-WIFI | Mode: Master, Wireless is not associated
.
(You'll note I've tried this 3 times with different variants still with no success).
I can ping 192.168.40.1
, but I have no idea if I set this up correctly. Clearly I messed something up. I would prefer to learn how to do this via the LUCI GUI first, and then learn how to use the config files.
I've also heard that VLANs are only make sense if you have multiple routers, and I'm not sure if that is true. I do plan to connect another router to act as another WIFI access point in the future to improve connectivity far away from the main router, but it seems like the use-case where you setup a VLAN on the main router for an isolated non-guest wifi network is reasonable. Do I have a misunderstanding?