Need help setting up VLAN please

Hello, :slightly_smiling_face:

I have an old Linksys WRT350n v2 , aparently it is capable of setting up VLAN's , but I am having severe problems, I do not have switch option on my network tab in LuCI.... I have only eth0 available as eth device,splitted onto bridge lan.... config 'switch' 'eth0', I have set VLAN id 10 tagged on port 4 and following network config but the traffic is not going thru.

config 'switch' 'eth0'
        option 'reset' '1'
        option 'enable_vlan' '1'

config 'switch_vlan' 'eth0_1'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '0 1 4t'

I also added eth0.10 interface but nothing, in my VM enviroment I am making VLAN's with eth2.10, eth2.100 etc...

Thanks, Jan

Shouldn't that be 10?

Without seeing how you've configured the VLAN on the Ethernet link, as well as how it passes through the switch, there isn't enough to know what is happening. VLANs 1 and 2, in typical OpenWrt configurations, are used for the WAN and LAN "wiring" of the switch, which may be conflicting with your config.

For you to get tagged packets out, you need to:

  • Set up the sub-interface on the Ethernet interface eth0.10, for example
  • Add the VLAN to the switch
  • Configure the switch to be tagged for that VLAN to the Ethernet phy, as well as for the Ethernet jack(s)

Make sure that you have the swconfig userspace command, and that swconfig list, swconfig dev switch0 help and swconfig dev switch0 show produce meaningful output.

Only then you can look at the uci configuration, since uci runs swconfig to actually configure the switch. (You can also run swconfig manually to configure the switch until the next reboot). The syntax you are using is not exactly what is usually used. If the switch driver and swconfig infrastructure is in place, firstboot should have built a default switch config in /etc/config/network. For most devices it would look like this:

config switch
    option name 'switch0'
    option reset '1'
    option enable_vlan '1'
config switch_vlan
    option device 'switch0'
    option vlan '1'
    option ports '0t 1 2 3 4'

It should also be noted that when running x86 OpenWrt in a VM, the VM hypervisor needs to be aware that you intend to use VLANs. Use another PC with a packet analyzer to be sure that your VM install is actually emitting VLAN tags on the port.

1 Like

Hi, thanks for answers.

with default factory (12.09) I do not have switch option. In interfaces I have: eth0 , br-lan (ports 1-4 + wlan) , and seperate wan interface.... Maybe the device isn't capable of 802.1Q afterall :frowning:

From six years and four major releases (nearly five, with 19.xx in the works) ago, so any of the current configuration techniques are likely not useful. OEM releases based on OpenWrt are very often not compatible with "official" packages, and are not compatible with any official kernel modules.

Between the ability to configure the device and security, upgrading to a current release (18.06.1 at this time) would be at the top of my list before trying to move forward with any configuration or use.

Edit: and search of the source indicates that it is on the "orion" target.

Hmmm, looks like it is no longer supported

As of 2016-11-07, this target is not supported by LEDE.

I actually have LEDE now thanks to this guy : , but the image isn't OK, I only see one interface "LAN" and aparently all the ports are bridged"... I tried network config from 12.09 image and it doesn't work :confused:

1 Like

Network config (and config, in general, and how OpenWrt "works") are all very different from v12. I'd look at, for example,, as I'm guessing you don't have LuCI installed.

Mr. Jeff,

I have luci.. :slight_smile:

This is original config:

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

config 'interface' 'eth0'
        option 'ifname' 'eth0'
        option 'macaddr' '00:1a:70:9c:5b:68'

config 'interface' 'wan'
        option 'ifname' 'wan'
        option 'proto' 'dhcp'
        option 'hostname' 'openwrt'
        option 'macaddr' '00:1a:70:9c:5b:69'

config 'interface' 'lan'
        option 'ifname' 'lan1 lan2 lan3 lan4'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' ''
        option 'netmask' ''
        option 'macaddr' '00:1a:70:9c:5b:68'
on LEDE is:
 OpenWrt SNAPSHOT, r7210-14cb059
root@OpenWrt:~# cat /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd8b:8711:5a0f::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr ''
        option netmask ''
        option ip6assign '60'
        option macaddr '00:1a:70:9c:5b:68'

maybe the best option is to buy an 1043 tp-link which has vlan's from the "box".... but wrt350n is a legend :smiley: and I just don't want to retire him

I think there are many better routers for the money than the TP-Link TL-WR1043ND, which is pretty much on its last legs these days. There are several good ones well under US$50, and some even around US$20. Another conversation if you decide to go that way.

For now, would you sketch out what you want to connect and how, and several here can give you some guidance on how to configure it?


thank you for your support! My "project" -> 2 hosts. 1. i7 , 16gig RAM PC , 2. celeron , 8gig RAM PC, ...both of them will have vmware player for ESX 5.5 hosting, my plan is to have iscsi target on centos for ESX datastore.... I hope for following config...wrt350n as switch, using VID: 10 -> esx management, VID 20 for iSCSI networking, and later VLAN's for nested VM's on ESX... I just want to setup VLAN's on my linksys wrt350n....

In test lab at job, I am using mikrotik for networking, I am also aware that setting up VLAN's on Linux follows -> eth02.20.... I am just trying to figure out if the wrt350n v2 actually supports 802.1q

Regards, Jan