[四川大学]计算机网络通信3-3

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
cumulative ACK
Q: how receiver handles outof-order segments
A: TCP spec doesn’t say, - up to implementor
Host A
User types ‘C’
host ACKs receipt of echoed ‘C’
bi-directional data flow in
reliablaep,pilinca-otiornder byte socket streamw:rites data
door no “message boundaries”
same connection MSS: maarxepiampdluiscmadtaiosteangment
3: Transport Layer 3b-2
TCP seq. #’s and ACKs
Seq. #’s:
byte stream “number” of first byte in segment’s data
ACKs:
seq # of next byte expected from other side
x*|SampleRTT-EstimatedRTT|
3: Transport Layer 3b-5
Setting the timeout
EstimtedRTT plus “safety margin”(安全空白) large variation in EstimatedRTT -> larger safety margin
Timeout = EstimatedRTT + 4*Deviation Deviation (偏差) = (1-x)*Deviation +
sequence number
acknowledgement number
head len
not used
UAP R S F
rcvr window size
checksum
ptr urgent data
RST, SYN, FIN: Connection establishment
(setup, teardown commands)
SampleRTT(RTT采样): measured time from segment transmission until ACK receipt
ignore retransmissions, cumulatively ACKed segments
SampleRTT will vary, want estimated RTT “smoother”
size
socket door
TCP
pipelisneendd :buffer
connection-orTiCenPted:
handsharkeicnegiv(eexbucfhfearnge of
TCP congestion and flow segment
control msgs) init’s sender,
Internet checksum (as in UDP)
Options (variable length)
application data
(variable length)
counting by bytes of data (not segments!)
# bytes rcvr willing to accept
longer than RTT note: RTT will vary
too short: premature timeout unnecessary retransmissions
too long: slow reaction to segment loss
Q: how to estimate RTT?
3.5 Connection-Oriented Transport :TCP
Overview RFCs: 793, 1122, 1323, 2018, 2581
3.5.1 The TCP Connection
point-to-point:
full duplex data:
one sender, one receiver
Host B
host ACKs receipt of ‘来自百度文库’, echoes back ‘C’
time simple telnet scenario
3: Transport Layer 3b-3
3.5.3 TCP Round Trip Time and Timeout (往返计时和超时)
Q: how to set TCP timeout value?
3.5.2 TCP segment structure
URG: urgent data (generally not used)
ACK: ACK # valid
PSH: push data now (generally not used)
32 bits
source port #
dest port #
use several recent measurements, not just current SampleRTT
3: Transport Layer 3b-4
TCP Round Trip Time and Timeout
EstimatedRTT = (1-x)*EstimatedRTT + x*SampleRTT Exponential weighted moving average influence of given sample decreases exponentially fast typical value of x: 0.125
control set window size
receiver state before data
send & receive buffers
exchange
flow controlled:
sender will not overwhelm receiver
3: Transport Layer 3b-1
相关文档
最新文档