PLEASE add 'gateway' as an IP role #10049

Closed
opened 2025-12-29 21:26:11 +01:00 by adam · 1 comment
Owner

Originally created by @ghost on GitHub (Aug 6, 2024).

NetBox version

v4.0.8

Feature type

Change to existing functionality

Proposed functionality

Please finally add the ability to mark an IP address as a gateway role. @jeremystretch, you have been fighting this request for years! Please listen to the community and recognize there is massive support for this request.
You originally proposed default gateways in 2017 when IP roles was first being integrated: https://github.com/netbox-community/netbox/issues/819 but changed your mind at some point. Certainly your prerogative, but if you changed your mind once, please be open to change it again.

Other instances of this being requested: https://github.com/netbox-community/netbox/issues/2953, https://github.com/netbox-community/netbox/issues/1434, https://github.com/netbox-community/netbox/issues/1610, https://github.com/netbox-community/netbox/issues/2163, https://github.com/netbox-community/netbox/issues/3237, https://github.com/netbox-community/netbox/issues/10542

This is asked over and over again in discussions as well:
https://github.com/netbox-community/netbox/discussions/6030

Modifying /netbox/ipam/choices.py
class IPAddressRoleChoices(ChoiceSet):

ROLE_LOOPBACK = 'loopback'
ROLE_SECONDARY = 'secondary'
ROLE_ANYCAST = 'anycast'
ROLE_VIP = 'vip'
ROLE_VRRP = 'vrrp'
ROLE_HSRP = 'hsrp'
ROLE_GLBP = 'glbp'
ROLE_CARP = 'carp'
ROLE_GATEWAY = 'gateway'

CHOICES = (
    (ROLE_LOOPBACK, _('Loopback'), 'gray'),
    (ROLE_SECONDARY, _('Secondary'), 'blue'),
    (ROLE_ANYCAST, _('Anycast'), 'yellow'),
    (ROLE_VIP, 'VIP', 'purple'),
    (ROLE_VRRP, 'VRRP', 'green'),
    (ROLE_HSRP, 'HSRP', 'green'),
    (ROLE_GLBP, 'GLBP', 'green'),
    (ROLE_CARP, 'CARP', 'green'),
    (ROLE_GATEWAY, 'Gateway', 'green'),
)

image

Use case

While @jeremystretch has explained multiple times that the gateway 'role' is not dependent on configured routes, the 'gateway' is such a fundamental aspect of networking that it is often one of the most confusing things to be left out of netbox's model of easily marking/identifying what IP is being used as a gateway.

The argument that there is no requirement that all interfaces within a prefix must use the same default gateway is certainly valid, but wouldn't that just bolster the argument to be able to also mark multiple IP's within a prefix as a role 'gateway' if that were how a particular users network was set up?

The statements that Netbox does not model a users routing topology might be true, but the line between modeling VPN tunnels, VRRP, HSRP, LAG's, Wireless SSID's, etc. is such that you're modeling pretty much every other aspect of a modern network architecture, I just can't believe there is such resistance to add a choice to a drop down menu and satisfy a request that's been ongoing for almost 7 years. (It's 2 lines of code!)

Database changes

None

External dependencies

None

Originally created by @ghost on GitHub (Aug 6, 2024). ### NetBox version v4.0.8 ### Feature type Change to existing functionality ### Proposed functionality Please finally add the ability to mark an IP address as a gateway role. @jeremystretch, you have been fighting this request for years! Please listen to the community and recognize there is massive support for this request. You originally proposed default gateways in 2017 when IP roles was first being integrated: https://github.com/netbox-community/netbox/issues/819 but changed your mind at some point. Certainly your prerogative, but if you changed your mind once, please be open to change it again. Other instances of this being requested: https://github.com/netbox-community/netbox/issues/2953, https://github.com/netbox-community/netbox/issues/1434, https://github.com/netbox-community/netbox/issues/1610, https://github.com/netbox-community/netbox/issues/2163, https://github.com/netbox-community/netbox/issues/3237, https://github.com/netbox-community/netbox/issues/10542 This is asked over and over again in discussions as well: https://github.com/netbox-community/netbox/discussions/6030 Modifying /netbox/ipam/choices.py `class IPAddressRoleChoices(ChoiceSet):` ROLE_LOOPBACK = 'loopback' ROLE_SECONDARY = 'secondary' ROLE_ANYCAST = 'anycast' ROLE_VIP = 'vip' ROLE_VRRP = 'vrrp' ROLE_HSRP = 'hsrp' ROLE_GLBP = 'glbp' ROLE_CARP = 'carp' ROLE_GATEWAY = 'gateway' CHOICES = ( (ROLE_LOOPBACK, _('Loopback'), 'gray'), (ROLE_SECONDARY, _('Secondary'), 'blue'), (ROLE_ANYCAST, _('Anycast'), 'yellow'), (ROLE_VIP, 'VIP', 'purple'), (ROLE_VRRP, 'VRRP', 'green'), (ROLE_HSRP, 'HSRP', 'green'), (ROLE_GLBP, 'GLBP', 'green'), (ROLE_CARP, 'CARP', 'green'), (ROLE_GATEWAY, 'Gateway', 'green'), ) ![image](https://github.com/user-attachments/assets/abcb9263-0b01-416b-bedf-698360c4e708) ### Use case While @jeremystretch has explained multiple times that the gateway 'role' is not dependent on configured routes, the 'gateway' is such a fundamental aspect of networking that it is often one of the most confusing things to be left out of netbox's model of easily marking/identifying what IP is being used as a gateway. The argument that there is no requirement that all interfaces within a prefix must use the same default gateway is certainly valid, but wouldn't that just bolster the argument to be able to also mark multiple IP's within a prefix as a role 'gateway' if that were how a particular users network was set up? The statements that Netbox does not model a users routing topology might be true, but the line between modeling VPN tunnels, VRRP, HSRP, LAG's, Wireless SSID's, etc. is such that you're modeling pretty much every other aspect of a modern network architecture, I just can't believe there is such resistance to add a choice to a drop down menu and satisfy a request that's been ongoing for almost 7 years. (It's 2 lines of code!) ### Database changes None ### External dependencies None
adam added the type: featurestatus: duplicate labels 2025-12-29 21:26:11 +01:00
adam closed this issue 2025-12-29 21:26:11 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 6, 2024):

I cannot imagine the degree of narcissism required, after finding several duplicate issues proposing your exact change that have been discussed and declined, to think "Clearly I just need to open another one."

This issue has been settled. Closing as a duplicate.

@jeremystretch commented on GitHub (Aug 6, 2024): I cannot imagine the degree of narcissism required, after finding several duplicate issues proposing your exact change that have been discussed and declined, to think "Clearly _I_ just need to open another one." **This issue has been settled.** Closing as a duplicate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10049