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

Fix: check the VLAN/interface fwd mode compatibility #1474

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

ipspace
Copy link
Owner

@ipspace ipspace commented Nov 1, 2024

Connecting a bridge/IRB interface to two segments of a routed VLAN results in a shared IP prefix used on both segments.

This change checks for the forwarding mode mismatch and triggers an error that can be disabled with a defaults setting (because someone might want to use the shared IP prefix)

It turns out several routed VLAN transformation tests relied on this behavior, so they got the VLAN default tweak.

Fixes #1461

Connecting a bridge/IRB interface to two segments of a routed VLAN
results in a shared IP prefix used on both segments.

This change checks for the forwarding mode mismatch and triggers an
error that can be disabled with a defaults setting (because someone
might want to use the shared IP prefix)

It turns out several routed VLAN transformation tests relied on
this behavior, so they got the VLAN default tweak.

Fixes #1461
@ipspace ipspace requested a review from jbemmel November 1, 2024 10:44
Copy link

Deploying netlab with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e1e376
Status: ✅  Deploy successful!
Preview URL: https://11605718.netlab.pages.dev
Branch Preview URL: https://dev.netlab.pages.dev

View logs

quirks:
junos_lb: >
Junos devices cannot have more than one loopback interface per routing instance

vlan:
fwd_mode_check: >
You can disable this error with "defaults.vlan.warnings.mixed_fwd: False", but then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be confusing to have a "fwd_mode_check" that can be disabled through "mixed_fwd"

Suggestion: Either use mixed_fwd_check or fwd_mode_check for both?

@@ -2,6 +2,7 @@
# of link-, node- and vlan forwarding modes, in particular with mode = route
#

defaults.vlan.warnings.mixed_fwd: False
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could scope this flag to the vlan for which we want to allow the mixed forwarding, instead of globally?

or introduce a new mode value that represents this behavior, e.g. mode: mixed

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No. This an extremely niche edge case, and the only reason I didn't just shut it down is because every other blue moon someone might have a good reason to do that. I will not make a hierarchy of nerd knobs out of this ;)

Copy link
Collaborator

@jbemmel jbemmel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider introducing a new mode value instead of a global warning, this would allow more accurate modelling of user intent

@ipspace
Copy link
Owner Author

ipspace commented Nov 1, 2024

Consider introducing a new mode value instead of a global warning, this would allow more accurate modelling of user intent

How about we condense the user intent into "I want to use netlab the way it was designed" or "I want to do something you guys don't want to hear about and I will not complain about the results" 😇

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.

Check VLAN/node/interface forwarding mode compatibility
2 participants