Interface Type Bridge #4768

Closed
opened 2025-12-29 19:20:17 +01:00 by adam · 10 comments
Owner

Originally created by @BarbarossaTM on GitHub (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

Originally created by @BarbarossaTM on GitHub (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
adam added the type: featurestatus: under review labels 2025-12-29 19:20:17 +01:00
adam closed this issue 2025-12-29 19:20:17 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 15, 2021):

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?

@jeremystretch commented on GitHub (Apr 15, 2021): 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?
Author
Owner

@jdavidson2021 commented on GitHub (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.

@jdavidson2021 commented on GitHub (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.
Author
Owner

@BarbarossaTM commented on GitHub (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 :-)

@BarbarossaTM commented on GitHub (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 :-)
Author
Owner

@jeremystretch commented on GitHub (Apr 15, 2021):

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.

@jeremystretch commented on GitHub (Apr 15, 2021): 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.
Author
Owner

@BarbarossaTM commented on GitHub (Apr 15, 2021):

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

@BarbarossaTM commented on GitHub (Apr 15, 2021): Yes exactly that. For devices and - on 2nd thought - for VMs, too. But that's all I'm wishing for :-)
Author
Owner

@BarbarossaTM commented on GitHub (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.

@BarbarossaTM commented on GitHub (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.
Author
Owner

@jeremystretch commented on GitHub (Apr 15, 2021):

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 commented on GitHub (Apr 15, 2021): > 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.
Author
Owner

@BarbarossaTM commented on GitHub (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.

@BarbarossaTM commented on GitHub (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.
Author
Owner

@jeremystretch commented on GitHub (Apr 15, 2021):

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 commented on GitHub (Apr 15, 2021): 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.
Author
Owner

@jeremystretch commented on GitHub (May 4, 2021):

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

@jeremystretch commented on GitHub (May 4, 2021): Good discussion above. I've opened #6346 to replace this issue with a clearer scope.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4768