neocturne / fastd

Fast and Secure Tunnelling Daemon
Other
115 stars 16 forks source link

Question: What does `dropping duplicate packet from` mean? #38

Closed marek22k closed 5 months ago

marek22k commented 5 months ago

Hello,

I have established a peering with someone via a fastd. Since babel is used as a routing protocol, quite a lot of data is pumped through the tunnel even when traffic is inactive. The latency is about 206ms. The following message now appears frequently on the other side: dropping duplicate packet from <stricker.mk16.de> (age 0) (stricker.mk16.de is my endpoint, the other side has no public endpoint, has a dynamic IP address and is behind NAT) No log messages appears on my side. A dump of the traffic (from the other side's perspective): dump.zip (GitHub doesn't allow uploading .pcap-files)

My question now is whether this has anything to do with fastd? Does fastd resend a packet that is the same (e.g. if the response is too slow)? Is it clear that this is not due to fastd?

I hope it's okay to ask here.

neocturne commented 5 months ago

fastd doesn't resend any packets; duplicate packets are determined by their sequence number (which is assigned by fastd). So you seeing these messages means that something between your peers is duplicating fastd's UDP packets.

marek22k commented 5 months ago

Thanks for the answer! What does age 0 mean?

neocturne commented 5 months ago

Thanks for the answer! What does age 0 mean?

"age 0" means that the duplicate packet had the same sequence number as the latest valid received packet. When packets are both reordered and duplicated, a packet with an older sequence number can be received, which will show a higher age value.

fastd will accept reordered packets as long as the age (the difference between the highest seqno and the seqno of a packet received out-of-order) is at most 64 (64 is used so duplicate packets can be detected by storing a 64-bit wide bitfield of seen seqnos).

No sequence numbers exist in the null and null@lt2p methods, so for these methods, duplicate packets are not filtered out.