netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.15k stars 2.59k forks source link

Show available IP addresses #289

Closed kenspi closed 8 years ago

kenspi commented 8 years ago

The current IPAM views only display addresses added to the system. It does not display available addresses within a subnet. It would be helpful to see all addresses within a subnet, noting each address' status. This could be similar to the "status" column on the /ipam/prefixes/ page, indicating "available", "reserved", or "active". Being able to filter the list based on status, and showing all addresses on a page rather than paginated would also be helpful.

ambique commented 8 years ago

I think is one of missing features, for example if is some Virtual System or not Racked System but have one IP. is more like IP Management combined with VLAN.

Great platform!!!

jeremystretch commented 8 years ago

Any IP address not listed should be considered available, since it has not been defined. What benefit would explicitly listing every IP address have? And how would you approach this for IPv6?

kenspi commented 8 years ago

When allocating IP addresses to systems, seeing what addresses are available is helpful. This is especially true when deploying several systems at once that we'd like to be consecutively addressed. With our current IPAM (GestioIP) I can clearly see which addresses are unused, and how large the range is: 2016-07-15_15h24_59

With NetBox we have to look closely to see what ranges are available by figuring out where the breaks are: 2016-07-15_15h38_25

The ability to quickly identify reserved addresses versus used and unused would be helpful.

gdouchet commented 8 years ago

An idea could be to group together IPs by block in order not to list all IPs (especially for IPv6). When aggregation is not possible, then list by smaller blocks or at the end individual IPs.

For my ISP usage, this would be a very very appreciated feature, in order to make choices when assigning IPs to customers.

jeremystretch commented 8 years ago

So maybe between, say, .42 and .50, we'd inject a row reading "7 IPs available?" I think that would work fine for IPv4. We could employ a similar approach for IPv6 but I'll have to give it more thought.

gdouchet commented 8 years ago

Or maybe aggregate at the most. For example (.42 and .50 are used but free between the both): 192.168.0.42/32: used 192.168.0.43/32: free 192.168.0.44/30: free 192.168.0.48/31: free 192.168.0.50/32: used

Don't know if it could work...

jeremystretch commented 8 years ago

I think I'd prefer to just state the range, since unlike prefix aggregates IP addresses are atomic units. Generating aggregates to cover the space takes up more room on the page and can also make it more difficult to determine how much free space there is.

kenspi commented 8 years ago

So maybe between, say, .42 and .50, we'd inject a row reading "7 IPs available?"

I think this is a reasonable solution and reduces clutter.

malaiam commented 8 years ago

I would also like to have this feature. And I agree with @jeremystretch 's range proposal, it will work both on IPv4 and IPv6. And this should be showed in a slightly different colour, light green or similar.

I also think this feature should be extended to VLANs within the group to show available VLANs as ranges. (btw, I belive the sites with no VLAN group should have an implicit default group, even if the user is not creating one).

Otherwise great work with the project Jeremy, I think it really is adding features other IPAMs don't have, even though a few more features could be welcomed.

alexjhart commented 8 years ago

phpipam might be a source of inspiration. I think they do a great job with IPAM in general. Seems like netbox does a better job with DCIM and phpipam does a better job with IPAM, while they each try to cover both needs. It will be interesting to see where the two projects end up long term.

anthraxau commented 8 years ago

Agreed, phpipam does handle that very well.

jeremystretch commented 8 years ago

@alexjhart @anthraxau Could you elaborate on what you like about phpIPAM's view?

phpipam1

IMO this is a confusing way to show IP addresses. Why does the free range appear in the hostname column? I was thinking of something like this, but more similar to how we show unallocated child prefixes.

phpipam2

The block display, while visually appealing with small IPv4 networks, isn't very useful for prefixes larger than a /24 (and not at all with IPv6).

anthraxau commented 8 years ago

In the regards to the first image I just like how the dhcp range is grouped. You're right other than that it behaves incorrectly.

The 2nd image is nice to see what's available at a quick glance but I agree that on a /22 or larger it would be painful I didn't even think of IPv6 :(

I've been using excel for a /22 and a few other prefixes so I'm feeling abit blessed with what you have currently.

I'm not sure if other people do this but I tend to group similar devices in groups on the prefix for example routers .250-254 core switches .240-249 VMware stuff .100-.149 etc and I usually colour code them for easy navigation of my spreadsheet so that I can quickly glance other it and see any gaps that are available. I've noticed you do this for rack devices. Would be nice to be able to enable this for the ipam

alexjhart commented 8 years ago

image I never considered the ranges to be under the hostname column. My eye accepted that as a range of available IPs and find the offset helpful in establishing the difference. More important than which column data shows up under is the display and grouping of unused space. Having a place holder with a different row color and a range displayed of the available space is adequate. I also like similar types of ranges being grouped, like the dhcp range shown here, though that is less important to me than showing available space. It just plays into the argument you had for the next screenshot where doing things that help with large subnets is important. This could streamline the display of a lot of larger subnets.

image I could care less about this visual display and agree it isn't practical for larger subnets. If you did want to have something like this, maybe you would set a limit for max prefix size it is displayed for.

image I think you can take a similar approach to what you do with the child prefixes table. Here you have available subnets (though I didn't realize this at first, so maybe consider a different row color). Those are hyperlinked to a create new subnet form with the range autofilled, which I like. Though the workflow might be nicer if you used a popup rather than directing the user to a new page?

image Anyway, maybe something like this. I imagine that range there is hyperlinked and takes you to a new IP address form for the first IP in that range. By the way, it would be nice to be able to add a range of IPs, not just one at a time. Again, I think it would flow better if you handle the addition in a popup (similar to phpipam).

I like @anthraxau's idea of having color coded ranges. Maybe this can be accomplished with a tag #132 I imagine something similar to gmail labels where you have have multiple tags shown in the table which can have colors assigned to them, to make different things stand out more. That idea is also off topic though.

jeremystretch commented 8 years ago

How about this?

netbox_ip_rows

Clicking one of the "free IPs" buttons takes the user to the IP adress creation form, pre-populated with the first available IP in that range.

ambique commented 8 years ago

Great.

On Wednesday, 3 August 2016, Jeremy Stretch notifications@github.com wrote:

How about this?

[image: netbox_ip_rows] https://cloud.githubusercontent.com/assets/13487278/17369606/fb21969a-5966-11e6-9003-7115f435c3ce.png

Clicking one of the "free IPs" buttons takes the user to the IP adress creation form, pre-populated with the first available IP in that range.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/digitalocean/netbox/issues/289#issuecomment-237257185, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLscxU8TJb4f073j-4UQ9OREj8zTEwoks5qcLTugaJpZM4JL12t .


Arafat M. Bique Security Analyst

CISA | GCFE | GWAPT | GPEN | CISSP | CHFI | CEH | CCNP | CCNA SECURITY | CCAI | MCSE

Esta mensagem foi enviada a partir de um dispositivo móvel, pelo que poderá conter erros de acentuação e informação incompleta.

This message was sent from a mobile device so some features and information might not be completed or available.

alexjhart commented 8 years ago

Looks good. Only improvement I can see would be to add the ranges like I had in my mockup.

bellwood commented 8 years ago

Being able to "add an IP" from the free block would be great

jeremystretch commented 8 years ago

@bellwood The "free IPs" button is indeed a link to add an IP, initialized to the first available IP in the range.

jeremystretch commented 8 years ago

Please try out v1.4.1 and provide feedback.