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

[openwrt] missing "vid" option in "switch" #85

Closed
cappe87 opened this Issue Jun 12, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@cappe87
Member

cappe87 commented Jun 12, 2017

The configuration shown in the programmable switch example doesn't work.

I needed to add the vid attribute to the netjson, eg:

{
    "switch": [
        {
            "name": "switch0",
            "reset": true,
            "vlan": [
                {
                    "device": "switch0",
                    "vlan": 4,
                    "ports": "4t 6t",
                    "vid": "170"
                }
            ],
            "enable_vlan": true
        }
    ]
}

@nemesisdesign nemesisdesign self-assigned this Jun 12, 2017

@nemesisdesign nemesisdesign added the bug label Jun 12, 2017

@nemesisdesign nemesisdesign changed the title from vid option missing under programmable switch to [openwrt] missing "vid" option in vlan elements under "switch" section Jun 12, 2017

@nemesisdesign nemesisdesign changed the title from [openwrt] missing "vid" option in vlan elements under "switch" section to [openwrt] missing "vid" option "switch" Jun 12, 2017

@nemesisdesign nemesisdesign changed the title from [openwrt] missing "vid" option "switch" to [openwrt] missing "vid" option in "switch" Jun 12, 2017

@nemesisdesign

This comment has been minimized.

Member

nemesisdesign commented Jun 12, 2017

After doing some research and after asking for help in the lede-dev channel on IRC, I propose the following solution:

I can automatically generate the vid option from the vlan field but allow to override this automatic behaviour by explicitly setting vid.

In the docs I will explain this behaviour in detail with a couple of examples.

What do you think @cappe87?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment