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

[WIP, will not be merged] roles: add possibility to untag ports for certain hosts #451

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PolynomialDivision
Copy link
Contributor

You can use this by adding to the host file:

port_untag:
  40: [2,3,4]

You can use this by adding to the host file:

	port_untag:
	  40: [2,3,4]
@Noki
Copy link
Member

Noki commented Apr 13, 2023

This is great! Does the / can we make the following syntax work?

# vid: array of ports
port_untag:
  13: [1]          # untag the wireguard uplink vlan - corerouter is plugged into a normal home router
  40: [2,3,4]      # untag the default dhcp network - clients can get a dhcp address
  41: [5]          # untag a second dhcp network - network used for hosting services without client isolation / inbound filtering

I think the untag option on the networks would then have to go. In my optinion this syntax would also make it much easier to spot how different ports are used.

@Noki
Copy link
Member

Noki commented Apr 13, 2023

Maybe it would be even better to pull all the port related stuff into a ports section as another idea on how to structure switchport profiles (#120).

ports:
  vlans:
    untagged:
      13: [1]             # untag the wireguard uplink vlan - corerouter is plugged into a normal home router
      40: [2,3,4]         # untag the default dhcp network - clients can get a dhcp address
      41: [5]             # untag a second dhcp network - network used for hosting services without client isolation / inbound filtering
    tagged:
      21: [6]             # vlan for antenna
      22: [7]             # vlan for antenna
      42: [1,2,3,4,5,6]   # management vlan
  poe: 
    on: [1,2,3,4]         # enable poe on ports 1-4
    poe_mode:
      24_passive: [1,2]   # set poe_mode to 24_passive on ports 1-2
      af: [3, 4]          # set poe_mode to af on ports 3-4

@pktpls
Copy link
Contributor

pktpls commented Jul 4, 2023

I have a feeling the simplest way is to stay close to OpenWrt's config:

    ports:
      mesh_core: lan1
      dhcp: lan2
      privdhcp: lan3
      mgmt: 'lan1:t lan2:t lan3:t lan4 wan:t' # untagged only on lan4
      vdsl: wan

The default would be the following (i.e. what we do right now), based on which ports and networks exist.

    ports:
      mesh_core: 'lan1:t lan2:t lan3:t lan4:t wan:t'
      dhcp: 'lan1:t lan2:t lan3:t lan4:t wan:t'
      privdhcp: 'lan1:t lan2:t lan3:t lan4:t wan:t'
      mgmt: 'lan1:t lan2:t lan3:t lan4:t wan:t'
      vdsl: 'lan1:t lan2:t lan3:t lan4:t wan:t'

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

Successfully merging this pull request may close these issues.

None yet

3 participants