IPQ40xx: Is it possible to use vlans?

Please describe what u want to achieve. Then maybe the forum could help you. Often there is not only one way to a specific target but multiple possible ways.

It is quite clear. I want to split the switch into at least 2 vlans. There are a few topics at this forum saying it doesn't work on this target. So I asked for confirmation before I buy a device.

To me it is not clear. You wrote:

Why? For what? If you could explain your use case for this the forum could help.

If you just ask for a specific functionality on a single device you have to wait for someone with exactly this device reading your topic and willing to spend time on your problem.

If you explain what you want to achieve many people could help and probably find multiple solutions you never have thought of.

If it doesn't work then there also may be workarounds for your need. If you like to explain what your target is.

It is not about a single device. There is a few IPQ40xx devices with this switch. ASUS RT-AC58U, etc.

I am not asking about any workaround. I need to have separate VLANs.

As an exawple of a use case is bridging a LAN port to WAn for e.g. an IPTV device. There are other use cases. On most of other targets this works.

Anoter use case is to have 2 separate networks on LAN.

According to the wiki there is VLAN support for this device.

The problem is that there is no clear confirmation.

and some more.

Anyway, I will get the device and post the results.


Seems it still has some problem, but support should be there.

Usually there are two possiblities to create/assign VLANS:
1. Assigning VLAN IDs on VLAN-enabled switch hardware
2. Creating driver-level VLANs

In case the first variant is not supportet the second one should still work. So far I didn't have any device which at least worked with driver-level VLANS.

The second way won't allow to split the switch.

Unfortunately yes. Fingers crossed it will turn out for you as expected.

If it doesn't I have no choice but to fix it myself in the driver. It ma not be too easy though. But that's not the first time. It seems that people always recommend some crap to me, so I finally fix it :wink:

If you could explain your real problem then I'm quite sure there are other ways to solve this. But you only see one way to achieve your target. Then you have to do this.

Greetings from the crap recommender.

I didn't mean anything offensive. Many times people recommend some hardware to me and then I fix problems with it by fixing some C code. It is generally OK.

Yes, there are "other ways to solve this". To use another hardware, to use an external switch, to use igmpproxy in some cases. But I don't need to solve a specific use case. I need to have normal Openwrt VLAN function working for all kinds of use cases.

I am not a "user", I am closer to a developer here.

I'm using RT-AC58U and VLAN is working after googling to a russian in

Your need to add this to "switch - switch0 - ports" of /etc/board.json

	"num": 5, 
	"role": "wan" 


	"role": "wan", 
	"ports": "5", 
	"device": "eth1" 

to the section of switch - switch0 - roles

in / etc / config / network

config switch_vlan 
	option device 'switch0' 
	option vlan '2' 
	option vid '2' 
	option ports '0t 5'

then restart network
I'm using Mwan3 so VLAN does work.

Thanks for the information. I'll get the device tomorrow and report back.

Hello, I'm new to this forum but I was active in the old one. The problem was: If you ever configure an OpenWRT device correctly you have never to touch it for years. :wink:

I recently bought a device based on the same chipset. For small money I got a Netgear EX6150v2 and it seems to be a nice device. The "problem" is, it only has one Ethernet port and I want to use it as a router for my local LAN.
So I have the VDSL2-Modem in the basement connecting it to my managed switch. Than I will patch the EX6150v2 to the managed switch.
After it I want to get at least 2 VLANs working on the one port of the Netgear device: One for the dedicated PPPoE connection to the VDSL2-Modem and one for routing the internet traffic to my LAN over the managed switch in the basement. So I will test it as well and hopefully it's working!

So I got the device and VLANs seem to work but a kind of a weird way for me.
I wanted to bridge a LAN port to WAN. This config does work

config interface 'lan'
	option type 'bridge'
	option ifname 'eth0'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option ip6assign '64'

config interface 'wan'
	option ifname 'eth1'
	option proto 'dhcp'

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
	option vid '1'
	option ports '2 3 4 0t'

config switch_vlan 
	option device 'switch0' 
	option vlan '2' 
	option vid '2' 
	option ports '0t 1 5'

What is weird that I didn't have to bridge eth1 to eth0.2, and lan is still eth0, not eth0.1.
It looks like eth1 is connected to the switch somehow to port 5 and bridging is done by the switch.

VLANs 1and 2 are “magic” in the DTS/driver, so perhaps serendipity.

1 Like

I will look into the code and try to find out what this "magic" means.

1 Like

I'm currently configure a Netgear EX6150v2 (IPQ4018 and only one Gbit port).
I need a tagged VLAN7 on the port for my ISP Pppoe connection. The lan traffic should be untagged on the same port.
According to your explanation that's not possible, only VID1 and 2 are working like magic?