Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neighbor cache does not prioritize active connections, causing glitches in noisy networks #965

Closed
korken89 opened this issue Aug 2, 2024 · 0 comments

Comments

@korken89
Copy link
Contributor

korken89 commented Aug 2, 2024

Hi, we discussed this in the matrix chat and here is a concise description of the issue.

The neighbor cache does not prioritize active connections, so when on a noisy network the active connection will stop sending/receiving sometimes.
I'm testing on a "noisy" network and the connection gets glitches of 1 second every time the active connection's IP is evicted from the cache and needs to do an ARP.

I propose that active connections (on a successful RX) to have their expiry time reset on every successful packet, so they are not evicted from the cache.
My reasoning is that since the connection is functioning and we are getting packet with the correct IP/MAC combo there is no need to do ARPs.

@thvdveld agreed on my analysis in the chat and recommended to look at how Linux solves this.

Here is a log of the issue:

>>> 192.168.0.200:8321 is the active connection
 
6.202500 TRACE udp:None:8321:192.168.0.200:8321: buffer to send 105 octets
 
6.202600 TRACE udp:None:8321:192.168.0.200:8321: sending 105 octets
 
6.812600 TRACE filled 192.168.0.220 => Ethernet(Address([168, 161, 89, 187, 232, 27])) (evicted 192.168.0.200 => Ethernet(Address([168, 161, 89, 187, 234, 35])))
 
7.079800 TRACE udp:None:8321:192.168.0.200:8321: receiving 31 octets
 
7.079900 TRACE udp:None:8321:192.168.0.200:8321: receive 31 buffered octets
 
7.090700 TRACE udp:None:8321:192.168.0.200:8321: buffer to send 31 octets
 
7.090800 TRACE udp:None:8321:192.168.0.200:8321: sending 31 octets
 
7.090900 DEBUG address 192.168.0.200 not in neighbor cache, sending ARP request
 
7.090900 TRACE SocketHandle(2): neighbor 192.168.0.200 missing, silencing until t+1.000s
 
7.091100 TRACE filled 192.168.0.200 => Ethernet(Address([168, 161, 89, 187, 234, 35])) (evicted 192.168.0.2 => Ethernet(Address([176, 12, 209, 103, 233, 8])))
 
7.091200 TRACE SocketHandle(2): neighbor 192.168.0.200 discovered, unsilencing
 
7.091200 TRACE udp:None:8321:192.168.0.200:8321: sending 31 octets
 
7.202600 TRACE udp:None:8321:192.168.0.200:8321: buffer to send 105 octets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant