Help on WRT32X VLAN settings

Hi all,

I'm new to the community and of course openWRT.
I know this is the LEDE community but I really hope that someone has experience enough to solve my current problem.

Long story short. I have no idea that I've bought a router not compatible for my ISP.
But in theory, it can be done by editing the SSH. I have no experience in networking
in my life that's why I'm here to ask for advice.

This router has the simplest webUI and VLAN cannot be set to get internet and IPTV.
I have no LEDE firmware flashed to my WRT32X. I am only using puTTy to input values in.

I have been searching for solutions to solve and was able to get my internet working.

My changes are as follow:

/etc/config/network



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

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.10'
        option proto 'dhcp'
        option disabled '0'

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'
        option disabled '0'

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

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 6'

config switch_vlan
        option device 'switch0'
        option vlan '10'
        option ports '4t 5t'

:wq

My ISP needs VLAN 10 for internet connection and VLAN 20 for IPTV to work.
in this setting I was able to get my internet working for lan ports 1, 2, 3 and 4 on the router.
My next step is to add settings my router port 4 to vlan 20 and received untagged packets as follow:

/etc/config/network


config interface 'IPTV'
        option ifname 'eth0.20'
        option proto 'dhcp'
        option disabled '0'

config switch_vlan
        option device 'switch0'
        option vlan '20'
        option ports '0 4t 5t' #i have notice that port 0 is actually my physical port 4 on the router

config switch_port 
        option ports '0'
        option pvid '20'

:wq

After all the settings are done, I was still unable to get my IPTV to work. So I search the web for more solutions and came upon setting CoS "802.1p Priority 4" on port 4 to work so I did.

ip link set eth0.20 type vlan egress 0:4
(Was helped by a fellow mate in Linksys community and he helped alot)

after all the settings I was still unable to get IPTV to work. I have been trying for almost a week now and I still cannot get it to work.

Hope this community can help me to solve the problem.

Thanks in advance

I'm assuming you mistyped, and "no" wasn't supposed to be in there =]

Not sure what you meant by this, as a router is a router... the modem would be ISP specific (Cable, DSL, or Fiber).

I've never configured a setup like yours before, so my help is going to be quite limited.

You're probably going to have to add vid and pvid values to each vlan, with each having the number assigned to the vlan as a value

  • See Config Switch vLAN
    • option vid '10' & option vid '20'
      • This assigns the vLAN tag number to use for the port

  • See Config Switch Port
    • option pvid '10' & option pvid '20'
      • This assigns the Port VID to untagged packets going to the port

I'm assuming you were copying your /etc/config/network output right before you saved it in vi, but just in case, :wq should not be in the config

  • You're also going to probably want to skim through the vLAN wikis until someone with a bit more knowledge replies

  • You will also find other threads which will be helpful by utilizing forum search (top right side of any forum
    page).

@JW0914

If I input /etc/config/network ,

config switch_port
option ports '0'
option pvid '20'

am I right to say only vlan 20 packets will be going through my lan port 4?

Automatically yes, however packets for a different vlan can still be received by specifying the vlan tag for the different vlan on the client.

  • Essentially, pvid automates vlan packet tagging for a specified interface, whereas vid will set the vlan tag, but not automate the tagging (i.e. the tag would have to be manually set on the client, something some clients do not have the ability to do)

Also, your tagging is wrong for switch0, as 4t is WAN, and that should not be bridged with LAN port 0 or the LAN CPU port eth1 (5t)

  • See Switch Layout
    config switch_vlan
        option  device    'switch0'
        option  vlan      '20'
        option  ports     '0 5t'     # <--- Correct
    #   option  ports     '0 4t 5t'  # <--- Incorrect
    

Just a general FYI, please always put code, config, and log output within code blocks

If only he knew what code blocks are...

Please use "Preformatted text </>" for logs, scripts, configs and general console output.
image

@JW0914

I place 4t in because my ISP is connected to my WAN giving VLAN 10 and VLAN 20 signals.

I will try that setting again.

I think I did try that before and it was not working with the IPTV.

@thmomas

thank you for showing me as I'm new to forum platforms as well.

I've never configured a router for use with IPTV, however that seems sketchy to me

  • You're effectively disabling the router's WAN side firewall for that port [0], and, if my understanding of how traffic is routed from the CPU ports is correct (it could very well not be), that would allow WAN side traffic access to the LAN side CPU port, and thus to any LAN traffic, since it [eth1] is tagged.

Checking the, albeit dated, IPTV Wiki, it doesn't state anywhere to bridge WAN with a LAN side port or the LAN CPU port.

  • @tmomas, are your familiar with IPTV setup scenarios and whether my understanding of traffic routing is correct or not?

@JW0914

But to do that I will need to install custom firmware on my router. I doubt any custom firmware supports WRT32X officially yet.

Actually with the WRT32X, you can SSH into the stock firmware

1 Like

I wasn't aware of that, thanks! =]

1 Like

Extra info: The stock firmware is an Openwrt distro. You can treat it much the same as any other Openwrt. I think it is kernel 4.9 based and based off the old “DD branch” (the unbranched master of archived openwrt). Obviously there are some Linksys specific patches and packages installed.

Anyway, there is a third party Openwrt firmware for WRT32X. I know because I pushed the support for it to master a few weeks ago. However currently sysupgrade doesn’t work properly. I am endeavouring to fix it. You can just flick back to OEM and flash a new factory version to upgrade, but it is not ideal.
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=bfbdeeb3de3da31f7e5f9bd429e079c2d839644a

I haven’t updated the wiki to show sysupgrade is broken. But I did add the other relevant info about the device to its own device page and the WRT AC Series Page

I personally always flash via serial since I installed the 3.5mm jack for the USB-TTL Audio Jack cable. I find it's more convenient, especially since you can monitor the boot log for any issues that might have occurred to prevent the image from booting.

  • I switched to flashing via serial only after the NAND error that occurred ~2yrs ago, and since it was quite convenient, continued doing so because it was faster for me to do so via serial than SSH or through the WebUI. I know this way isn't for everyone, but once the required Uboot commands are memorized, it's second nature.
    • Anyone who chooses this route needs to ensure they build BusyBox with the resize program enabled, otherwise you're stuck with an extremely small terminal once at the shell.

@lantis1008 Since the WRT32X is running a fork of OpenWrt by default, can you still use opkg with the OpenWrt repo?

Probably but I did not try it.
The usual kernel mismatch issue would be the biggest hurdle to that.

That's easy enough to overcome by cloning the DD buildroot and configuring it to utilize whatever kernel version the firmware was compiled for.