Ethernet port 1 member port of vlan 1 untagged and vlan 254 tagged.
Separate subnet and DHCP for both vlans
Ethernet port 1 will be connected to a managed L2 switch, with both vlans configured on the switch's port 1, same vlan config.
The switch should be able to communicate with a cloud server by either vlan, which I will test by changing the switch management vlan and also by setting the switch management IP address.
I have a little experience configuring switches by GUI, and know of Cisco iOS CLI config.
What I'm hoping to find out is what I need to do to OpenWRT to configure the above.
This won't be for heavy traffic, it's for proof of config.
First set up a guest network. Since the guest network is a bridge you can add more physical connections to it. It does not necessarily have to have a local wifi AP. There are several pages in the OpenWrt wiki about guest networks here is one of them, though it looks like it is for an old version.
Tagged and untagged packets on the same port does not always work with consumer hardware. It is better (in both a consumer and enterprise situation) to make the cable a true trunk with all VLANs tagged.
The web Network-Switch page makes setting up VLANs simpler. On the page click Add at the bottom and number your new VLAN 254. Make it tagged both on the trunk cable and the CPU. Also change the trunk cable in VLAN 1 from Untagged to Tagged. Then go to the network edit, physical settings and note that there is a new device in the list eth0.254. Attach that to the guest network.
Some older switch chips have problems with VLAN numbers higher than 16 or 128. This can be worked around with CLI setting both option vlan and option vid. Or, if you have the choice use only low VLAN numbers in your network.
Hi mk24. Thanks for that, for now I need to try with the layout I mentioned before, as this needs to be tested with this config.
No WiFi so far, just the switchports and wan connection:
lan2 needs to be a different VLAN such as eth0.10 not eth0.1 which is already in use by the regular lan.
It is implied that the gateway of a lan network will be this router. Don't specify gateway in lan sections when there is lan to wan routing. Also the DNS setting will be locally this router and that DNS server already will recurse to the wide area DNS picked up from the wan, so don't specify dns in a lan section either.
It appears you intend to use switch port 0 for the trunk so make it tagged in both VLAN 1 and VLAN 10.