Unable to bulk add DHCP ranges v1.9.6 #883

Closed
opened 2025-12-29 16:26:42 +01:00 by adam · 5 comments
Owner

Originally created by @jpatmore on GitHub (Apr 25, 2017).

Issue type:

**Python version:2.7.12
**NetBox version:1.9.6 (running from Docker Installation : b262543ee421 (v1.9.6))

When trying to add an IP range in to a prefix, setting status to 'DHCP' i'm getting an exception error;

bulk ip add error

Adding them as individual addresses works fine - only get an error with a range e.g 10.189.47.[72-109]/24

#Edit : this doesnt just seem to affect type DHCP, I no longer seem to be able to add ranges of any type

Originally created by @jpatmore on GitHub (Apr 25, 2017). <!-- Please note: GitHub issues are to be used only for feature requests and bug reports. For installation assistance or general discussion, please join us on the mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please indicate "bug report" or "feature request" below. Be sure to search the existing set of issues (both open and closed) to see if a similar issue has already been raised. --> ### Issue type: <!-- If filing a bug, please indicate the version of Python and NetBox you are running. (This is not necessary for feature requests.) --> **Python version:2.7.12 **NetBox version:1.9.6 (running from Docker Installation : b262543ee421 (v1.9.6)) <!-- If filing a bug, please record the exact steps taken to reproduce the bug and any errors messages that are generated. If filing a feature request, please precisely describe the data model or workflow you would like to see implemented, and provide a use case. --> When trying to add an IP range in to a prefix, setting status to 'DHCP' i'm getting an exception error; ![bulk ip add error](https://cloud.githubusercontent.com/assets/16726263/25389159/db21e05e-299d-11e7-9eb8-b6d4be8f2db3.jpg) Adding them as individual addresses works fine - only get an error with a range e.g 10.189.47.[72-109]/24 #Edit : this doesnt just seem to affect type DHCP, I no longer seem to be able to add ranges of any type
adam added the type: bug label 2025-12-29 16:26:42 +01:00
adam closed this issue 2025-12-29 16:26:42 +01:00
Author
Owner

@zevlag commented on GitHub (Apr 26, 2017):

Also affecting v2.0.0-dev

@zevlag commented on GitHub (Apr 26, 2017): Also affecting v2.0.0-dev
Author
Owner

@jeremystretch commented on GitHub (Apr 26, 2017):

This is happening because you're attempting to create duplicate IP addresses. We just need to fix handling of the validation error.

@jeremystretch commented on GitHub (Apr 26, 2017): This is happening because you're attempting to create duplicate IP addresses. We just need to fix handling of the validation error.
Author
Owner

@jpatmore commented on GitHub (Apr 26, 2017):

Apologies, not sure i follow? (I want to make sure Im not doing something
incorrectly). All I'm trying to do is bulk assign a range of IPs withing a
prefix to a role (in this case to mark them as part of a DHCP pool), or to
add the same description across multiple IPs in a prefix (ie, 'in use as
part of DHCP pool'). I was able to do this previous to the upgrade, but
now I receive the exception error.

The method I'm following is : select a prefix->select IP Addresses
tab->select '+Add an IP Address'->select bulk->Add criteria via a range

...and I receive the exception error?

On 26 April 2017 at 13:01, Jeremy Stretch notifications@github.com wrote:

This is happening because you're attempting to create duplicate IP
addresses. We just need to fix handling of the validation error.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/digitalocean/netbox/issues/1103#issuecomment-297476119,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AP8498owb2DinTjlY_Z-m6bTg9NbVN_Xks5rz3hSgaJpZM4NHh4x
.

@jpatmore commented on GitHub (Apr 26, 2017): Apologies, not sure i follow? (I want to make sure Im not doing something incorrectly). All I'm trying to do is bulk assign a range of IPs withing a prefix to a role (in this case to mark them as part of a DHCP pool), or to add the same description across multiple IPs in a prefix (ie, 'in use as part of DHCP pool'). I was able to do this previous to the upgrade, but now I receive the exception error. The method I'm following is : select a prefix->select IP Addresses tab->select '+Add an IP Address'->select bulk->Add criteria via a range ...and I receive the exception error? On 26 April 2017 at 13:01, Jeremy Stretch <notifications@github.com> wrote: > This is happening because you're attempting to create duplicate IP > addresses. We just need to fix handling of the validation error. > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/digitalocean/netbox/issues/1103#issuecomment-297476119>, > or mute the thread > <https://github.com/notifications/unsubscribe-auth/AP8498owb2DinTjlY_Z-m6bTg9NbVN_Xks5rz3hSgaJpZM4NHh4x> > . >
Author
Owner

@jeremystretch commented on GitHub (Apr 26, 2017):

You can add a range of new IP addresses without issue. The error arises when one or more IP addresses that you try to add are duplicates of existing IPs (and uniqueness is enforced). The bulk creation fails because of the duplicate IPs, but the validation failure wasn't being handled properly.

For example, you can create the range 192.0.2.[1-3]/24. But if you then try to create 192.0.2.[3-5]/24, it will fail, because 192.0.2.3 already exists.

@jeremystretch commented on GitHub (Apr 26, 2017): You can add a range of new IP addresses without issue. The error arises when one or more IP addresses that you try to add are duplicates of existing IPs (and uniqueness is enforced). The bulk creation fails because of the duplicate IPs, but the validation failure wasn't being handled properly. For example, you can create the range `192.0.2.[1-3]/24`. But if you then try to create `192.0.2.[3-5]/24`, it will fail, because 192.0.2.3 already exists.
Author
Owner

@jpatmore commented on GitHub (Apr 26, 2017):

right, but I'm not trying to create a range that includes an IP that already exists? In my example, I'm trying to add the range 10.189.47.[72-109]/24, but as per the screenshot below, these addresses have not yet been allocated?

unique ip range validation

..but I get the validation error. This happens regardless of which subnet I try to do the bulk update to, and whether any IPs have been allocated in there already. I'm thinking this must be an error in how I have set up/allocated the ranges, as no-one else seems to be reporting having this issue...

@jpatmore commented on GitHub (Apr 26, 2017): right, but I'm not trying to create a range that includes an IP that already exists? In my example, I'm trying to add the range 10.189.47.[72-109]/24, but as per the screenshot below, these addresses have not yet been allocated? ![unique ip range validation](https://cloud.githubusercontent.com/assets/16726263/25450215/285a4c50-2a8c-11e7-9171-a8a53fa19147.jpg) ..but I get the validation error. This happens regardless of which subnet I try to do the bulk update to, and whether any IPs have been allocated in there already. I'm thinking this must be an error in how I have set up/allocated the ranges, as no-one else seems to be reporting having this issue...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#883