RPI4 router VLAN trunk config

RPI is non DSA and I cannot find a VLAN config for mine.

I have a port eth0 going to PPPoE which all works fine untagged.

Now I want to use VLAN's to carry traffic from 2 AP's across another port eth1

I have got VLANs going fine on the Belkin RT3200 dumb AP's and can see traffic on the VLANS.

But I cannot find a config that will pick it up on the RPI router. I've looked at the VLAN threads here and they are either confusing or incomplete. And this is not exactly a complex config.

Please can anyone help?

Thanks.

You need to tag VLANs by using dot notation, i.e. eth1.x (where x is your VLAN id).

Hi

according to your question, if you use LuCI, option are here

in your case,
eth1.44
and
eth1.202

I have eth0 on my RPi4 LAN pointing (to managed switch) and eth1 WAN pointing. I have several VLANs configured. You might use mine as a reference:

/etc/config/network
config interface 'loopback'
  option device 'lo'
  option proto 'static'
  option ipaddr '127.0.0.1'
  option netmask '255.0.0.0'

config globals 'globals'
  option ula_prefix 'fd1a:184b:b879::/48'
  option packet_steering '1'

config device
  option name 'eth0'
  option ipv6 '0'

config device
  option name 'eth1'
  option ipv6 '0'

config device
  option name 'wg0'
  option ipv6 '0'

config device
  option name 'eth0.3'
  option type '8021q'
  option ifname 'eth0'
  option vid '3'
  option ipv6 '0'

config device
  option name 'eth0.4'
  option type '8021q'
  option ifname 'eth0'
  option vid '4'
  option ipv6 '0'

config device
  option name 'eth0.5'
  option type '8021q'
  option ifname 'eth0'
  option vid '5'
  option ipv6 '0'

config device
  option name 'eth0.10'
  option type '8021q'
  option ifname 'eth0'
  option vid '10'
  option ipv6 '0'

config device
  option type 'bridge'
  option name 'lxcbr0'
  option ipv6 '0'
  option bridge_empty '1'

config interface 'wan'
  option device 'eth1'
  option proto 'dhcp'
  option peerdns '0'
  option delegate '0'
  list dns '10.0.4.250'

config interface 'lxc'
  option device 'lxcbr0'
  option proto 'static'
  option ipaddr '10.0.4.1'
  option netmask '255.255.255.0'

config interface 'guest'
  option device 'eth0.3'
  option proto 'static'
  option ipaddr '10.9.7.1'
  option netmask '255.255.255.0'
config interface 'homeoffice'
  option device 'eth0.4'
  option proto 'static'
  option ipaddr '10.9.6.1'
  option netmask '255.255.255.0'
  list dns '1.1.1.1'
  list dns '1.0.0.1'

config interface 'iot'
  option device 'eth0.5'
  option proto 'static'
  option ipaddr '10.9.5.1'
  option netmask '255.255.255.0'

config interface 'lan'
  option device 'eth0.10'
  option proto 'static'
  option ipaddr '10.9.8.1'
  option netmask '255.255.255.0'

You may ignore my lxcbridge and I omitted my wireguard stuff.

When you configure an Interface, if you don't see the port with the VLAN number that you need already on the Device pull-down, type it in the box at the bottom of the list (e.g. eth0.10) then press Enter to create and attach to the new one.

This is for hardware like a Pi or x86 that has independent Ethernet ports directly attached to the CPU, no switch.

Thank you. If I want two phy ports on the same Interface, can I use the same technique with LUCI. Just select both ethn.n from the drop down and a bridge will be created?

No, bridges are separate now. You'd have to click the Devices tab and add a new device of type bridge, then specify the ports in there. Then go back to Interfaces and use the bridge as the device.

If you're just adding ports to the existing lan, by default it already has a bridge named br-lan.

Thanks. It's all bridged and working now. Also I have the rt3200 on DSA passing traffic over the tagged trunk to the router and Internet from an untagged lan port.

Next mystery to solve is why the rt3200 wlan ports cannot pass traffic over the same Interface? I've set them up on the same Interface used for the untagged lan port.

I'm assuming it's because I've not picked up the vlan.

Anyone know the correct way to apply the wlan devices in this case please?