Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1341 - vlan configuration fails #6294

Closed
openwrt-bot opened this issue Feb 10, 2018 · 5 comments
Closed

FS#1341 - vlan configuration fails #6294

openwrt-bot opened this issue Feb 10, 2018 · 5 comments
Labels

Comments

@openwrt-bot
Copy link

rrt:

Environment: Lede 17.01.4 on UBNT-ERX (Ubiquiti Networks - EdgeRouter X)

Reproducing: Configure the vlan switch configuration in luci with additional vlans (example below), and notice that the config won't get set up properly.

It turned out that the configured vlans get properly saved to /etc/config/network, but swconfig dev switch0 show would still only present only an incomplete configuration. Only the default vlan 1 (lan) and vlan 2 (wan) happened to work on those ports for which they where still configured, but nothing more.

Workaround / Solution?:
Adapting examples that I found on the net, I found out that an additional vlan for the port 4 could successfully be configured with swconfig, if adding following command sequence (that directly uses vlan id numbers in single commands) to /etc/rc.local (and it works as long as no a network config update is triggered in luci):

# The swconfig port numbers on UBNT-ERX are: # |0|1|2|3|4| |6| # ^ ^ # wan host # # (looking at front of ports)

reset config

swconfig dev switch0 set reset 1
swconfig dev switch0 set enable_vlan 1

configure vlan members

swconfig dev switch0 vlan 1 set ports '1 2 3 6t'
swconfig dev switch0 vlan 2 set ports '0 6t'
swconfig dev switch0 vlan 14 set ports '4 6t'

configure incoming package tagging

swconfig dev switch0 port 0 set pvid 2
swconfig dev switch0 port 1 set pvid 1
swconfig dev switch0 port 2 set pvid 1
swconfig dev switch0 port 3 set pvid 1
swconfig dev switch0 port 4 set pvid 14

apply config

swconfig dev switch0 set apply 1

Not working sequence / Cause?
I had also tried the following vlan member configuration sequence which seemed more logical and complete, but trying it in this more explicit way again only let to an incomplely activated switch config, just as the one set up by the lede scripts. So maybe this creates or suffers the same error. Maybe swconfig has a bug or the sequence is simply not correct.

swconfig dev switch0 set reset 1
swconfig dev switch0 set enable_vlan 1

swconfig dev switch0 vlan 1 set ports '1 2 3 6t'
swconfig dev switch0 vlan 1 set vid 1
swconfig dev switch0 vlan 2 set ports '0 6t'
swconfig dev switch0 vlan 2 set vid 2
swconfig dev switch0 vlan 3 set ports '4 6t'
swconfig dev switch0 vlan 3 set vid 14

swconfig dev switch0 port 0 set pvid 2
swconfig dev switch0 port 1 set pvid 1
swconfig dev switch0 port 2 set pvid 1
swconfig dev switch0 port 3 set pvid 1
swconfig dev switch0 port 4 set pvid 14

swconfig dev switch0 set apply 1

It seems to me the problem could possibly be solved by repairing swconfig to accept the lede config or let the scripts use the terser but working syntax.

@openwrt-bot
Copy link
Author

rrt:

I found other vlan issues that I think could be other symptoms of lede trying to configure the vlans with a half-working swconfig sequence (only works if counter equals vlan id?)

I left comments on the other issues, but maybe the syntax/sequence mismatch reported in this issue is the root cause.

@openwrt-bot
Copy link
Author

rrt:

Ok, the following bug numbers confirm the lede scripts really seem to use the wrong sequence (second example above, that only works for when stanza==vlanid), and many vlan configuration issues can be fixed by having the scripts use the working swconfig sequence (first from above).

FS#991
FS#1147
FS#1279

@openwrt-bot
Copy link
Author

jow-:

Fixed with the following commits:

@openwrt-bot
Copy link
Author

rrt:

Thank you very much for fixing it!

@openwrt-bot
Copy link
Author

mankane:

Awesome
[[https://realestatesoft.online/mlsni-connnectmls-mred-mls-connect-mred-mls/|mls connect]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant