-
I've got a couple of questions about the ARP cache in QNEthernet. As far as I can tell, it has one, since if I send a UDP packet to the same host twice within a few seconds, it only does one ARP query for that host. However, I'm curious about how long entries stay in the cache, and whether it would be possible to extend their lifespan. As of right now, in the code running on the Teensy 4.1 I have, I poll certain hosts via a UDP exchange once every five minutes. Leaving WireShark running with a suitable capture filter, I can see the ARP queries made by the Teensy for one of those hosts,. and there is an ARP query every five minutes. The implication of this is that the ARP cache has a very short lifespan. In my case, it would make a lot of sense to extend it, easily to an hour or longer. All of the hosts on the network I communicate with have their addresses reserved in the router's DHCP server, so they're not going to change. Thus there's no risk of using a long cache life. Am I correct in thinking that the cache life is currently quite short, and would it be possible for me to change it locally to make it longer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Closing this. I should have looked at the source first. ARP_MAXAGE is what I care about, and I also need to increase ARP_TABLE_SIZE, most likely to 32. This is because there are closer to sixteen devices that I communicate with on a regular basis, and thus there is currently a risk of entries getting flushed to make space. 32 is a safe value, I saw the comment at line 128 of etharp.c about keeping ARP_TABLE_SIZE below NETIF_ADDR_IDX_MAX |
Beta Was this translation helpful? Give feedback.
Closing this. I should have looked at the source first.
ARP_MAXAGE is what I care about, and I also need to increase ARP_TABLE_SIZE, most likely to 32. This is because there are closer to sixteen devices that I communicate with on a regular basis, and thus there is currently a risk of entries getting flushed to make space.
32 is a safe value, I saw the comment at line 128 of etharp.c about keeping ARP_TABLE_SIZE below NETIF_ADDR_IDX_MAX