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.21k stars 2.59k forks source link

The first and last IP within a prefix are assumed to be unusable #658

Closed NetTinkerer closed 7 years ago

NetTinkerer commented 8 years ago

when a /27 prefix is created only 30 free IPs are mentionned. Although this is valid for Ethernet segments it is confusing when the prefix is used as a pool for nat addresses or aggregating loopbacks. It might be usefull to add a flag to a prefix if it is an ethernet segement or just a container for something else

jeremystretch commented 8 years ago

It's pretty easy to modify this behavior, but we need to figure out how to indicate whether the network/broadcast IPs should be counted. It might make sense to add a new prefix type called "pool" and count otherwise unusable IPs for prefixes of this type. It might also make sense to count them for container prefixes.

footplus commented 8 years ago

FWIW, RackTables work around this by using "reserved" addresses, that a checkbox permits to allocate easily while creating the prefix. That way, every prefix is useable as a pool or not.