Old-duplicate data packets in TFTP protocol
I found this question in Book called An Introduction to Computer Networks by Peter L Dordal, and I met with this question which I found it a little bit tricky:
In the TFTP protocol:
If the client changes its port number on a subsequent connection, but the server does not, what prevents an old-duplicate data packet sent by the server from being accepted by the new client?
If the server changes its port number on a subsequent connection, but the client does not, what prevents an old-duplicate data packet sent by the server from being accepted by the new client?作者: user8241522 的来源 发布者： 2017 年 12 月 27 日
TFTP shouldn't be used when the connection is not near-perfect (=local, few hops). UDP isn't reliable by itself and TFTP doesn't do enough to improve on that very much.
However, the example is somewhat hypothetical. Both client and server are likely to use ephemeral ports chosen by the OS. The time window for the duplicate packet to match is very small - the queue flush time of a router in between - and the ephemeral port numbers would need to wrap around on both sides simultaneously.
That said, TFTP should only be used on short connections where security doesn't matter - if at all. There are more modern alternatives for reliable and secure file transfer.作者: Zac67 发布者: 2017 年 12 月 27 日