30
« on: July 26, 2023, 11:30:18 AM »
Hi Ray
In fnHandleARP_response()
you could try removing the registration of received ARP requests that were not destined to your IP address as follows, which may help reduce the ARP entries that you are not interested in.
else { // it was not an ARP to our IP address but we can still add it to our table or refresh the entry
#if !defined ARP_IGNORE_FOREIGN_ENTRIES
if (uMemcmp(ucRequestingIP, cucBroadcast, IPV4_LENGTH) != 0) { // ignore broadcasts
fnAddARP(ucRequestingIP, ucRequestingMAC, &arp_details); // {14}
}
#endif
#if defined USE_IP_STATS
fnIncrementEthernetStats(SEEN_FOREIGN_ARP_FRAMES, _NETWORK_ID); // update statistics for foreign addresses
#endif
}
ARP entries will probably not be an issue though.
Looking at the wireshark recording I see that the traps are initially sent to 172.22.1.94
15mins later I see that there are ARPs being sent out to resolve the address 172.22.0.1, which are not answered. These maybe due to the traps that you are trying to send but may be due to other causes.
In any case you need to find out why the ARP (assuming associated with the trap after a certain time) is presumably being sent to a different address, potentially on a different sub-net, since this is possibly the issue.
Since you are working with the simulator this should be quite easy to do:
- set a break point in the ARP transmission when it starts to see how the destination address is being defined.
- let it run until the problem starts
- enable the break point again to see what is causing the ARP to be sent (possibly the trap want to send data) and compare how the destination address is being defined. I expect you'll find a difference that will explain why it stops working after a certain time.
- Traps can be sent form anywhere and don't need to be called in the SNMP task.
Regards
Mark