Issues with VLAN's


I'm using OpenWRT for a long while and never had issues with VLAN's besides human errors :wink: However recently my Internet provider changed configuration, so I had to configure VLAN for Internet connection. I thought that this shouldn't be a problem at all. There's nothing special with VLAN's, right? Apparently I was wrong... At that time I was using own build of 18.06.1 and after configuring VLAN on Unifi EdgeRouter X it just didn't work: I can't get IP address via DHCP... ups... I have a few spare routers. One of them is TL-WDR3600, so I've decided to flash it with the standard (not self compiled) OpenWRT. At that moment the latest was 18.06.1. The only thing I've changed after flashing is WAN VLAN configuration... and the Internet connection didn't work again. For a few days I was trying to contact my Internet provider in order to understand what could be wrong in my configuration. In the mean time the version 18.06.2 of OpenWRT was released. I've decided to give it a try... and it Internet connection was functional with the same VLAN configuration I used for 18.06.1. I've flashed my "main" router (Unifi EdgeRouter X) with the 18.06.2 and... the Internet connection it didn't work :thinking:
The summary of my long story:

  • With TL-WDR3600 VLAN config for my Internet provider works with 18.06.2, but doesn't with 18.06.1
  • With Unifi EdgeRouter X VLAN config for the Internet provider doesn't work at all.

I'm quite sure that VLAN's work with both routers as I'm and was using VLAN's for internal network. I'd appreciate any thoughts about this situation.

Thanks everybody in advance,

EDIT: My statement regarding TL-WDR3600 with VLAN to Inet provider working on OpenWRT 18.06.2 and not working with 18.06.1 was wrong. I have two TL-WDR3600 routers, BUT they have different revisions, so rev1.1 works (checked 18.06.1, 18.06.2 and git), but rev1.4 doesn't. It looks like the issue is just hardware related.
One more interesting finding. I've tried OpenWRT and OpnSense on two Intel boxes:

  • the box with RTL8111 NIC's works fine with both
  • the box with Intel I211 (igb) NIC's doesn't work with both
    I'm really puzzled what could be the issue.

Could you post the network configuration for a start? /etc/config/network

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

config globals 'globals'
        option ula_prefix 'fd22:477e:b641::/48'

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

config interface 'wan'
        option ifname 'eth0.34'
        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 ports '2 3 4 5 0t'

config switch_vlan
        option device 'switch0'
        option vlan '34'
        option ports '1t 0t'

Vlan configuration looks correct to me. The only problem I can imagine is malfunction of the internal switch.
What you can do is to run a tcpdump on the wan interface and verify that frames are indeed tagged.

Just to clarify: The configuration I posted is for TL-WDR3600 and it works with 18.06.2, but not with 18.06.1. Similar configuration doesn't work at all for Unifi EdgeRouterX. The assumption that switch itself is malfunction... both routers work fine with internal VLAN's. I can imagine that something is wrong but only with WAN port on the switch of the EdgeRouter, but the switch of TL-WDR3600 should be fine :thinking: