Computer Network Lecturer3
Computer Network Lecturer3
Prepared by
Risala Tasin Khan
Professor
IIT, JU
Transport services and protocols
application
transport
provide logical communication network
data link
between app processes physical
log
transport protocols run in end
ica
l
systems
en
d-
en
send side: breaks app
d
tra
messages into segments,
ns
p
passes to network layer
or
t
rcv side: reassembles application
log
data link physical
physical
ica
• flow control network
l
en
data link
physical
d-
• connection setup
en
network
d
tra
data link
• unreliable, unordered physical
ns
p
network
or
delivery: UDP data link
t
physical
network
application
application P4 P5 P6 application
P3 P2 P3
transport
transport transport
network
network link network
link physical link
physical server: IP physical
address B
wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
sum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0
checksum 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
rdt_rcv(rcvpkt) &&
notcorrupt(rcvpkt)
extract(rcvpkt,data)
deliver_data(data)
udt_send(ACK)
• With stop-and-wait protocol, if the sender begins sending the packet at t = 0, then at t = L/R = 8
microseconds, the last bit enters the channel at the sender side.
• The packet then makes its 15-msec cross-country journey, with the last bit of the packet emerging at
the receiver at t = RTT/2 + L/R = 15.008 msec.
• The receiver can send an ACK as soon as the last bit of a data packet is received, the ACK emerges back at the
sender at t = RTT + L/R = 30.008 msec.
• At this point, the sender can now transmit the next message.
• Thus, in 30.008 msec, the sender was sending for only 0.008 msec
rdt3.0: stop-and-wait operation (problem)
sender receiver
first packet bit transmitted, t = 0
last packet bit transmitted, t = L / R
U L/R .008
sender = = = 0.00027
RTT + L / R 30.008
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