How To tag switch ports for multiple VLAN's

How can i configure the below via LUCI?
I was able to configure the below example in the previous luci of version 18 but there is not a similar entry screen in version 21.
Should i bridge all ports to get the vlan option tab or is there another way?

What are you trying to achieve?

The interface is pretty easy to use - 3 options per port: off, untagged, tagged. If you want a vlan tagged on a given port, select tagged on the relevant port and vlan.

1 Like

you are showing a luci screenshot, so you did configuration via luci, so what is your problem exactly?

In addition, why would you have LAN port 3 untagged in one VLAN and tagged in the other?

This is a valid configuration per the 802.1q spec. Some devices don’t like untagged+tagged on the same port and there are also arguments about this being bad practice (I.e. always have all networks tagged on a trunk port), but having an untagged network and tagged network(s) on the same port can be useful (or even necessary) for some configurations.

he probably doesn't have the switch menu in Luci, that's why he probably ask how he can do the same, the picture could be from someone else...

That is certainly possible. If that is true, the op didn’t make that clear (but then again, the op didn’t even formulate an actionable question in the first place)

The screenshot is from a previous version of openwrt. Now with V21 the same config page is not available.

That was not clear... but now it makes more sense what you've got going on...
you're device likely transitioned to DSA.

You can also search the forums for DSA configuration. I think it is generally easier to configure it using the CLI or editing the config files, but you may find some hints about doing it via LuCI.

1 Like

So if i want eth0 and wan port both to be on vlan6 (tagged), do i need to create a bridge with eth0 & wan? Because only on the bridge one gets the vlan filtering tab.

Are you sure that the DSA configuration for your router uses the labels 'eth0' and 'wan' -- typically it is either eth0, eth1, etc. OR wan, lan1, lan2, etc.

Let's see the default /etc/config/network file for your router.

My problem is that although i have successfully established a connection over pppoe (vlan6 tagged) to the wan port (ip adress,Gateway, DNS etc from isp are showing), i cannot ping the gateway or any of the DNS. So it looks like the traffic just ends in the wan port. As in previous working setups, also eth0 was tagged with vlan6. And then that traffic would be used in the LAN bridge etc..
But in the new OpenWrt version, i cannot seem to create that setting of eth0 - vlan6 unless i create a bridge. So thats where i am stuck

let's start with basic stuff:

  • your exact openwrt version? your device model?
  • run this command in an SSH session and copy output. before uploading remove any sensitive data (username/password etc): cat /etc/banner; ip -o link | awk '{print $2}' ; cat /etc/config/network
1 Like
OpenWrt 21.02.3, r16554-1d4dea6d4f

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

config globals 'globals'
        option ula_prefix 'fdd8:325b:21a3::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr ''
        option netmask ''
        option ip6assign '60'

config interface 'wan'
        option proto 'pppoe'
        option device 'wan.6'
        option username whatever'
        option password 'whatever'
        option keepalive '20 80'
        option ipv6 '0'

config device
        option type '8021q'
        option ifname 'wan'
        option vid '6'
        option name 'wan.6'

I have disabled the option "automatic IPv6" on the PPPOE as that seemed to cause the PPPOE tunnel to drop continously.
Anyway, even though the overview page shows Gateway, IPv4 and DNS adresses, i cannot ping any of them.

And another observation: when i place the router in dhcp client mode behind another router, it just works with just br-lan and wan ports as devices and i can reach the external gateway from the LAN.
But when i activate a vlan6 on the wan device and use pppoe based interface on the vlan6 device, i cannot reach the external gateway from the LAN.