Hi everyone,
First of all thank you very much for the many inspirational posts. Very helpful!
I’m running the following setup: modem > Opnsense (wan, lan) > MT6000 router with Openwrt 23.05.5 on it
Opnsense is taking care of firewall, routing etc. Openwrt is acting as the switch.
I’m using the Opnsense config exactly as in this amazing tutorial: https://homenetworkguy.com/how-to/set-up-a-fully-functioning-home-network-using-opnsense/
Config see link. I won’t post all the details but only provide some key info derived from the tutorial:
VLANs in Opnsense:
10: DMZ
20: USER
30: IOT
40: GUEST
50: IPCAM
LAN is on 192.168.1.1/24. DHCPv4 ranges from 100-200 for all interfaces. DNS, DHCP all on Opnsense on 192.168.1.1
So far so good. Now I want my Openwrt device with its physical LAN ports to provide the VLANs:
- LAN port1: DMZ
- LAN port2: USER
- LAN port3: IOT
- LAN port4: IPCAM
From what I understand, those physical lan ports would be all untagged because I don’t plan to connect another AP/managed switch for now.
My goal is that a client device that is connected to e.g. physical lan port3 of the Openwrt switch is automatically connected to VLAN30 and gets an IP through DHCP in the range of 192.168.30.100-200. My problem is that my clients connected to the lan ports always get 192.168.1.100. So, I assume LAN dhcp is assigning the local IP.
To make things easier I’d start with the standard config of Openwrt. I only set the lan ipv4 address to 192.168.1.2 since my Opnsense is on 192.168.1.1. Also, DNS on 192.168.1.1, subnet mask on 255.255.255.0, both dhcpv4 and ipv6 dhcp disabled. See „dumb ap“ tutorial: https://openwrt.org/docs/guide-user/network/wifi/wifiextenders/bridgedap
I feel like I tried all possible combinations, including setting pvid and everything: Eth0 tagged with VLAN10, 20, 30, … lan1 untagged, lan2 untagged with/without primary VLAN, … on interface side, I configured the VLANs on the devices that are created. No success so far.
My ask: could you please tell me how to configure the devices and interfaces to work with the VLANs?
Thank you so much in advance! I already spent many hours on this, hence I’d appreciate to make some progress