[Solved] VLAN/mwan3 configuration for wrt1200ac

Hello, I am running LEDE Reboot 17.01.2 r3435-65eec8bd5f / LuCI lede-17.01 branch (git-17.152.82987-7f6fc16)

I have a WRT1200ac V1

I am trying to configure VLAN for it, however I am having issues. I sucessfully get an IP from my ISP on the LAN port 4 on the router. However I cannot ping out from it. ping -I eth1.3 google.com will not get anything, nor will using a direct ip.

I used the network -> switch interface to configure.

> 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 'fd42:39f3:aa21::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'static'
option netmask '255.255.255.0'
option ipaddr '192.168.2.1'
option ip6assign '64'
option ip6ifaceid '::0'

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

config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'
option reqaddress 'try'
option reqprefix '60'

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 '1 2 3 5'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6'
option vid '2'

config route
option interface 'lan'
option netmask '255.255.255.0'
option gateway '192.168.1.1'
option target '192.168.1.1'

config route
option interface 'lan'
option target '192.168.1.160'
option netmask '255.255.255.0'
option gateway '192.168.1.1'

config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option ports '0 6t'

config interface 'wan2'
option ifname 'eth1.3'
option _orig_ifname 'eth1.3'
option _orig_bridge 'false'
option proto 'dhcp'
option metric '2'
option macaddr '8C:AE:4C:FD:XX:XX'
option delegate '0'

This looks very different from the configurations used here:
https://forum.openwrt.org/viewtopic.php?pid=332010#p332010

I want to say it's because much has changed since LEDE was introduced. I am inclined to believe it's working somewhat as I do get an IP address from the ISP.

I noticed on this line

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6'
option vid '2'
That the 6 is not tagged, I went ahead and tried to tag it, but that resulted in both WAN and WAN2 from working.

Performing a traceroute gives some strange results

root@LEDE:~# traceroute -i eth1.3 google.com
traceroute to google.com (172.217.5.110), 30 hops max, 38 byte packets
1 c-73-202-98-28.hsd1.ca.comcast.net (73.202.98.28) 2992.741 ms !H 2999.597 ms !H 2999.850 ms !H
root@LEDE:~#

On the WAN interface it will complete the traceroute properly and quickly.

Aha, I think I got it. I accidentally set CPU1 to tagged on the vlan, it should have been CPU0.

I can successfully ping through both interfaces now.