Help with RT-N16 VLAN

Hi guys

I'm trying to configure this RT-N16 as an access point, which I've been able to do (using brcm-wl).
I'm pretty new to LEDE, but I do have VLAN's and multi-ssids running on my main Archer C2600.

Unfortunately I think I'm suffering from a combination of lack of knowledge, and outdated examples. I've used the 'failsafe' functionality so much I'm going to get a blister from pressing the button. There's a couple weird things I don't understand and would appreciate any suggestions.
(I'll paste my config at the bottom).

  1. I lose contact with the router if I change eth0 to eth0.1 in the interface 'lan' definition.
  2. I lose contact with the router if I define port 8 tagged (CPU as listed on the RT-N16 openwrt page) https://wiki.openwrt.org/toh/asus/rt-n16
  3. But AFAIK I'm supposed to use tagged ports for the CPU, and especially so if you're going to have more than one VLAN (?)
  4. The secondary vlans don't work either, I assume from the same 8t issue. If I define them all with untagged 8 , then nothing is responsive again.
  5. I may have more problems in my config, please comment :slight_smile: I haven't moved on to the wireless aspect yet, seeing as how I have enough problems so far.

Thanks! I really love the end results using lede :slight_smile:

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

config globals 'globals'
        option ula_prefix 'auto'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.10.2'
        option gateway '192.168.10.1'
        option dns '192.168.10.1'
        option delegate '0'

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 '3 4 8'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option vid '4'
        option ports '1 8t'

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

config interface 'vlan4'
        option proto 'static'
        option ifname 'eth0.4'
        option netmask '255.255.255.0'
        option type 'bridge'
        option ipaddr '192.168.12.2'

I also had a similar issue with the RT-N16. I installed from scratch (originally dd-wrt) the latest version, 17.01.1, and there was no "Switch" section in the web UI and no vlan interfaces in the config. The switch was not setup and no forwarding of packets was happening between switch ports. I tried re-installing with exactly the same results.

I then tried to downgrade to the previous version, 17.01.0, which gave interesting and strange results. The switch functionality is now available, and everything works correctly, but the router still seems to be running 17.01.1, with kernel 4.4.61 dated Apr 15, so it is definitely not the kernel included in 17.01.0 which dates back to February.

It is as if the install of the older version did some kind of merge of the filesystem... very strange... but the device appears to be quite stable.

It does certainly seem that there is something missing in the 17.01.1 release for the RT-N16. I don't know if this will be fixed, or just wait for 17.01.2 or whatever the next release will be...

Chris

I encountered similar problem. the switch ddn't, my laptop conneted to this router couldn't ping any other devices
originally this router was flashed DD-WRT, then I flashed LEDE 17.01.1. but the switch item on interface menu was no longer there. I tried to edit the network config and use swconfig,but it hang.
After tried several images, I firstly I flash it back to DD-WRT mini version, and then I flash Openwrt 15.05.1, here the switch menu is back and then I flash 17.01.1, the menu is still there then I try to flash 17.01.2 and the menu is still there and the switch seems work properly.

Just for completeness, this is my working config. I'm not sure the comments are valid because it's been a while.

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

config globals 'globals'
        option ula_prefix 'auto'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option ipaddr '192.168.10.2'
        option gateway '192.168.10.1'
        option dns '192.168.10.1'
        option delegate '0'

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 ' 4t 8t'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option vid '4'
        option ports '1 2 3 4t 8t' #add 2 untagged for port 3

config switch_vlan
        option device 'switch0'
        option vlan '5'
        option vid '5'
        option ports '4t 8t' #add 1 untagged for port 4

config interface 'vlan4'
        option proto 'static'
        option ifname 'eth0.4'
        option netmask '255.255.255.0'
        option type 'bridge'
        option ipaddr '192.168.12.2'

config interface 'vlan5'
        option proto 'static'
        option ifname 'eth0.5'
        option netmask '255.255.255.0'
        option type 'bridge'
        option ipaddr '192.168.13.2'

I'm having the exact same issue. After installing from scratch the openwrt-15.05.1-brcm47xx-mips74k-asus-rt-n16-squashfs I get the following /etc/config/networking file:

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

config switch_vlan
    option device 'eth0'
    option vlan '1'
    option ports '1 2 3 4 8t'

config switch_vlan
    option device 'eth0'
    option vlan '2'
    option ports '0 8t'

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

config globals 'globals'
    option ula_prefix ....

config interface 'lan'
    option ifname 'eth0.1'
    option force_link '1'
    option type 'bridge'
    option proto 'static'
    option ipaddr '192.168.1.1'
    option netmask '255.255.255.0'
    option ip6assign '60'

config interface 'wan'
    option ifname 'eth0.2'
    option proto 'dhcp'

config interface 'wan6'
    option ifname 'eth0.2'
    option proto 'dhcpv6'

After, if I install lede-17.01.4-brcm47xx-mips74k-asus-rt-n16-squashfs and keep the configuration settings, it's broken and gives a warning message about the VLAN topology being wrong. Any time I try changing the networking configuration, I break the network and have to reload the firmware. Does anyone have any ideas of things to try? Thanks.