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

Detailed overview of prefixes #2126

Closed
cyberbootje opened this issue May 29, 2018 · 2 comments
Closed

Detailed overview of prefixes #2126

cyberbootje opened this issue May 29, 2018 · 2 comments

Comments

@cyberbootje
Copy link

Issue type

[X ] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • NetBox version: 2.3.3
  • A detailed description of the proposed functionality:
    This feature request relates to issue Add the ability to query all available subnets of type (e.g /27) under a prefix via the api #2100 as far as i can see.
    It would be nice to be able to display all ip addresses within a (sub)prefix for ipv4 and ipv6.
    When you assign an ip address you want to make sure the ip is free, Netbox covers that but what it doesn't do is hand out a detailed list of all ip addresses within that range whether it's reserved, assigned or free like in Racktables.
    For example, if you create a /21 ipv4 prefix, you can create smaller childs(already in Netbox) like a /24 or even /27.
    When you click on the /27 you would get a list of all the 32 ip's within that prefix and should be able to link it to devices, virtual machines and maybe even reserve it/add comments.
    And the other way around, if you create devices or vm's where you need to assign single ip addresses you should also be able to get the same list, select the desired ip's and assign them.
    The same goes for ipv6 except that the list would contain all the next available ipv6 prefixes within that parent. For example, a /48 should show a list that let's you assign childs of /56, /60, /64 etc... until that /48 is full.
    That means if you assign a smaller prefix within an ipv4 or ipv6 prefix, the list should be updated accordingly to make it impossible to create prefixes that aren't valid.

Basically, i think Netbox should hand out available ip resources within a blink of an eye without having to think what is free or not.

  • A use case for the new feature: ipv4
    If you have a /26 and you created it as a "shared prefix" it is possible that you want to assign ip 1 to 8 to customer A and ip 16 to 18 to customer B. When customer A wants 2 more you would have a clear overview of the assigned list and select ip 9 and 10 to be "added" to the account of customer A.
    Customer A is happy not to have it's ip's scattered around the whole prefix.

  • A use case for the new feature: ipv6
    Ipv6 contains "A LOT" of ip's, it's very easy to make mistakes, especially if you are used to ipv4.
    With this feature you will have a clear overview what prefixes are available to use within an instant and without calculating or using extra tools.

  • A rough description of any necessary changes to the database schema
    Don't think this will be a lot, prefixes are already in the database.
    Maybe some extra entry's would be needed to contain detailed information per single ipv4 address or small ipv6 address like reservations and comments ?

  • Any relevant third-party libraries which would be needed
    Don't think so.

@candlerb
Copy link
Contributor

It would be nice to be able to display all ip addresses within a (sub)prefix for ipv4 and ipv6.

In Netbox today, when you navigate to a prefix, there is already a tab labelled "IP Addresses". How does your proposal differ from this?

When you assign an ip address you want to make sure the ip is free, Netbox covers that but what it doesn't do is hand out a detailed list of all ip addresses within that range whether it's reserved, assigned or free like in Racktables.

It does, except that ranges of IP free addresses are aggregated. Here is an example:

image

When you click on the /27 you would get a list of all the 32 ip's within that prefix and should be able to link it to devices, virtual machines and maybe even reserve it/add comments.

That sounds like two slightly different requests.

  1. Itemising all free IP addresses. Note that in the Netbox data model, there is no object representing a "free" address; it's just a gap between other addresses. But I prefer aggregating the gaps: in an IPv6 subnet you could have millions of free addresses between A1 and A2, and I wouldn't want them listed separately.

  2. Being able to assign a free IP address directly to an interface, from the IPAM region. At the moment, Netbox doesn't work this way: if you create an IP address first, it's quite tedious to assign it to an interface. It works better if you go to the interface and add a new IP address there.

A use case for the new feature: ipv4
If you have a /26 and you created it as a "shared prefix" it is possible that you want to assign ip 1 to 8 to customer A and ip 16 to 18 to customer B. When customer A wants 2 more you would have a clear overview of the assigned list and select ip 9 and 10 to be "added" to the account of customer A.
Customer A is happy not to have it's ip's scattered around the whole prefix.

I think a better solution for this is IP Address Ranges, see #834

@jeremystretch
Copy link
Member

As far as I can tell, the available-prefixes and available-ips API endpoints already provide the functionality being proposed.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants