Skip to content

Allow duplicate DNS records if IPs have the anycast role #893

Description

@fcavro

Is your feature request related to a problem? Please describe.

When unique DNS records are enforced, it is not possible to assign the same DNS name to multiple anycast IP addresses within the same VRF.

I use multiple instances of the same anycast IP address, each assigned to an interface on a different device or VM. I would still like to use a managed DNS record for the shared IP address.

Currently, assigning the same DNS name to multiple anycast IP addresses results in a uniqueness validation error, even though all IP addresses represent the same logical anycast endpoint and should result in only a single A/AAAA record.

Describe the solution you'd like

The uniqueness check for managed DNS records should take the role of the current IP address and any existing matching IP addresses into account.

Multiple IP addresses with the Anycast role, the same address, and the same DNS name should be allowed and should result in a single managed A/AAAA record.

Describe alternatives you've considered

One possible workaround is to set the DNS name on only one of the anycast IP addresses.

Another option is to use the ipaddress_dns_disabled custom field on all but one of the IP addresses.

However, both approaches make the managed DNS record dependent on a specific IP object. Removing or disabling that IP would cause the managed DNS record to disappear.

Additional context

NetBox itself allows duplicate IP addresses for several special roles: Anycast, VIP, VRRP, HSRP, GLBP and CARP (https://github.com/netbox-community/netbox/blob/main/netbox/ipam/constants.py#L39).

Maybe it makes sense to apply the same uniqueness behavior to managed DNS records for these roles as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions