- 论坛徽章:
- 0
|
原帖由 platinum 于 2008-10-30 17:25 发表
大体明白了!
如果 seq 变了,那么 win 是不是也要跟着变呢?这个计算起来岂不是更复杂?
我目前没仔细想,给你引用一段吧
The TCP Window field advertises how many bytes of data the remote peer is
allowed to send before a new advertisement is made. Theoretically, the
maximum transfer rate that can be achieved by TCP is limited to:
Maximum Transfer Rate = Window / RTT
This means that, under ideal network conditions (e.g., no packet loss), the
Window in use should be at least:
Window = 2 * Bandwidth * Delay
Using a larger Window than that resulting from the previous equation will not
provide any improvements in terms of performance.
In practice, selection of the most convenient Window size may also depend on
number of other parameters, such as: packet loss rate, loss recovery mechanisms in
use, etc.
An aspect of the TCP Window that is usually overlooked is the security
implications of its size. Increasing the TCP window increases the sequence
number space of the sequence numbers that will be considered “valid”. Thus, use
of unnecessarily large TCP Window sizes increases TCP’s vulnerability to
spoofing attacks unnecessarily.
In those scenarios in which the network conditions are known and/or can be easily
predicted, it is recommended that the TCP Window is never set to a value larger
than that resulting from the equations above. Additionally, the nature of the
application running over TCP should be considered when tuning the TCP
window. As an example, an H.245 signaling application certainly does not have
high requirements on throughput, and thus a window size of around 4 KBytes will
usually fulfill its needs, while keeping TCP’s resistance to off-path spoofing
attacks at a decent level. Some rough measurements seem to indicate that a TCP
window of 4Kbytes is common practice for the TCP connections of routers
servicing applications such as BGP.
In principle, a possible approach to avoid having administrators manually set the
TCP window would be to implement an automatic buffer tuning mechanism, such
as that described in [Heffner, 2002]. However, as discussed in Section 8.2.2 of
this document these mechanisms can be exploited to perform other types of
attacks.
理论上说,window不需要改
不过还有更严格的环境,不允许window滑动,必须精确吻合的,那就麻烦了
建议你先别顾虑这么多,试试之前讨论的吧。 |
|