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

[feature] Add support for DSA #195

Open
mips171 opened this issue Aug 23, 2021 · 8 comments · May be fixed by #261
Open

[feature] Add support for DSA #195

mips171 opened this issue Aug 23, 2021 · 8 comments · May be fixed by #261
Labels
enhancement important High priority or release blocker

Comments

@mips171
Copy link

mips171 commented Aug 23, 2021

DSA is becoming the default switch configuration mechanism, replacing swconfig for many OpenWrt targets in the upcoming stable release. OpenWISP does not yet support DSA.

Docs
https://openwrt.org/docs/guide-user/network/dsa/start

@nemesifier nemesifier changed the title Add support for DSA [feature] Add support for DSA Sep 28, 2021
@nemesifier nemesifier added this to Backlog in OpenWISP Priorities for next releases via automation Jan 31, 2022
@nemesifier nemesifier moved this from Backlog to To do in OpenWISP Priorities for next releases Jan 31, 2022
@nemesifier nemesifier added the important High priority or release blocker label Jan 31, 2022
@nemesifier
Copy link
Member

What the openwrt docs do not explain is that with the new syntax, we have to move any bridge related configuration to the "device" config types. However, since we need to be backward compatibile with the older versions of OpenWrt, I think we need to continue also doing what we are doing now (support both).

@nemesifier
Copy link
Member

For now we will focus on supporting the new bridge definition.

Defining DSA vlans can then be done with this custom config:

{
    "network": [
        {
            "config_name": "bridge-vlan",
            "config_value": "vlan1",
            "vlan": 1,
            "ports": [
                "lan1:u*",
                "lan2:u*",
                "lan3:u*",
                "lan4:u*"
            ]
        }
    ]
}

In the next release we can add a schema for this new syntax but before doing so we have to discuss a bit more and moreover wait for DSA to be implemented in all the devices, collect more feedback and make sure we implement it correctly.

@nemesifier
Copy link
Member

There's a dedicated issue for the new bridge syntax definition: #195.

@nemesifier
Copy link
Member

I tried reading the examples and docs in the OpenWrt wiki but it's not really clear to me, moreover the last example is not clear at all.

I cannot implement something if I don't understand the schema of the configuration, what the possible values are, the wiki mentions only examples but there's no explanation of the schema and possible values the configuration can have.

I hope someone can help clarify the situation a bit, but until then it will be pretty hard to implement something which is not even documented, nor I know at what source code to look at to figure it out.

@nemesifier
Copy link
Member

Maybe this video explains it better, I will look into it: https://www.youtube.com/watch?v=qeuZqRqH-ug.

@nikolya-prodigy
Copy link

openwisp dsa

That's so much to draw to get

config bridge-vlan 'bridge_vlan10'
option device 'br0'
list ports 'wan:t'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
list ports 'lan4:t'
option vlan '10'

@nemesifier
Copy link
Member

nemesifier commented Jun 11, 2022

Exampe custom syntax provided by @nikolya-prodigy to achieve what he wrote above:

{
    "interfaces": [
        {
            "type": "ethernet",
            "name": "br0.10",
            "mtu": 1500,
            "disabled": false,
            "network": "br0_vlan10",
            "mac": "",
            "autostart": true,
            "addresses": [
                {
                    "proto": "dhcp",
                    "family": "ipv4"
                }
            ]
        }
    ],
    "network": [
        {
            "config_name": "bridge-vlan",
            "config_value": "bridge_vlan10",
            "device": "br0",
            "vlan": 10,
            "ports": [
                "wan:t",
                "lan1:t",
                "lan2:t",
                "lan3:t",
                "lan4:t"
            ]
        }
    ]
}

pandafy added a commit that referenced this issue Mar 30, 2023
- Added VLAN 802.1q and VLAN 802.1ad interfaces
pandafy added a commit that referenced this issue Mar 30, 2023
- Added VLAN 802.1q and VLAN 802.1ad interfaces

Closes #195
@pandafy pandafy linked a pull request Mar 30, 2023 that will close this issue
@pandafy
Copy link
Member

pandafy commented Mar 31, 2023

pandafy added a commit that referenced this issue May 5, 2023
- Added VLAN 802.1q and VLAN 802.1ad interfaces

Closes #195
pandafy added a commit that referenced this issue Jan 22, 2024
- Added VLAN 802.1q and VLAN 802.1ad interfaces

Closes #195
@nemesifier nemesifier moved this from To do to In progress in OpenWISP Priorities for next releases May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement important High priority or release blocker
Projects
Development

Successfully merging a pull request may close this issue.

4 participants