Escolar Documentos
Profissional Documentos
Cultura Documentos
Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
Transmission Control Protocol (TCP): RFCs: 793, 1122, 1323, 2018, 2581
Connection-oriented
Flow control
r
Congestion control
r
Chapter 3 outline
3.1 Transport-layer
services
3.5 Connection-oriented
transport: TCP
r r r r
demultiplexing
3.3 Connectionless
3.4 Principles of
3.6 Principles of
Stop-and-wait Protocol
Sender:
if ACK w/ correct ack no. received, set x:=(x+1)mod2, go to i) If ACK w/ incorrect ack no., ignore
Receiver:
if data segment w/ correct seqno received, send ACK w/ ACK=x, set x:=(x+1)mod2, go to i) if data segment w/ incorrect seq no received, discard data segment, and retransmit ACK.
5
stop-and-wait operation
sender first packet bit transmitted, t = 0 last packet bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK receiver
RTT
sender
L/R RTT + L / R
30.008
= 0.00027
microsec onds
9
Ttransmit =
rU sender
U
r r1000
L/R RTT + L / R
.008
30.008
= 0.00027
microsec onds
byte pkt every 30 msec -> 33kB/sec throuput over 1 Gbps link
10
Pipelined protocols
11
RTT
Pipelined Protocols
Two generic forms of pipelined protocols:
r r
13
Sender:
r r r r
Packets transmitted continually (when available) without waiting for ACK, up to N outstanding, unACKed packets A timer is started when a packet is sent On getting an ACK(n), stops the timer for packet n, sends additional packets if possible timeout(n): retransmit pkt n and all higher seq # pkts in window, restart the timer if there are unacked pkts
Receiver:
r
Out-of-order/Corrupted Packets:
send cummulative ACK(n) acknowledging receipt of all packets up to and including n pass packet to to higher layer,
14
GBN in action
N=4
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9
15
GBN
Advantages? Disadvantages?
16
Unlike Go-Back-N
r r r r r r
Receiver: buffer out-of-order pkts Out-of-order (but otherwise correct) is ACKed no cumulative ACKs, ACK(n) means packet n has been received Sender: on timeout of packet k, retransmit just pkt k Uses a separate timer for each transmitted packet
Comments
r
17
Selective repeat
if next available seq # in window, send pkt, start timer resend pkt n, restart timer mark pkt n as received if n is the smallest unACKed pkt, advance window base to next unACKed seq #
timeout(n):
r
ACK(n) in [sendbase,sendbase+N-1]:
r r
18
Selective Repeat
Receiver:
r r r
pkt n in [rcvbase-N,rcvbase-1]
r
otherwise:
r
19
Example:
in two scenarios!
incorrectly passes duplicate
21