Modify

Opened 6 years ago

Last modified 4 years ago

#10078 new defect

Mixed untagged and tagged vlans frames on same port not supported on wrt160nl / backfire 10.03.1 rc5

Reported by: nesiax@… Owned by: developers
Priority: high Milestone: Chaos Calmer 15.05
Component: packages Version: Backfire 10.03.1 RC5
Keywords: wrt160nl vlan mixed frames tagged untagged Cc:

Description

Not sure if it is a bug, since according to this ticket the person clearly explains:

/ticket/6911.html

You should simply stick to not mixing untagged and tagged interfaces of the same device when using bridging.

I disabled the bridge and started my journey step by step trying to figure out why my vlans were not working on the wrt160nl.

So could someone please clarify me about this, is this supported or not ?

So here i have the latest config that works for me under 10.03.1-rc5 with one minor drawback it doesn't support mixing tagget and untagged frames on the same port (at least the lan ports), i tested and if i define a mixed port it will work only for the untagged vlan.

So i don't understand, why openwrt have an option for swiches like the following:

config 'switch_port'

option 'port' '0'
option 'pvid' '1'

if it simply doesn't have support for mixed frames.

So, this is what i have done so far:

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

config 'interface' 'vlan1'
	option 'ifname' 'eth0.1'
	option 'type' 'bridge'
	option 'proto' 'static'
	option 'ipaddr' '192.168.1.1'
	option 'netmask' '255.255.255.0'

config 'interface' 'vlan2'
	option 'ifname' 'eth0.2'
	option 'proto' 'static'
	option 'ipaddr' '192.168.2.1'
	option 'netmask' '255.255.255.0'

config 'interface' 'vlan3'
	option 'ifname' 'eth0.3'
	option 'proto' 'static'
	option 'ipaddr' '192.168.3.1'
	option 'netmask' '255.255.255.0'

config 'interface' 'wan'
	option 'ifname' 'eth1'
	option 'proto' 'static'
	option 'ipaddr' '172.24.103.104'
	option 'netmask' '255.255.255.0'
	option 'gateway' '172.24.103.1'
	option 'dns' '172.24.103.1'

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

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

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

config 'switch_vlan'
	option 'vlan'   '3'
	option 'device' 'eth0'
	option 'ports'  '0t 4t'

Attachments (0)

Change History (3)

comment:1 follow-up: Changed 6 years ago by Tim Miller Dyck <tim@…>

Hi, I use TP-LINK TL-WR1043ND 5 port switches (rtl8366rb switch chipset), and having a given port both tagged and untagged works fine on that platform.

Here is a working config for me. On this device, port 5 is the CPU/internal switch port.

config 'switch'

option 'name' 'rtl8366rb'
option 'reset' '1'
option 'enable_vlan' '1'

config 'switch_vlan'

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

config 'switch_vlan'

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

In your example, it might help to have port 0 untagged in vlan1 as you want its pvid to be 1. Every port should have untagged membership in a single VLAN (equal to its PVID). In -rc5, /etc/config/network also should have explicit pvid definitions:

config 'switch_port'

option 'port' '0'
option 'pvid' '2'

config 'switch_port'

option 'port' '1'
option 'pvid' '1'

config 'switch_port'

option 'port' '2'
option 'pvid' '1'

config 'switch_port'

option 'port' '3'
option 'pvid' '1'

config 'switch_port'

option 'port' '4'
option 'pvid' '1'

config 'switch_port'

option 'port' '5'
option 'pvid' '1'

I'm not familiar with the hardware you are using but wanted to pass on it works at least on rtl8366rb.

-Tim Miller Dyck

comment:2 in reply to: ↑ 1 Changed 4 years ago by supereic

Hi, Tim,

Can you try your device if the switch_vlan part is after the switch_port? I think the result will be different, the pvid of the port 0 will be 0 but not 2.

The config like this:

config 'switch'

option 'name' 'rtl8366rb'
option 'reset' '1'
option 'enable_vlan' '1'


config 'switch_port'

option 'device' 'rtl8366rb'
option 'port' '0'
option 'pvid' '2'


config 'switch_port'

option 'device' 'rtl8366rb'
option 'port' '1'
option 'pvid' '1'


config 'switch_port'

option 'device' 'rtl8366rb'
option 'port' '2'
option 'pvid' '1'


config 'switch_port'

option 'device' 'rtl8366rb'
option 'port' '3'
option 'pvid' '1'


config 'switch_port'

option 'device' 'rtl8366rb'
option 'port' '4'
option 'pvid' '1'


config 'switch_port'

option 'device' 'rtl8366rb'
option 'port' '5'
option 'pvid' '1'

config 'switch_vlan'

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


config 'switch_vlan'

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


Alex Guo

Replying to Tim Miller Dyck <tim@…>:

Hi, I use TP-LINK TL-WR1043ND 5 port switches (rtl8366rb switch chipset), and having a given port both tagged and untagged works fine on that platform.

Here is a working config for me. On this device, port 5 is the CPU/internal switch port.

config 'switch'

option 'name' 'rtl8366rb'
option 'reset' '1'
option 'enable_vlan' '1'

config 'switch_vlan'

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

config 'switch_vlan'

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

In your example, it might help to have port 0 untagged in vlan1 as you want its pvid to be 1. Every port should have untagged membership in a single VLAN (equal to its PVID). In -rc5, /etc/config/network also should have explicit pvid definitions:

config 'switch_port'

option 'port' '0'
option 'pvid' '2'

config 'switch_port'

option 'port' '1'
option 'pvid' '1'

config 'switch_port'

option 'port' '2'
option 'pvid' '1'

config 'switch_port'

option 'port' '3'
option 'pvid' '1'

config 'switch_port'

option 'port' '4'
option 'pvid' '1'

config 'switch_port'

option 'port' '5'
option 'pvid' '1'

I'm not familiar with the hardware you are using but wanted to pass on it works at least on rtl8366rb.

-Tim Miller Dyck

comment:3 Changed 4 years ago by jow

  • Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)

Milestone Backfire 10.03.2 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.