netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.2k stars 2.59k forks source link

IPv6: We should be able to use network ID as host IP address #15936

Closed xr18b closed 6 months ago

xr18b commented 6 months ago

Deployment Type

Self-hosted

NetBox Version

v3.7.4

Python Version

3.10

Steps to Reproduce

When trying to add a new host IPv6 address, it fails if it equals to the network ID with following message:

{ip} is a network ID, which may not be assigned to an interface.

Expected Behavior

Assigning to a host an IPv6 address which is equal to the network ID is allowed in IPv6. And actually not completely forbidden in IPv4, as we can also route some IPv4 ranges to be used as virtual IPs, and are technically able to use all the addresses, from the network ID to the broadcast (included). But presently, we are not able to document this in Netbox.

Observed Behavior

We are not able to add an IPv6 address that is equal to the network ID

PieterL75 commented 6 months ago

This has come up before.. https://github.com/netbox-community/netbox/issues/12687

jeremystretch commented 6 months ago

Assignment of the network ID is not permitted because it is defined in RFC 4291 as the router anycast address for the prefix. The validation is working as intended.

If you would like to propose removing the validation, please submit a feature request citing your justification for review.