netbox icon indicating copy to clipboard operation
netbox copied to clipboard

Warning popup when adding IP to interface that is duplicate

Open dionrowney opened this issue 2 years ago • 5 comments

NetBox version

v3.6.6

Feature type

Change to existing functionality

Proposed functionality

When adding an IP to an interface via the interface screen, when the confirmation popup says added, a warning popup should also be also shown if the IP added is a duplicate.

Use case

When adding IP addresses to interfaces via the interface screen, users cannot tell they have added a duplicate IP unless they click on and inspect the IP record afterwards. This would further reduce the case of human error when entering IP addresses.

We suggest this method as we experienced this on a isolated switch that was not part any VRF (was in global) which could have prevented the duplicate IP entry via the unique IP setting.

Database changes

none

External dependencies

none

dionrowney avatar Dec 12 '23 17:12 dionrowney

We suggest this method as we experienced this on a isolated switch that was not part any VRF (was in global) which could have prevented the duplicate IP entry via the unique IP setting.

Note that you can reject such duplicates entirely by setting ENFORCE_GLOBAL_UNIQUE=True - which can also be set in the web UI via Admin > Config Revisions.

TBH, this surprises a lot of people, and maybe it would make more sense to make it default to True these days. There were common cases which required duplicate addresses in the past which are no longer necessary if you use FHRP groups.

candlerb avatar Dec 12 '23 17:12 candlerb

I was aware of the ENFORCE_GLOBAL_UNIQUE = True

I spoke to our network team and they were not excited about creating fake VRFs for these isolated switches as it didnt represent reality but this does seem to be the only way to allow the same IP range to be used in multiple places and still enforce duplicate addresses prevention.

dionrowney avatar Dec 13 '23 21:12 dionrowney

It does seem like the default should be --> ENFORCE_GLOBAL_UNIQUE = True

bitcollector1 avatar Dec 14 '23 16:12 bitcollector1

When adding an IP to an interface via the interface screen, when the confirmation popup says added, a warning popup should also be also shown if the IP added is a duplicate.

We generally avoid this sort of "warn but permit" workflow: It's inconsistent and doesn't really achieve anything. (We also don't have any existing patterns for effecting a pop-up, so that would be new UI work.)

I spoke to our network team and they were not excited about creating fake VRFs for these isolated switches as it didnt represent reality

They may not exist as explicit VRFs in your network, but it certainly sounds like you have multiple L3 forwarding domains. These are modeled using VRFs in NetBox. (Note that the designation of a route distinguisher is optional; these can just be named tables.)

It does seem like the default should be --> ENFORCE_GLOBAL_UNIQUE = True

I've opened #14536 to track this proposal. Please give it a :+1: response to show your support.

jeremystretch avatar Dec 15 '23 13:12 jeremystretch

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] avatar Mar 15 '24 04:03 github-actions[bot]

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

github-actions[bot] avatar May 15 '24 12:05 github-actions[bot]