Voice over Mobile IP

Download Report

Transcript Voice over Mobile IP

Ch 3. Transport Layer
Myungchul Kim
[email protected]
Transport-Layer Service
–
–
–
–
–
A transport-layer protocol: logical communications between
application processes running on different hosts.
Processes vs hosts
A transport protocol can offer reliable data transfer service to an
application even when the underlying ntwork protocol is
unreliable.
IP, a best-effort delivery service: logical communications between
hosts, unreliable service
Extending host-to-host delivery to process-to-process delivery is
called transport-layer multiplexing and demultiplexing.
2
3
Multiplexing and demultiplexing
–
–
–
Demultiplexing: delivering the data in a transport-layer segment
to the correct socket
Multiplexing: passing the segments to the network layer
16 bit number for port number including 1 to 1023 for well-known
port numbers
4
-
-
Each socket in the host could be assigned a port number.
A UDP socket is identified by a destination IP address
and destination port number
A TCP socket is identifed by a four-tuple
5
6
7
Connectionless Transport: UDP
–
–
–
–
–
–
–
–
Multiplexing/demultiplexing and light error checking
No handshaking
Finer application-level control over what data is sent, and when
No connection establishment
No connection state
Small packet header overhead: TCP 20 bytes of header and
UDP 8 bytes of overhead
TCP is increasingly being used for streaming media transport
The lack of congesting control in UDP?
8
9
–
–
UDP checksum: the 1’s complement of the sum of all the 16-bit
words in the segment at the sender -> if no errors are introduced
into the packet, the sum at the receiver will be all 1’s.
Errors in a link-layer or a router’s memory
10
Principles of reliable data transfer
–
Unidirection data transfer
11

Reliable data transfer over a perfectly reliable channel rdt1.0
12

Reliable data transfer over a channel with bit errors rdt2.0
– Rdt1.0: perfectly reliable channel, no limit of receiving speed
– Error detection and Acknowledgement (ack, nak)
– Automatic Repeat reQuest (ARQ) protocols; error detection,
receiver feedback and retransmission
– Stop-and-wait protocol
13
14

Reliable data transfer over a channel with bit errors rdt2.1
– Rdt 2.0: ack or nak packet could be corrupted
– Sequence number of 0 or 1
– Duplicate acks: a sender that receives two ACKs for the same
packet knows that receivers did not correctly receive the packets
following the duplicated acked packet.
15
16
17

Reliable data transfer over a channel with bit errors rdt2.2
– a NAK-free protocol
– same functionality as rdt2.1, using ACKs only
– instead of NAK, receiver sends ACK for last pkt received OK
 receiver must explicitly include seq # of pkt being ACKed
– duplicate ACK at sender results in same action as NAK:
retransmit current pkt
18
19
20

Reliable data transfer over a lossy channel with bit errors rdt3.0
–
–
–
Rdt 2.0: packet loss
Countdown timer
Alternating-bit protocol
21
22
23
Pipelined reliable data transfer protocols
–
–
–
-
Rdt3.0: performance problem due to a stop-and-wait protocol
Transmission delay = L/R = 8000 bits/packet / 10 9 bits/sec
= 8 microseconds.
where R= 1 Gbps, L = 1,000 bytes
Utilization of sender U sender = L/R / (RTT + L/R)
= .008 / 30.008 = 0.00027
where RTT = 30 milliseconds
Effective throughput of only 267kbps for a 1 Gbps link
Pipelining: the sender is allowed to send multiple packets without
waiting for acknowledgements.
24
25
Go-Back-N (GBN)
–
–
–
–
Window size
A sliding window protocol
Receipt of an ack at the sender: Cumulative acknowledgement
The receiver discards out-of-order packets -> no buffers at the
receiver
26
27
28
29
Selective Repeat (SR)
–
–
The receiver individually acknowledge correctly received packets.
The sender and receiver will not always have an identical view of
what has been received correctly and what has not.
30
31
32
Connection-oriented Transport: TCP
–
–
–
–
–
Full-duplex service
Point-to-point
Three-way handshake
Maximum segment size (MSS)
Maximum transmission unit (MTU)
33
34
–
–
Cumulative acknowledgements
The acknowledgement number that Host A puts in its segment is
the sequence number of the next byte Host A is expecting from
Host B.
35
36
Round-trip time estimation and timeout
–
–
–
–
EstimatedRTT = (1-α) * EstimatedRTT + α * SampleRTT
α = 0.125
DevRTT = (1 -β)*DevRTT + β * |SampleRTT – EstimatedRTT|
TimeoutInterval = EstimatedRTT + 4* DevRTT
37
Reliable data transfer
–
–
A single retransmission timer; associate with the oldest
unacknowledged segment
TCP uses cumulative acknowledgement
38
39
40
41
42

Doubling the Timeout Interval
–

Fast retransmit
–
–
–

Each time TCP retransmits, it sets the next timeout interval to
twice the previous value.
A duplicate ACK is an ACK that reacknowledgements a segment
for which the sender has already received an earlier
acknowledgement.
Three duplicate ACKs -> TCP sender performs a fast retransmit,
retransmitting the missing segment before that segment’s timer
expires.
why three?
TCP is a hybrid of GBN and SR protocols.
43
44
Flow control
–
–
–
–
Eliminate the possibility of the sender overflowing the receiver’s
buffer
Sender maintains a variable called the receive window
LastByteRead: the number of the last byte in the data stream
read from the buffer by the application process in B
LastByteRcvd: the number of the last byte in the data stream that
has arrived from the network and has been placed in the receive
buffer at B
45
–
–
–
–
LastByteRcvd – LastByteRead ≤ RcvBuffer
RcvWindow = RcvBuffer – [ LastByteRcvd – LastByteRead]
No overflow at the receive buffer : LastByteSent – LastByteAcked ≤
RcvWindow (at the sender)
Host A continues to send segments with one data byte when B’s receive
window is zero.
46
TCP connection management
–
Three-way handshake
47
48
49
Principles of congestion control
–
Scenario 1
50
51
–
–
Scenario 2
Offered load to the network
52
53
–
Scenario 3
54
55
Approaches to congestion control

End-to-end congestion control
–
–
–

The network layer provides no explicit support to the transport
layer for congestion control purpose.
Congestion is inferred on observed network behavior such
packet loss and delay.
TCP
Network-assisted congestion control
–
ATM Available bit-rate (ABR) congestion control
56
57
Network-assisted congestion-control
example: ATM ABR congestion control
–
–

Explicitly signaling to the sender to reduce its rate when the
switch becomes congested.
Resource-management cells (RM cells)
Signaling congestion-related information
–
–
–
Explicit forward congestion indication (EFCI) bit in data cells
Congestion indication (CI) and No increase (NI) bits in RM cells
Explict rate setting
58
TCP congestion control
–
–
–

Congestion window
LastByteSent – LastByteAcked ≤ min{CongWin, RcvWindow}
At the beginning: sending rate = CongWin / RTT
Additive-Increase, Multiplicative-Decrease (AIMD)
–
–
–
–
Halving the current value of CongWin after a loss event
Not allowed to drop below 1 MSS
Increase CongWin by 1 MSS every round-trip time
Congestion avoidance
59

Slow start
–
A TCP sender increases its rate exponentially by doubling its
value of CongWin every RTT
60

Reaction to timeout events
–
–
–
A triple duplicate ACK -> fast recovery: ½ CongWin
A timeout -> a slow start
Vegas: the longer the RTT of the packets, the greater the
congestion in the routers
61
Fairness
62
–
–
Fairness and UDP
Fairness and parallel TCP connections
63