bisdn / meta-switch

MIT License
4 stars 2 forks source link

Add automated option to create a simple L2 learning switch #188

Closed rubensfig closed 2 months ago

rubensfig commented 4 months ago

For usability purposes, it is necessary to add a script that allows users to test default switch functionality. This script creates systemd-networkd files that setup a default L2 forwarding scenario.

Addresses github.com/https://github.com/bisdn/bisdn-linux/issues/101.

This PR can be tested with:

[Bridge]
DefaultPVID=1
VLANFiltering=1
Filename: 10-swbridge.l2-learn.network
...

- basebox-init-l2-learning-config -w
  - Check the contents of the /etc/systemd/network folder

10-port1.l2-learn.network 10-port16.l2-learn.network 10-port22.l2-learn.network 10-port29.l2-learn.network 10-port35.l2-learn.network 10-port41.l2-learn.network 10-port48.l2-learn.network 10-port54.l2-learn.network 10-port10.l2-learn.network 10-port17.l2-learn.network 10-port23.l2-learn.network 10-port3.l2-learn.network 10-port36.l2-learn.network 10-port42.l2-learn.network 10-port49.l2-learn.network 10-port6.l2-learn.network 10-port11.l2-learn.network 10-port18.l2-learn.network 10-port24.l2-learn.network 10-port30.l2-learn.network 10-port37.l2-learn.network 10-port43.l2-learn.network 10-port5.l2-learn.network 10-port7.l2-learn.network 10-port12.l2-learn.network 10-port19.l2-learn.network 10-port25.l2-learn.network 10-port31.l2-learn.network 10-port38.l2-learn.network 10-port44.l2-learn.network 10-port50.l2-learn.network 10-port8.l2-learn.network 10-port13.l2-learn.network 10-port2.l2-learn.network 10-port26.l2-learn.network 10-port32.l2-learn.network 10-port39.l2-learn.network 10-port45.l2-learn.network 10-port51.l2-learn.network 10-port9.l2-learn.network 10-port14.l2-learn.network 10-port20.l2-learn.network 10-port27.l2-learn.network 10-port33.l2-learn.network 10-port4.l2-learn.network 10-port46.l2-learn.network 10-port52.l2-learn.network 10-swbridge.l2-learn.netdev 10-port15.l2-learn.network 10-port21.l2-learn.network 10-port28.l2-learn.network 10-port34.l2-learn.network 10-port40.l2-learn.network 10-port47.l2-learn.network 10-port53.l2-learn.network 10-swbridge.l2-learn.network


- Restart systemd-network and verify connectivity
- basebox-init-l2-learning-config -c
  - Verify the folder is empty. 

Signed-off-by: Rubens Figueiredo <rubens.figueiredo@bisdn.de>
rubensfig commented 2 months ago

Closing this PR, due to discussions on how to implement this. Having a script to configure some static files is a bit of an overkill.

Decision is to instead have a set of files included with baseboxd, that are installed to the switch. These files can be copied over to the systemd-networkd folder if necessary.

Closed in favor of #195.