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

fritzbox-7530/7520: utilize lan1 as wan, others as lan #3312

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

grische
Copy link
Contributor

@grische grische commented Jul 9, 2024

With the switch to DSA on this device in openwrt 23.05, we can now utilize the ports of a 7520/7530 better, by splitting them according to their usage.
Before, they had all LAN ports used as WAN - a behavior which can also be easily configured in config mode nowadays.

If I remember correctly, this also changes an existing configuration to LAN1 -> WAN and LAN2,3,4 -> LAN
Therefore, the existing router owner need to make sure to plug the cable into Port1.

This patch has been tested with latest gluon and already is deployed on all affected FB7520/7530 in FFAC.

This is a new version of #3118 that includes a uci migration path for devices that were configured pre-DSA.

cc @maurerle

@github-actions github-actions bot added the 3. topic: package Topic: Gluon Packages label Jul 9, 2024
@herbetom
Copy link
Contributor

herbetom commented Jul 9, 2024

The change isn't that dsa is introduced for the device, the change is that ports can be split thanks to dsa or something like that.

Also i don't see the point in gatekeeping the migration for specific devices. If /wan + /lan is expected and /single is configured it always seems like a sensible default to copy the /single config to /wan / /lan. Or am I missing something?

@maurerle
Copy link
Member

maurerle commented Jul 9, 2024

With

-- Non-existing interfaces are nil, so they will not be added to the table

and the following coede, I also think it is fine to do this generally for all devices :)

Though I understand that @grische wanted to reduce the impact of the PR :)

@blocktrron
Copy link
Member

I'm opposed to adding special cases conveying a opinionated default roleset of the port assignment.

In the end, this adds further complexity. The user itself can re-role these DSA ports now and I'd rather like to see this configuration possibility in the Web-UI instead of configuring whatever an individual feels well suited differing from the OpenWrt default.

@grische
Copy link
Contributor Author

grische commented Jul 11, 2024

@blocktrron I understand that it is not ideal that we deviate from OpenWRT here, but we have done so in the past and users are used to it:
Many devices that do not have a dedicated WAN port use LAN1 as their WAN port and all others for "LAN" ports, making it the de-facto default for our communities.

Out of habit, many (of at least our) users just come and plug their uplink into LAN1 and are then wondering why there is no client network on LAN2. Even worse, they might enable Mesh (on WAN) and then bridge the Mesh and Client networks accidentally.

While I think the suggestion to be able to fully configure ports separately is a nice idea, I would treat this independently and focus in this PR on easy-of-use (or "good defaults") for our users.

@grische grische marked this pull request as ready for review July 11, 2024 09:02
@neocturne
Copy link
Member

The commit message "gluon-core: fix undefined lan role after migration" is inaccurate - it is not undefined, it just defaults to the site.conf setting.

I agree with @grische that this should be merged - Gluon's device checklist explicitly states that we should differ from OpenWrt's defaults for such devices.

maurerle and others added 2 commits July 22, 2024 17:10
With the switch to DSA on this board, we can now utilize the ports better, by splitting them according to their usage

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
when a device is migrated from a single WAN/LAN configuration to a
multi-port configuration (e.g. using DSA), set the same role on all
ports and not just the new WAN port.
@grische
Copy link
Contributor Author

grische commented Jul 22, 2024

@neocturne thanks, I changed the commit message to be more generic

@Djfe
Copy link
Contributor

Djfe commented Jul 23, 2024

In the end, this adds further complexity. The user itself can re-role these DSA ports now and I'd rather like to see this configuration possibility in the Web-UI instead of configuring whatever an individual feels well suited differing from the OpenWrt default.

That's part of the point: You can't reconfigure singular ports in the Web-UI since it's a bridge and mkg's PR hasn't been merged, yet.
What's presented here is a useful default for the case Gluon. Also for this particular device it's actually the default to have WAN on LAN1 (if it isn't used to do DSL itself, which can be done in OpenWrt nowadays)
Also when the device was introduced into OpenWrt and Gluon it wasn't possible to split the bridge, right?

Regardless I support the change. And getting MKG's PR finished up and merged would benefit users a lot.

@Djfe
Copy link
Contributor

Djfe commented Jul 23, 2024

I suggest adding these as well, we run these in Aachen just fine:

elseif platform.match('lantiq', 'xrx200', {
	'avm,fritz3370-rev2-hynix',
	'avm,fritz3370-rev2-micron',
	'avm,fritz7360sl',
	'avm,fritz7360-v2',
	'avm,fritz7362sl',
}) then
	lan_ifname, wan_ifname = 'lan2 lan3 lan4', 'lan1'
elseif platform.match('lantiq', 'xrx200', {
	'tplink,tdw8970',
	'tplink,tdw8980',
}) then
	lan_ifname, wan_ifname = 'lan1 lan2 lan3', 'lan4'

LAN4 on the TP-Link TDW89x0 devices is explicitly marked as a WAN port
grafik

@maurerle
Copy link
Member

I would rather get this PR through as is and handle other devices afterward if needed in a separate PR.

@rotanid rotanid merged commit 23ff99b into freifunk-gluon:main Jul 28, 2024
9 checks passed
@grische grische deleted the fix/ports-on-7520-v2 branch July 28, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. topic: package Topic: Gluon Packages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants