Académique Documents
Professionnel Documents
Culture Documents
sender receiver
rdt_rcv(rcvfrm) &&
notcorrupt(rcvfrm)
extract(rcvfrm,data)
deliver_data(data)
udt_send(ACK)
rdt_rcv(rcvfrm) &&
notcorrupt(rcvfrm)
Note: This protocol implements flow extract(rcvfrm,data)
control. (How?) deliver_data(data)
udt_send(ACK)
rdt_rcv(rcvfrm) &&
notcorrupt(rcvfrm)
extract(rcvfrm,data)
deliver_data(data)
udt_send(ACK)
response
rdt_rcv(rcvfrm) && isACK(rcvfrm)
L
sender
Transport Layer 3-13
rdt2.1: sender, handles garbled ACK/NAKs
rdt_send(data)
sndfrm = make_frm(0, data, checksum)
udt_send(sndfrm) rdt_rcv(rcvfrm) &&
( corrupt(rcvfrm) ||
Wait for Wait for
ACK or
isNAK(rcvfrm) )
call 0 from
NAK udt_send(sndfrm)
above
rdt_rcv(rcvfrm)
&& notcorrupt(rcvfrm) rdt_rcv(rcvfrm)
&& isACK(rcvfrm) && notcorrupt(rcvfrm)
&& isACK(rcvfrm)
L
L
Wait for Wait for
ACK or call 1 from
rdt_rcv(rcvfrm) && NAK above
( corrupt(rcvfrm) ||
isNAK(rcvfrm) ) rdt_send(data)
extract(rcvfrm,data)
deliver_data(data)
sndfrm = make_frm(ACK, chksum)
udt_send(sndfrm)
extract(rcvfrm,data)
deliver_data(data)
sndfrm = make_frm(ACK1, chksum)
udt_send(sndfrm)
rdt3.0 sender
For Evaluation Only.
rdt_send(data)
rdt_rcv(rcvfrm) &&
sndfrm = make_frm(0, data, checksum) ( corrupt(rcvfrm) ||
udt_send(sndfrm) isACK(rcvfrm,1) )
rdt_rcv(rcvfrm) start_timer L
L Wait for Wait
for timeout
call 0from
ACK0 udt_send(sndfrm)
above
start_timer
rdt_rcv(rcvfrm)
&& notcorrupt(rcvfrm) rdt_rcv(rcvfrm)
&& isACK(rcvfrm,1) && notcorrupt(rcvfrm)
stop_timer && isACK(rcvfrm,0)
stop_timer
Wait Wait for
timeout for call 1 from
udt_send(sndfrm) ACK1 above
start_timer rdt_rcv(rcvfrm)
rdt_send(data) L
rdt_rcv(rcvfrm) &&
( corrupt(rcvfrm) || sndfrm = make_frm(1, data, checksum)
isACK(rcvfrm,0) ) udt_send(sndfrm)
start_timer
L
Homework problem
Performance of rdt3.0
For Evaluation Only.
U L/R .008
= = = 0.00027
sender 30.008
RTT + L / R microsec
onds
if RTT=30 msec, 1KB frm every 30 msec -> 33kB/sec thruput
over 1 Gbps link
network protocol limits use of physical resources!
U L/R .008
sender
= = = 0.00027
RTT + L / R 30.008 microsec
onds
Increase utilization
by a factor of 3!
U 3*L/R .024
sender
= = = 0.0008
RTT + L / R 30.008 microsecon
ds
receiver sees no
difference in two
scenarios!
incorrectly passes
duplicate data as new
in (a)
Q: what relationship
between seq # size
and window size?
MAX_SEQ >= 2*win_size Transport Layer 3-41
Section 3.5:
Example Layer 2 Protocols
PPP: Point-to-point protocol
Used with SONET (Synchronous Optical
Network)
• Fiber optic media
Dial-up connections
ATM: Asynchronous Transfer Mode
Used in combination with PPP for ADSL
connections
• Called PPPoA (PPP over ATM)
• DMAX DSL service uses this
Details in textbook (Read)
Transport Layer 3-42
Chapter 4: Medium Access
Control (MAC) Sublayer
humans at a
shared wire (e.g., shared RF shared RF cocktail party
cabled Ethernet) (e.g., 802.11 WiFi) (satellite) (shared air, acoustical)
5: DataLink Layer 5-44
Multiple Access protocols
single shared broadcast channel
two or more simultaneous transmissions by nodes:
interference
collision if node receives two or more signals at the same time
multiple access protocol
distributed algorithm that determines how nodes
share channel, i.e., determine when node can transmit
communication about channel sharing must use channel
itself!
no out-of-band channel for coordination
FDM cable
Pros Cons
single active node can collisions, wasting slots
continuously transmit idle slots
at full rate of channel nodes may be able to
highly decentralized: detect collision in less
only slots in nodes than time to transmit
packet
need to be in sync
clock synchronization
simple
5: DataLink Layer 5-52
Slotted Aloha efficiency
Efficiency : long-run max efficiency: find
fraction of successful slots p* that maximizes
(many nodes, all with many Np(1-p)N-1
frames to send) for many nodes, take
limit of Np*(1-p*)N-1
suppose: N nodes with as N goes to infinity,
many frames to send, gives:
each transmits in slot Max efficiency = 1/e = .37
with probability p
!
prob that given node At best: channel
has success in a slot = used for useful
p(1-p)N-1 transmissions 37%
prob that any node has of time!
a success = Np(1-p)N-1
5: DataLink Layer 5-53
Pure (unslotted) ALOHA
unslotted Aloha: simpler, no synchronization
when frame first arrives
transmit immediately
collision probability increases:
frame sent at t0 collides with other frames sent in [t0-1,t0+1]
= 1/(2e) = .18
collision:
entire packet transmission
time wasted
note:
role of distance & propagation
delay in determining collision
probability
(bandwidth-delay product!)
concerns:
polling overhead
latency slaves
single point of
failure (master)
data
5: DataLink Layer 5-62
Summary of MAC protocols
channel partitioning, by time, frequency or code
Time Division, Frequency Division
random access (dynamic),
ALOHA, S-ALOHA, CSMA, CSMA/CD
carrier sensing: easy in some technologies (wire), hard in
others (wireless)
CSMA/CD used in Ethernet
CSMA/CA used in 802.11
taking turns
polling from central site, token passing
Bluetooth, FDDI, IBM Token Ring