Modify

Opened 3 years ago

Closed 3 years ago

#20021 closed defect (not_a_bug)

Using untagged and tagged VLANs on the NSM5-XW switch tags everything

Reported by: rogerpueyo Owned by: developers
Priority: high Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: ubiquiti, nsm5-xw, switch, vlan, port, tagged, untagged Cc:

Description

Hi there,

I found the following problem when configuring the switch of a Ubiquiti NanoStation M5 XW. The device has two Ethernet ports using a single interface (eth0) with a switch. The two Ethernet ports, labeled "Main" and "Secondary" correspond to the switch's ports 5 and 1, respectively.

I am trying to use the Main-P5 port with VLAN1 untagged and Secondary-P1 with VLAN2 untagged -this works- and then put VLAN12 tagged on both of them. This is:

VLAN1: CPU_tagged P5_untagged
VLAN2: CPU_tagged P1_untagged
VLAN12: CPU_tagged P5_tagged P1_tagged

So I've set the following configuration in /etc/config/network:

[...]
config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '12'
	option ports '0t 1t 5t'
[...]

To my surprise, however, tagging VLAN12 on ports P1 and P5 forces tagging on these ports for VLAN1 and VLAN2 (which shouldn't). See this part of the output from 'swconfig dev switch0 show':

[...]
VLAN 1:
	vid: 1
	ports: 0t 5t <----WRONG!
VLAN 2:
	vid: 2
	ports: 0t 1t <----WRONG!
VLAN 12:
	vid: 12
	ports: 0t 1t 5t <----RIGHT

If I test the following configuration in /etc/config/network, in which VLAN12 only affects P1:

[...]
config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

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

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

config switch_vlan
	option device 'switch0'
	option vlan '12'
	option ports '0t 1t'
[...]

I get the following output from 'swconfig dev switch0 show':

[...]
VLAN 1:
	vid: 1
	ports: 0t 5 <----RIGHT!
VLAN 2:
	vid: 2
	ports: 0t 1t <----WRONG!
VLAN 12:
	vid: 12
	ports: 0t 1t <----RIGHT

I am attaching the complete output of the 'swconfig' commands, in case they are useful.

Thank you very much!

Attachments (4)

swconfig_vlan12_0t_1t (4.5 KB) - added by rogerpueyo 3 years ago.
swconfig_vlan12_0t_1t.2 (4.5 KB) - added by rogerpueyo 3 years ago.
swconfig_vlan12_0t_1t.3 (4.5 KB) - added by rogerpueyo 3 years ago.
swconfig_vlan12_0t_1t_5t (4.5 KB) - added by rogerpueyo 3 years ago.
swconfig output VLAN12 on P1 and P5

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by rogerpueyo

Changed 3 years ago by rogerpueyo

Changed 3 years ago by rogerpueyo

Changed 3 years ago by rogerpueyo

swconfig output VLAN12 on P1 and P5

comment:1 Changed 3 years ago by rogerpueyo

Similar behaviour with a TP-Link TL-WDR4300:

[...]
config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

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

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

config switch_vlan
        option device 'switch0'
        option vlan '12'
        option vid '12'
        option ports '0t 1t 2t 4 5t'
[...]

turns into:

VLAN 2:
	vid: 2
	ports: 0t 2t 3 <---P4 missing!
VLAN 3:
	vid: 3
	ports: 0t 1t 
VLAN 12:
	vid: 12
	ports: 0t 1t 2t 4 5t

comment:2 Changed 3 years ago by anonymous

While it works properly on an MT7620-based devices (Xiaomi MiWifi Mini, Nexx WT3020, etc.):

[...]
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 6t'

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

config switch_vlan
	option device 'switch0'
	option vlan '12'
	option ports '0t 1t 4t 6t'
[...]
[...]
VLAN 1:
	vid: 1
	ports: 0 1 6t 
VLAN 2:
	vid: 2
	ports: 4 6t 
VLAN 12:
	vid: 12
	ports: 0t 1t 4t 6t

comment:3 Changed 3 years ago by jogo

  • Resolution set to not_a_bug
  • Status changed from new to closed

The switch of the Nanostation M5 does not support mixed traffic, each port can only be tagged or untagged for all vlans it is part of.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.