Prevent duplicate IPs unless they have 'Anycast' role. #7172

Closed
opened 2025-12-29 20:20:08 +01:00 by adam · 2 comments
Owner

Originally created by @mkurjanski on GitHub (Oct 27, 2022).

NetBox version

v3.3.5

Feature type

New functionality

Proposed functionality

The ENFORCE_GLOBAL_UNIQUE flag turned to True blocks any duplicate Prefixes and IPs within the same VRF.
The caveat of ENFORCE_GLOBAL_UNIQUE is it also blocks any duplicate IPs even if they have the 'Anycast' role set.

It would be great to be able to have a setting that blocks duplicate IPs unless they're of the 'Anycast' role.
This could be achieved by modifying the behaviour of ENFORCE_GLOBAL_UNIQUE or adding a new configuration flag.

Use case

Netbox would prevent duplicate prefixes and IP addresses in most cases but allowing duplicate IPs in the 'anycast' scenario.

Database changes

No response

External dependencies

No response

Originally created by @mkurjanski on GitHub (Oct 27, 2022). ### NetBox version v3.3.5 ### Feature type New functionality ### Proposed functionality The ENFORCE_GLOBAL_UNIQUE flag turned to True blocks any duplicate Prefixes and IPs within the same VRF. The caveat of ENFORCE_GLOBAL_UNIQUE is it also blocks any duplicate IPs even if they have the 'Anycast' role set. It would be great to be able to have a setting that blocks duplicate IPs unless they're of the 'Anycast' role. This could be achieved by modifying the behaviour of ENFORCE_GLOBAL_UNIQUE or adding a new configuration flag. ### Use case Netbox would prevent duplicate prefixes and IP addresses in most cases but allowing duplicate IPs in the 'anycast' scenario. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 20:20:08 +01:00
adam closed this issue 2025-12-29 20:20:08 +01:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 27, 2022):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Dec 27, 2022): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Jan 5, 2023):

The caveat of ENFORCE_GLOBAL_UNIQUE is it also blocks any duplicate IPs even if they have the 'Anycast' role set.

IP addresses with a role of anycast are already excluded from the enforcement of ENFORCE_GLOBAL_UNIQUE. You can verify this by setting ENFORCE_GLOBAL_UNIQUE = True in configuration.py and creating multiple IPs with the same address and a role of anycast in the global table.

@jeremystretch commented on GitHub (Jan 5, 2023): > The caveat of ENFORCE_GLOBAL_UNIQUE is it also blocks any duplicate IPs even if they have the 'Anycast' role set. IP addresses with a role of anycast are already excluded from the enforcement of `ENFORCE_GLOBAL_UNIQUE`. You can verify this by setting `ENFORCE_GLOBAL_UNIQUE = True` in `configuration.py` and creating multiple IPs with the same address and a role of anycast in the global table.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7172