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

Interface Type Bridge #6170

Closed
BarbarossaTM opened this issue Apr 15, 2021 · 10 comments
Closed

Interface Type Bridge #6170

BarbarossaTM opened this issue Apr 15, 2021 · 10 comments
Labels
status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application

Comments

@BarbarossaTM
Copy link
Contributor

BarbarossaTM commented Apr 15, 2021

NetBox version

v2.11

Feature type

Data model extension

Proposed functionality

I just saw the update on #5402 and I think there is a trivial thing missing which would aid modeling bridges even further.

I propose to add an Interface type "Bridge" to denote an interface is a bridge (for whatever definition that may be in your environment). With #1519 in play modeling the relationship is possibe but one would have to rely on naming convention, tags or a custom attribute to denote that a given interface is in fact a bridge. Having the choice to indicate this by setting the interface type to bridge seems better.

I really just thought about #1519 in context of bridges today but were to slow to add a comment to #5402 obviously ;-)

Use case

Use cases may be Linux-based KVM hosts, VPLS/EVPN setups etc.

Database changes

I think this does not warrant a database change but just a new entry for the Interface types

External dependencies

None

@BarbarossaTM BarbarossaTM added the type: feature Introduction of new functionality to the application label Apr 15, 2021
@jeremystretch
Copy link
Member

I guess I'm missing the distinction between a "bridge" interface and a "virtual" interface. Is it just that you want a way to indicate that a parent interface supports data forwarding among its child interfaces?

@jdavidson2021
Copy link

jdavidson2021 commented Apr 15, 2021

When I think of a virtual interface I think of a VIP on a router or other device that might float back and forth between different interfaces on a box. A bridge is typically used on a host machine that contains virtual machines that connect to the bridges on the host. I could see value in having a bridge interface type.

@BarbarossaTM
Copy link
Contributor Author

BarbarossaTM commented Apr 15, 2021

Is it just that you want a way to indicate that a parent interface supports data forwarding among its child interfaces?

Exactly.

I'm coming from a Linux background I want to distinguish between these scenarios:

  1. Having a physical interface (or a VM interface fwiw) which carries tagged VLANs and some child interfaces which fan-out those VLANs as seperate SVIs and have IPs on them (think router). Here the parent/child relationship would be used to model which "vlan-raw-device" (in ifupdown* speak) is to be used for VLAN x.
  2. Having a bridge (carrying VLANs or not) which has some member interfaces to forwar traffic between. With vlan-aware bridging the latter can look the same as SVNs above and even the bridge may have tagged VLANs configured.

This would mean that it most likely would be a good idea to allow denoting the interface type bridge in a VM, too (which I use regularly in our community ISP for example). So this would mean having a choice of "virtual interface type", too, which currently would allow "virtual" and "bridge".

I hope that clarifies my thoughts a bit :-)

@jeremystretch
Copy link
Member

Ok, so is the scope of this proposal limited to simply introducing a bridge Interface type? Because that's easy. I just want to make sure I'm not missing any expectations beyond that.

@BarbarossaTM
Copy link
Contributor Author

Yes exactly that. For devices and - on 2nd thought - for VMs, too. But that's all I'm wishing for :-)

@BarbarossaTM
Copy link
Contributor Author

BarbarossaTM commented Apr 15, 2021

That said, a chat discussion about this just lead to a shortcoming of my proposal. Consider the following:

br0 which is a vlan-aware-bridge on Linux, has for example eth0 as member ports with some tagged VLANs and on top of the bridge an interface which breaks out vlan 42 (like br0.42 or with a different name). Following my approach above both the member port and the vlan interface would be children of the bridge. This may sound academic but this actually is something I - and obviusly others - use on some machines.

So it might be worth thinking about my proposal from #5402 to add a bridge relationship like the current LAG relationshop where bridge member interfaces have the bridge they belong to set explicitly. Which obviously would warrant an interface type bridge, too, but a little(?) bit of special handling same as for LAGs.

That would be the A+ solution IMHO.

@jeremystretch
Copy link
Member

Following my approach above both the member port and the vlan interface would be children of the bridge.

You run into a similar problem trying to define tagged subinterfaces, e.g. eth0, eth0.100, and br100. This case, eth0.100 could be considered a child of both eth0 and of br100, which obviously isn't supported currently.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Apr 15, 2021
@BarbarossaTM
Copy link
Contributor Author

BarbarossaTM commented Apr 15, 2021

You run into a similar problem trying to define tagged subinterfaces, e.g. eth0, eth0.100, and br100. This case, eth0.100 could be considered a child of both eth0 and of br100, which obviously isn't supported currently.

I'm unsure in which relationship those interface would be. Are we talkinga about eth.100 being part of br0 or eth0 being part of br0?

Following the the "bridge ports are modeled like LAG members" this should be possible though as eth0 whould have bridge br0 set and eth0.100 could a child of eth0 or the latter + eth0.100 having bridge br0 set.

@jeremystretch
Copy link
Member

Tagged subinterfaces on a physical interface assigned to a bridge group. The subinterface is a child of its physical interface, but a member of the bridge group. I agree that this is best modelled by introducing a new "bridge member" relationship separate from the parent assignment.

@jeremystretch
Copy link
Member

Good discussion above. I've opened #6346 to replace this issue with a clearer scope.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: under review Further discussion is needed to determine this issue's scope and/or implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants