opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
136 stars 35 forks source link

Modify Subnet /31 or /32 #127

Open Gankarloo opened 6 years ago

Gankarloo commented 6 years ago

Wont work if there are interfaces in those nets.

Will probably need a similary fix as #84

dmgeurts commented 3 years ago

Just encountered this issue. Was able to create a subnet but when adding a host to the last IP in the range it complains about the broadcast IP address.

I have a similar issue with a /29 ranged assigned to loopback addresses on a firewall. I could record them as /32 addresses but would prefer not to.

mattpascoe commented 3 years ago

I would say that on any subnet larger than a /29 you would not want to be putting any hosts at the broadcast address, thus those rules were put in place. That poor host living on the broadcast address would get a bunch of junk packets hitting it that it would never do anything with. The exception was always /31 and /32 as by definition they do not use the same gateway/broadcast paradigm.

The design here is intended to be that /31 and /32 bypass the last IP address check, but everything else retains it. If there are errors adding/modifying subnets or interfaces with those small masks then that needs to be fixed.

More discussion about the merits of the last IP address limitation are welcome. This is just the design things have currently been following.

dmgeurts commented 3 years ago

Yes I was able to create the /31 host IP address (added an interface to an existing host) but when I want to edit the entry I still get a warning that broadcast hosts can't be used. So I think there's still a few corner scenarios where the block on using the second address in a /31 is not allowed.

As for using a /28 as loopback addresses, they're essentially used as routed /32 addresses, so can be recorded as such. It's just extra work, but rare in use.