IPAM enhancement (network calc) #2647

Closed
opened 2025-12-29 18:20:49 +01:00 by adam · 4 comments
Owner

Originally created by @alexey-kirillov on GitHub (Jun 4, 2019).

Environment

  • NetBox version: 2.5.13

Proposed Functionality

Add detailed prefix info:

  • dotted decimal notation for network mask
  • inverse mask
  • min/max ip
  • size

Use Case

Obviously, it would be helpful, e.g. copy an inverse mask to acl config.

Database Changes

none

External Dependencies

none

Originally created by @alexey-kirillov on GitHub (Jun 4, 2019). <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * NetBox version: 2.5.13 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Add detailed prefix info: - dotted decimal notation for network mask - inverse mask - min/max ip - size <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case Obviously, it would be helpful, e.g. copy an inverse mask to acl config. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes none <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies none
adam closed this issue 2025-12-29 18:20:49 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 6, 2019):

These are essentially all just different ways of displaying the same information; it would be redundant to include them all on the UI.

e.g. copy an inverse mask to acl config.

If you're doing this often enough that calculating the wildcard mask by hand is a burden, you should be looking to automate your workflow: That is, pulling the prefix via the API and scripting out the config from the data retrieved, to remove the manual process entirely.

@jeremystretch commented on GitHub (Jun 6, 2019): These are essentially all just different ways of displaying the same information; it would be redundant to include them all on the UI. > e.g. copy an inverse mask to acl config. If you're doing this often enough that calculating the wildcard mask by hand is a burden, you should be looking to automate your workflow: That is, pulling the prefix via the API and scripting out the config from the data retrieved, to remove the manual process entirely.
Author
Owner

@alexey-kirillov commented on GitHub (Jun 7, 2019):

Absolutely correct for large infrastructure. API is one of the key features one should use.
But netbox is also a great tool for documenting small to medium-sized networks (surprisingly, you can find some world-readable instances in google inurl:"ipam/ip-addresses/"). And I'm sure most of them are maintained manually. In fact I'm missing this feature after migrating from racktables.
Anyway implementation shouldn't require much effort.

@alexey-kirillov commented on GitHub (Jun 7, 2019): Absolutely correct for large infrastructure. API is one of the key features one should use. But netbox is also a great tool for documenting small to medium-sized networks (surprisingly, you can find some world-readable instances in google inurl:"ipam/ip-addresses/"). And I'm sure most of them are maintained manually. In fact I'm missing this feature after migrating from racktables. Anyway implementation shouldn't require much effort.
Author
Owner

@baldoarturo commented on GitHub (Jun 15, 2019):

I second this. I could do it too, I think everything can be handled inside the template.

@baldoarturo commented on GitHub (Jun 15, 2019): I second this. I could do it too, I think everything can be handled inside the template.
Author
Owner

@jeremystretch commented on GitHub (Jun 24, 2019):

I think what bothers me most about this is that none of the listed points concern a specific prefix: They're all merely alternative formats of displaying a mask, and at that are mostly relevant only to IPv4.

dotted decimal notation for network mask

An antiquated way of displaying the prefix length (e.g. 255.255.255.0 instead of /24), which most people have memorized anyway.

inverse mask

Redundant to the above.

min/max ip

This one is at least pertinent to a specific prefix, but the information is already available under the child IPs list.

size

For any scenario where you're concerned with the actual number of IPs within a prefix, you've probably memorized this already anyway. Typically for IPv4 (and always with IPv6) we talk about prefixes in terms of prefix length (e.g. /24) rather than absolute host count.

I'm going to close this out as I believe it would only introduce cruft to the prefix view, and the data in question is easily referenced on a cheat sheet.

@jeremystretch commented on GitHub (Jun 24, 2019): I think what bothers me most about this is that none of the listed points concern a specific prefix: They're all merely alternative formats of displaying a mask, and at that are mostly relevant only to IPv4. > dotted decimal notation for network mask An antiquated way of displaying the prefix length (e.g. `255.255.255.0` instead of `/24`), which most people have memorized anyway. > inverse mask Redundant to the above. > min/max ip This one is at least pertinent to a specific prefix, but the information is already available under the child IPs list. > size For any scenario where you're concerned with the actual number of IPs within a prefix, you've probably memorized this already anyway. Typically for IPv4 (and _always_ with IPv6) we talk about prefixes in terms of prefix length (e.g. /24) rather than absolute host count. I'm going to close this out as I believe it would only introduce cruft to the prefix view, and the data in question is easily referenced on a [cheat sheet](https://packetlife.net/media/library/15/IPv4_Subnetting.pdf).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2647