netbox-sync icon indicating copy to clipboard operation
netbox-sync copied to clipboard

Faux-duplicate IPs (anycast or across VLANs)

Open Azmodeszer opened this issue 2 years ago • 13 comments

I'm running into a primary IP assignment warning:

WARNING: Current interface 'vNIC 1 (Office) (<SERVER1>)' for IP '1.2.3.4/21' and this one 'vNIC 1 (Virtual LAB) (<SERVER2>)' are both enabled. IP assignment skipped because it is unclear which one is the correct one!

Okay, fair enough, but the thing here is that that's two different VLANs, one used to simulate the other and exactly map it. So the IPs being the same is as it should be. The sync already imports the VLANs for each device's interface correctly, so is there a way to tell it to ignore the warning and set the IPs if the VLANs differ?

Azmodeszer avatar Sep 01 '23 10:09 Azmodeszer

Related to this, I'm also getting a lot of similar warnings where the IP in question has the anycast role (so again, assignment to both NICs makes sense). Is there a way around this in the settings.ini file? Netbox itself drops the duplicate IP warning if it detects the anycast role, wondering if the plugin has something analogous.

Azmodeszer avatar Dec 12 '23 13:12 Azmodeszer

Hi,

does your use case apply to AnyCast IP addresses only or are there other types of IP addresses where this also causes issues?

bb-Ricardo avatar Dec 13 '23 20:12 bb-Ricardo

Well, anycast and a few select cases with the VLANs from the opening post. I can live with the latter, since it's no doubt a very uncommon setup, but anycast IPs by their very nature shouldn't trigger the warning, no?

As far as I can see, all other cases are legitimate duplicate IPs that the plugin is right to warn about (our Netbox db still needs some major cleanup).

Azmodeszer avatar Dec 14 '23 09:12 Azmodeszer

For anycast it should definitely be possible. Will need to add a check if IP is defined as an anycast address. Gonna have a look into it.

bb-Ricardo avatar Dec 14 '23 16:12 bb-Ricardo

I'd very much appreciate it. Thank you!

Azmodeszer avatar Dec 14 '23 16:12 Azmodeszer

Any progress on this? :)

Azmodeszer avatar Jan 22 '24 10:01 Azmodeszer