Hi there!

New year, new challenges! I'm new to OpenWrt and this list, so please bear with me.

My system and setup: OpenWrt 10.3.1-rc4 on TP-Link TL-WR1043ND, on a DSL line.

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 'ifname' 'eth0.1'
    option 'type' 'bridge'
    option 'defaultroute' '0'
    option 'peerdns' '0'
    option 'proto' 'static'
    option 'ipaddr' '192.168.1.1'
    option 'netmask' '255.255.255.0'

config 'interface' 'wan'
    option 'ifname' 'eth0.2'
    option 'proto' 'pppoe'
    option 'username' ''
    option 'password' ''
    option 'mtu' '1492'
    option 'keepalive' '10'

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

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '1'
    option 'ports' '1 2 3 4 5t'

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '2'
    option 'ports' '0 5t'

My goal: Split my four GB LAN ports into VLANa (ports 1-2) and VLANb (ports 3-4; with another GB switch attached to port 4).

VLANa should be set to 10Mbit Half Duplex, with QoS prioritizing NFS up to 10 MBytes/sec in both directions (for TV recording and playback). Real life speed estimations are lower, like 8.some to 9 MBytes/sec.

VLANb should prioritize NFS at GB speeds.


So, here come my thoughts and questions. I guess I would add another interface 'halfduplex' as 'eth0.3' in a different subnet:

config 'interface' 'halfduplex'
    option 'ifname' 'eth0.3'
    option 'type' 'bridge'
    option 'defaultroute' '0'
    option 'peerdns' '0'
    option 'proto' 'static'
    option 'ipaddr' '192.168.2.1'
    option 'netmask' '255.255.255.0'

and change the vlan sections to

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '1'
    option 'ports' '1 2 5t'

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '2'
    option 'ports' '0 5t'

config 'switch_vlan'
    option 'device' 'rtl8366rb'
    option 'vlan' '3'
    option 'ports' '3 4 5t'

I'm not sure what the 5t means! OpenWrt preconfigured it that way -- is the above correct? Also, would

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

stay the same, "option 'enable_vlan' '1'" meaning "activate VLAN in general", or would that have to be changed to

config 'switch'
    option 'name' 'rtl8366rb'
    option 'reset' '1'
    option 'enable_vlan' '1'
    option 'enable_vlan' '3'

and if so, why was "option 'enable_vlan' '2'" skipped from the beginning?


Provided VLAN works as expected, I could use the LUCI QoS setup. There's apparently a glitch, as I don't see the names of the interfaces there, even though I can add them in /etc/config/qos.

config 'interface' 'wan'
    option 'classgroup' 'Default'
    option 'overhead' '1'
    option 'download' '6000'
    option 'upload' '736'
    option 'enabled' '1'

config 'classify'
    option 'target' 'Bulk'
    option 'layer7' 'edonkey'

config 'classify'
    option 'target' 'Bulk'
    option 'layer7' 'bittorrent'

config 'classify'
    option 'target' 'Priority'
    option 'ports' '22,53'

config 'classify'
    option 'target' 'Normal'
    option 'proto' 'tcp'
    option 'ports' '20,21,25,80,110,443,993,995'

config 'default'
    option 'target' 'Express'
    option 'proto' 'udp'
    option 'pktsize' '-500'

config 'reclassify'
    option 'target' 'Priority'
    option 'proto' 'icmp'

config 'default'
    option 'target' 'Bulk'
    option 'portrange' '1024-65535'

config 'reclassify'
    option 'target' 'Priority'
    option 'proto' 'tcp'
    option 'pktsize' '-128'
    option 'mark' '!Bulk'
    option 'tcpflags' 'SYN'

config 'reclassify'
    option 'target' 'Priority'
    option 'proto' 'tcp'
    option 'pktsize' '-128'
    option 'mark' '!Bulk'
    option 'tcpflags' 'ACK'

config 'classgroup' 'Default'
    option 'classes' 'Priority Express Normal Bulk'
    option 'default' 'Normal'

config 'class' 'Priority'
    option 'packetsize' '400'
    option 'maxsize' '400'
    option 'avgrate' '10'
    option 'priority' '20'

config 'class' 'Priority_down'
    option 'packetsize' '1000'
    option 'avgrate' '10'

config 'class' 'Express'
    option 'packetsize' '1000'
    option 'maxsize' '800'
    option 'avgrate' '50'
    option 'priority' '10'

config 'class' 'Normal'
    option 'packetsize' '1500'
    option 'packetdelay' '100'
    option 'avgrate' '10'
    option 'priority' '5'

config 'class' 'Normal_down'
    option 'avgrate' '20'

config 'class' 'Bulk'
    option 'avgrate' '1'
    option 'packetdelay' '200'

config 'classify'
    option 'target' 'Express'
    option 'proto' 'tcp'
    option 'ports' '111,2049,32777-32780'

config 'classify'
    option 'target' 'Express'
    option 'proto' 'udp'
    option 'ports' '111,2049,32777-32780'

config 'interface' 'lan'
    option 'classgroup' 'Default'
    option 'overhead' '1'
    option 'download' '100000'
    option 'upload' '100000'
    option 'enabled' '1'

config 'interface' 'halfduplex'
        option 'classgroup' 'Default'
        option 'enabled' '1'
        option 'overhead' '1'
        option 'halfduplex' '1' 
        option 'download' '10000'
        option 'upload' '10000'

Will I have to add everything labelled "config 'classify'" below each "config 'interface'" line, or is the above correct?


Thank you very much for reading through this!

-André