IP addresses with overlapping prefixes permitted #3776

Closed
opened 2025-12-29 18:31:10 +01:00 by adam · 1 comment
Owner

Originally created by @cmacnevin on GitHub (Jun 12, 2020).

Environment

  • Python version: 3.7.4
  • NetBox version: 2.8.5

Steps to Reproduce - all steps are in the UI

  1. Create a prefix, eg 10.0.0.0/8
  2. Create an ip address within that prefix with an arbitrary netmask, eg: 10.0.1.10/24.
  3. Create a second ip address with a netmask which creates an overlapping prefix range, eg: 10.0.1.11/25

Expected Behavior

Expect the second IP address to be rejected. This is not a valid entry in the real world, as it creates overlapping prefixes. Expect logic to anchor ip addresses to prefixes, similar to other IPAMs like Infoblox.

Observed Behavior

Both ip addresses are accepted. Conflict present in the data.

Originally created by @cmacnevin on GitHub (Jun 12, 2020). ### Environment * Python version: 3.7.4 * NetBox version: 2.8.5 ### Steps to Reproduce - all steps are in the UI 1. Create a prefix, eg 10.0.0.0/8 2. Create an ip address within that prefix with an arbitrary netmask, eg: 10.0.1.10/24. 3. Create a second ip address with a netmask which creates an overlapping prefix range, eg: 10.0.1.11/25 ### Expected Behavior Expect the second IP address to be rejected. This is not a valid entry in the real world, as it creates overlapping prefixes. Expect logic to anchor ip addresses to prefixes, similar to other IPAMs like Infoblox. ### Observed Behavior Both ip addresses are accepted. Conflict present in the data.
adam closed this issue 2025-12-29 18:31:10 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 12, 2020):

NetBox does not have the necessary contextual information in this case to validate either address: You cannot assume either mask is correct. Thus, NetBox does not treat either as incorrect. Additionally, support for overlapping IP addresses within a table (VRF) would prevent enforcement of such validation even if the required context was present.

@jeremystretch commented on GitHub (Jun 12, 2020): NetBox does not have the necessary contextual information in this case to validate either address: You cannot assume either mask is correct. Thus, NetBox does not treat either as incorrect. Additionally, support for overlapping IP addresses within a table (VRF) would prevent enforcement of such validation even if the required context was present.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3776