Interface detected multiple times

Started by pzandvoort, September 13, 2010, 11:09:34 PM

Previous topic - Next topic

pzandvoort

If I use two switches with HSRP, netxms detects the virtual IP address as a separate interface and moves it from switch to switch when the configuration gets re-polled and the active switch happens to have changed. Is this behavior by design?

When you walk the ifTable, only one interface shows.

Example config:
(switch1)
interface Vlan99
description VL99
ip address 10.0.99.2 255.255.255.0
ip verify unicast source reachable-via any allow-default
no ip redirects
no ip unreachables
load-interval 30
standby 99 ip 10.0.99.1
standby 99 timers 1 3
standby 99 priority 105
standby 99 preempt delay minimum 10
standby 99 authentication 99_1
standby 99 track GigabitEthernet2/1
end


(switch2)
interface Vlan99
description VL99
ip address 10.0.99.3 255.255.255.0
ip verify unicast source reachable-via any allow-default
no ip redirects
no ip unreachables
load-interval 30
standby 99 ip 10.0.99.1
standby 99 timers 1 3
standby 99 priority 100
standby 99 preempt delay minimum 10
standby 99 authentication 99_1
standby 99 track GigabitEthernet2/1
end


When switch1 has the HSRP address, netxms shows:

(switch1)
- VL99 (ifIndex=147,ipaddress=10.0.99.1)
- VL99:0 (ifIndex=147,ipaddress=10.0.99.2)

(switch2)
- VL99 (ifIndex=147,ipaddress=10.0.99.3)

Which 'instance of the interface' gets the :0 depends on who happened to get detected first.
Help?

Thanks!

Peter

Victor Kirhenshtein

Yes, this is by design. NetXMS server read all IP addresses configured on nodes and create interface objects for each address found. For HSRP, you can create cluster object and make your switches members of that cluster - then on cluster object level you can configure virtual IPs. In that case NetXMS will not create interface objects for addresses listed as cluster virtual addresses. It's probably not very convenient for network devices, but is the only workaround right now. We are open for ideas on how to improve that :)

Best regards,
Victor

pzandvoort

The cluster option is actually elegant in the particular case of HSRP, as it models the real world. In general, though, there's not a one-to-one mapping between interfaces and IP addresses. They're two unrelated things where one just might be assigned to the other at different times. As we see in HSRP and other forms of clustering, IP address may not even be assigned to the same device at all times, so let alone to the same interface.

My suggestion would be to only detect real interfaces as interfaces. In SNMP, use ifIndex or name or description as the unique key (preferably selectable which one, since not all devices have persistent ifIndex values across reboots).

This way, you never get duplicate interfaces. Monitoring happens by the primary interface of the device anyway, so you can still get the values. Which leads me to the question: why care about the additional IP addresses at all? The additional address is normally not an integrated part of the device, but more a "service" that happens to be offered by that device at that time. You know?

Victor Kirhenshtein

The current scheme is "for historical reasons". Now I have much better understanding of how it should work, but it's a major change in server's architecture. I completely agree that physical interfaces and IP addresses must be separate entities. I plan to make this change in 1.1.x branch (along with many other required changes).

Best regards,
Victor