Skip to content

Conversation

@jbemmel
Copy link
Collaborator

@jbemmel jbemmel commented Sep 12, 2022

Move the check earlier, before any transformation logic removes the native vlan

With this patch:

netlab create -d srlinux -p clab  integration/vlan/vlan-routed-native.yml 
IncorrectValue in vlan: Node ros does not support routed native VLANs (red)
... link {'vlan': {'trunk': {'red': {}, 'blue': {}}, 'native': 'red'}, 'interfaces': [{'node': 's2', 'vlan': {'trunk': {'red': {}, 'blue': {}}, 'native': 'red'}}, {'node': 'ros', 'vlan': {'trunk': {'red': {}, 'blue': {}}, 'native': 'red'}}], 'linkindex': 2}
Fatal error in netlab: Cannot proceed beyond this point due to errors, exiting

Without it, no error is generated

if 'mode' in intf.vlan and not get_from_box(intf_data,'vlan.mode'):
intf_data.vlan.mode = intf.vlan.mode # vlan.mode is inherited from trunk dictionary or parent interface

if interface_vlan_mode(intf_data,intf_node,topology) == 'bridge': # Is this VLAN interface in bridge mode?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This also fixes a bug where vlan.mode was only being checked for the access vlan, instead of the vlan being processed

@ipspace
Copy link
Owner

ipspace commented Sep 17, 2022

Before acting on this, I want to make sure we're talking about the same thing.

I added two test cases in 7a6e1b1, one testing vlan.mixed_trunk feature flag, the other one testing vlan.native_routed feature flag. I verified that FRR and IOSv pass both test cases, and that the lack of feature flag results in an error in the expected test case.

It might be that you're trying to detect a different problem, in which case we have to go back to the drawing board.

@jbemmel
Copy link
Collaborator Author

jbemmel commented Sep 17, 2022

It’s the vlan-routed-native.yml test case which is mentioned in that commit, but not newly added

Using srlinux as a device type with that case should throw an error, it doesn’t (or didn’t when I tested it last)

@ipspace
Copy link
Owner

ipspace commented Sep 18, 2022

Are you telling me that SR Linux cannot handle the "ros" device in vlan-routed-native.yml test case? That's a pure IP interface (no bridging) with tagged and untagged IP coming in. I don't think I've seen a device (yet) that wouldn't do that, even Arista EOS can do it, and it's definitely using layer-3 switch and not router mentality.

I did find a problem or two when trying to get this to work on Arista though, so I'll open separate issues for that.

@jbemmel
Copy link
Collaborator Author

jbemmel commented Sep 18, 2022

Yes, that is exactly what I'm saying: That test case cannot be provisioned like that on SR Linux (at least not for the default 'ixrd2' device type)

For each interface, there is a vlan-tagging flag that needs to be enabled to create more than 1 subinterface on the port. When using multiple subinterfaces (i.e. with tagging enabled), one subinterface can be configured with the 'untagged' vlan - but only in bridge mode

@ipspace ipspace force-pushed the dev branch 2 times, most recently from 8bb6f28 to 3aac94e Compare October 1, 2022 15:11
@ipspace
Copy link
Owner

ipspace commented Oct 16, 2022

This has been fixed in b26e12b

@ipspace ipspace closed this Oct 16, 2022
@jbemmel jbemmel deleted the fix-native-vlan-routed-check branch November 5, 2024 13:26
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.

2 participants