Bab 3 Transport Layer: Computer Networking: A Top Down Approach
Bab 3 Transport Layer: Computer Networking: A Top Down Approach
Bab 3 Transport Layer: Computer Networking: A Top Down Approach
Transport Layer
Computer
They obviously represent a lot of work on our part. In return for use, we only
ask the following:
If you use these slides (e.g., in a class) that you mention their source
(after all, we’d like people to use our book!)
Networking: A Top
If you post any slides on a www site, that you note that they are adapted
from (or perhaps identical to) our slides, and note our copyright of this
Down Approach
material.
7th edition
Thanks and enjoy! JFK/KWR
Jim Kurose, Keith Ross
All material copyright 1996-2016 Pearson/Addison Wesley
J.F Kurose and K.W. Ross, All Rights Reserved April 2016
Transport Layer 2-1
Pokok Bahasan Bab 3.2
3.1 layanan-layanan 3.5 connection-oriented
transport-layer transport: TCP
3.2 multiplexing dan • struktur segment
demultiplexing • reliable data transfer
3.3 connectionless • flow control
transport: UDP • manajemen connection
3.4 prinsip-prinsip 3.6 prinsip-prinsip
reliable data transfer congestion control
3.7 TCP congestion control
karakteristik unreliable channel akan menentukan kompleksitas protokol reliable data transfer (rdt)
karakteristik unreliable channel akan menentukan kompleksitas protokol reliable data transfer (rdt)
karakteristik unreliable channel akan menentukan kompleksitas protokol reliable data transfer (rdt)
sisi sisi
pengirim penerima
udt_send(packet)
sender receiver
Transport Layer 3-8
rdt2.0: channel dengan bit error
channel yang mendasari bisa menyebabkan flipped bits
pada packet
• checksum digunakan untuk mendeteksi bit error
pertanyaannya: bagaimana mengatasi error
• acknowledgements (ACKs): penerima secara eksplisit memberi
tahu pengirim bahwa packet diterima dengan baik
• negative acknowledgements (NAKs): penerima secara eksplisit
memberi tahu pengirim bahwa packet mengalami error
• pengirim mengirimkan ulang packet setelah menerima NAK
Bagaimana
mekanisme baru padamanusia mengatasi“error
rdt2.0 (dibandingkan dengan”
rdt1.0): selama percakapan berlangsung?
• pendeteksian error
• umpan balik dari penerima ke pengirim: control messages
(ACK, NAK)
rdt_rcv(rcvpkt) &&
Wait for
isNAK(rcvpkt)
Wait for call rdt_rcv(rcvpkt) &&
corrupt(rcvpkt)
from above ACK or NAK
udt_send(sndpkt)
udt_send(NAK)
pengirim
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
rdt_rcv(rcvpkt) &&
Wait for
isNAK(rcvpkt)
Wait for call rdt_rcv(rcvpkt) &&
corrupt(rcvpkt)
from above ACK or NAK
udt_send(sndpkt)
udt_send(NAK)
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
rdt_rcv(rcvpkt) &&
Wait for
isNAK(rcvpkt)
Wait for call rdt_rcv(rcvpkt) &&
corrupt(rcvpkt)
from above ACK or NAK
udt_send(sndpkt)
udt_send(NAK)
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
Wait for ACK Wait for
or NAK 1 call 1 from
rdt_rcv(rcvpkt) && above
( corrupt(rcvpkt) ||
isNAK(rcvpkt) )
rdt_send(data)
sndpkt = make_pkt(1, data, checksum)
udt_send(sndpkt) udt_send(sndpkt)
extract(rcvpkt,data)
deliver_data(data)
sndpkt = make_pkt(ACK, chksum)
udt_send(sndpkt)
rdt_rcv(rcvpkt) &&
(corrupt(rcvpkt) ||
has_seq1(rcvpkt))
Wait for
0 from receiver FSM
udt_send(sndpkt)
below
fragment
rdt_rcv(rcvpkt) && notcorrupt(rcvpkt)
&& has_seq1(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
sndpkt = make_pkt(ACK1, chksum)
udt_send(sndpkt)
L 8000 bits
Dtrans = R = = 8 microsecs
109 bits/sec
U L/R .008
sender = = = 0.00027
RTT + L / R 30.008
base=1
nextseqnum=1
timeout
start_timer
Wait
udt_send(sndpkt[base])
udt_send(sndpkt[base+1])
…
rdt_rcv(rcvpkt) udt_send(sndpkt[nextseqnum-1])
&& corrupt(rcvpkt)
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
base = getacknum(rcvpkt)+1
If (base == nextseqnum)
stop_timer
else
start_timer
udt_send(sndpkt) rdt_rcv(rcvpkt)
&& notcurrupt(rcvpkt)
&& hasseqnum(rcvpkt,expectedseqnum)
Wait
extract(rcvpkt,data)
expectedseqnum=1 deliver_data(data)
sndpkt = sndpkt = make_pkt(expectedseqnum,ACK,chksum)
make_pkt(expectedseqnum,ACK,chksum) udt_send(sndpkt)
expectedseqnum++
User
types
‘C’
Seq=42, ACK=79, data = ‘C’
host ACKs
receipt of
‘C’, echoes
Seq=79, ACK=43, data = ‘C’ back ‘C’
host ACKs
receipt
of echoed
‘C’ Seq=43, ACK=80
350
300
250
RTT (milliseconds)
200
sampleRTT
150
EstimatedRTT
100
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106
time (seconnds)
time (seconds) Transport Layer 3-44
SampleRTT Estimated RTT
TCP round trip time, timeout
timeout interval: EstimatedRTT ditambah “ batas aman”
• Sangat bervariasi pada EstimatedRTT -> perbesar batas aman
perkirakan deviasi SampleRTT dari EstimatedRTT:
DevRTT = (1-)*DevRTT +
*|SampleRTT-EstimatedRTT|
(typically, = 0.25)
TimeoutInterval = EstimatedRTT + 4*DevRTT