Download t 2

Document related concepts

Point-to-Point Protocol over Ethernet wikipedia , lookup

Net bias wikipedia , lookup

Internet protocol suite wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

TCP congestion control wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Wake-on-LAN wikipedia , lookup

Serial digital interface wikipedia , lookup

RapidIO wikipedia , lookup

Deep packet inspection wikipedia , lookup

CAN bus wikipedia , lookup

IEEE 1355 wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
Chapter 2
Point-to-Point Protocols and Links
Section 2.1
Introduction
2.1 Introduction


Physical communication links
Data link control


Physical links : requires background in




i.e. point-to-point protocols
Linear system theory
Random process
Modern communication theory
Recall

Chapter 1 section 1.3.1 page 34
Introduction
Introduction

Our major problem in DLC : correct bit
error



Error detection & correction
ARQ ( Automatic Repeat request)
Header + packet + trailer => frame
Section 2.2
Physical layer
Channels & modems
2.2 Physical layer:channels &
modems

Skip,will be discussed if necessary
Section 2.3
Error Detection
2.3 Error Detection

DLC layer is to provide error-free
packets to next layer up
packet of K bits  2 possible packets
Extra bit must be appended to detect errors
k
2.3.1 Single Parity checks

Parity checks bit is the sum, modulo 2 ,
of the bits in the original bit string


Total number of 1`s in an encoded string
is always even
Detect single bit error only.And , odd
number of bit errors
2.3.2 Horizontal & Vertical
Parity Checks
Horizontal & Vertical Parity
Checks


Common use for ASCII encoded
characters
Cannot detect four errors confined to 2
rows and 2 columns
2.3.3 Parity Check Codes
K

L

code word
K : length of data string ; L : parity checks
2 k possible data string  map to code word of length K  L
Parity Check Codes
Effectiveness of a code for error detection

Minimum distance of the code
1.
•
•
Burst-detecting capability
2.
•
•
3.
Single parity check is 2
Horizontal & Vertical is 4
Single parity is 1
Horizontal & Vertical is 1+length of row
Probability that a completely random string will
be accepted as error-free
Parity Check Codes

E.g.

Minimum distance



Single parity check is 2
Horizontal & Vertical is 4
Burst-detecting


Single parity check is 1
Horizontal & Vertical is 1 + length of row
Parity Check Codes
K  L  each string is received
with prob. 2
-K-L
K
2 code words, prob. of an
undetected errer 2
-L
Minimum distance d  correct d/ 2
Figure 2.15
2.3.4 Cyclic Redundancy
Checks(CRC)
data bits (S k-1,S k- 2 , ,S1,S 0 )
 S(D)  S k-1 D
k 1
 S k- 2 D
k 2
   S0
CRC(C L 1,C1,C0 ,)
 C(D)  C L-1 D
L 1
   C1 D  C0
entire transmitted X(D)  S(D)D  C(D)
L
 X(D)  S k-1 D
L  k-1
   S 0 D  C L 1 D
L
L 1
   C0
Cyclic Redundancy
Checks(CRC)
C(D) is a function of S(D)
defined in terms of a generator polynomial g(D)
g(D)  D  g L 1 D
L
L 1
   g1 D  1
 S(D)D 
 C ( D)  Remainder 
 modulo 2
 g(D) 
L
Cyclic Redundancy
Checks(CRC)
D3  D 2  1 D5
D2  D
 D3
D5  D 4
L=3
S(D)=D2+1
 D2
D D D
4
3
D 4  D3
2
D
Remainder  D 2  D
Cyclic Redundancy
Checks(CRC)
 S(D)D L 
Let Z(D) be quotient 

 g(D) 
 S(D)D L  g(D)Z(D)  C(D)
 X(D)  S(D)D L  C(D)  g(D)Z(D)
all codewords are divisible by g(D)
all polynomial s divisible by g(D) are codewords
Cyclic Redundancy
Checks(CRC)
Let X(D) is transmitt ed  y(D) be received
If error occur, y(D)  X(D)  e(D) (mod 2)
 y(D) 
Remainder 
 Remainder

 g(D) 
If no errors, then e(D)  0
 e(D) 
 g(D) 


But, fail to detect errors only if e(D)
is itself some codeword
Cyclic Redundancy
Checks(CRC)
(1)If single error :
say ei  1, e( D)  D
i
L
g(D) has at least 2 terms(D & 1)
 g(D)Z(D)ca n`t equal D
i
 all single errors are detectable
Cyclic Redundancy
Checks(CRC)
highest  order & lowest - order
terms in g(D)Z(D) differ by at least L
if e(D) is a codeword , burst enough
of errors is at least L  1
Cyclic Redundancy
Checks(CRC)
(2)If a double error occurs :
say e( D)  D  D  D ( D
i
j
j
i j
 1), i  j
j
D is not divisible by g(D)
so, e(D) fails to be detected if D  1
i-j
is divisible by g(D)
Cyclic Redundancy
Checks(CRC)
From theory of finite fields
D  1 is divisilbe by g(D) 
n
smallest n can be no larger tha n 2  1
L
If primitive polynomial s, n  2  1
L
If fram length  2  1,D
L
i j
 1 not divisible
all double errors are detected!
Cyclic Redundancy
Checks(CRC)
In practice :
g(D)  product of a primitive polynomial
of degree L-1 times (D  1 ), bolck length  2  1
 minimum distance at least 4
burst - detecting capability of at least L
L
prob. of failing to detect errors 2
-L
Cyclic Redundancy
Checks(CRC)
e.g.
g(D)  D  D  D  1 for CRC-16
16
15
12
g(D)  D  D  D  1 for CRC-CCITT
16
12
5
g(D)  D 32  D 26  D 23  D 22  D16  D12 
D D D D D D D
11
10
 D 1
1
8
7
5
4
2
Section 2.4
ARQ: Retransmission Strategies
2.4 ARQ:Retransmission
Strategies

2 aspects of retx algorithms or
protocols
1.
2.
Succeed in releasing each packet,one oad
only once without errors
Efficiency releasing unnecessary waiting
& unnecessary retx
ARQ:Retransmission
Strategies

We assume , all frames containing
transmission errors are detected



Delay is arbitrary
Frame may be “lost” & never arrive
Frames arrive in the same order as
transmitted
ARQ:Retransmission
Strategies
2.4.1 Stop-and-wait ARQ


Each packet has been received correctly
before initiating tx of next packet
If

Error free


Error frame



Acknowledge , Ack
Negative acknowledgement , NAK
Ack & NAK is protect with a CRC
Ack lost or NAK

Resend the old packet
Stop-and-wait ARQ
Stop-and-wait ARQ
Stop-and-wait ARQ


Avoid this problem,returns the number
of next packet awaited
Piggyback
Stop-and-wait ARQ
Fig 2.21
Stop-and-wait ARQ
The algorithm for A to B


At node A
1.
2.
3.
4.
SN0
Assign SN to the new packet
Tx SN-th frame
If receive from B with B RN>SN,SNRN,go
to Step2
If no received frame from B,timeout , go to
Step 3
Stop-and-wait ARQ
Continued


At node B
1.
2.
3.
RN0,repeat step2 &3 forever
If error-free frame received with
SN==RN,RN++
Within bounded delay after receiving errorfree frame send a frame to A containing RN
Stop-and-wait ARQ

Correctness of stop-and-wait



An algorithm is safe if it never produces an
incorrect result
An algorithm is live if it can continue forever to
produce results
Safety

Initially, node B awaiting packet 0 , and only
packet 0 is released.Subsequently,node B has
released all packets in order,up to , but not
including ,packet RN
Stop-and-wait ARQ
Stop-and-wait ARQ
t1 : first starts to transmit packet i at time t1
t 2 : packet i is received error free at node B
t3 : SN at A is increased to i  1
Let t 2  ,t3   if the above events never happen
We will show t1  t 2  t3 and t3 is finite
 liveness, by using this argument repeatedly
i.e. each packet is transmitt ed with finite delay
Stop-and-wait ARQ
proof :
SN(t)  RN(t) for any time t
packet i never been trami tted before time t1
RN(t1 )  i
 SN(t1 )  i  SN(t1 )  RN(t1 )  i
RN(t 2 )  i  1,SN(t3 )  i  1  t 2  t3
Stop-and-wait ARQ
Assume that a prob. q  0 that each re - tx
is received correctly , and retx occur with in
finite intervals
 error  free reception eventually orrurs
t 2 is finite
same argument, t 2 to t3 is finite
Stop-and-wait ARQ

One trouble with Stop-and-wait


SN become arbitrarily large with increasing
time
Given our assumption that frames travel in
order on the link,SN modulus 2 is sufficient!
From t1 to t3 , SN(t)  i , RN(t)  i or i  1
After t2 , B is waiting for i  1 ,
received packet  i or i  1
Stop-and-wait ARQ
2.4.2 Go Back n ARQ



Several successive packets can be sent
without waiting for the next packet to
be requested
Accept packets only in the correct
order , and send RN back
RN is to acknowledge all packets prior
to RN and to request packet RN
Go Back n ARQ
n  1 determine how many successive packets
can be sent in absence of a request for new packet
i.e. from i to i  n-1(before i is ACKed)
sliding " window" size  n
Go Back n ARQ
Go Back n ARQ
Go Back n ARQ
Go Back n ARQ
Go Back n ARQ

Go back n algorithm

At node A
1.
2.
3.
4.
5.
SNmin 0,SNmax0 (SNmin to SNmax-1)
Do steps 3,4,5 repeatedly in any order
If SNmax<SNmin+n and a packet is available,assign
SNmax to it & increment SNmax
If an error-free frame is received from B containing
RN>SNmin,increase SNmin to RN
If SNmin<SNmax,and no frame is currently in
transmission,choose some number SN,SNmin
<=SN<SNmax;transmit SN-th frame. At most a
bounded delay is allowed between successive
transmission of packet SNmin over intervals when
SNmin does not change
Go Back n ARQ

Go back n algorithm

At node B



RN0,repeat steps 2&3 forever
When an error-free frame is received from A
containing SN==RN,increment RN
At arbitrary times,but within bounded delay
after receiving any error-free data frame from
A,transmit a frame to A containing RN
Go Back n ARQ

Safety


Same as stop-and-wait
Liveness

t1<t3 ,t2<t3
Go Back n ARQ
Go Back n ARQ
 SN min (t)  RN(t)
at t2 , RN(t 2 )  i  1

  t 2  t3
at t3  SN min (t) beyond i 
Go Back n ARQ



t2 could be <t1(why? P.77)
It t1<t2 ,then RN(t)=i for t1  t  t2
packet i after t1 will be accepted and since
t2<t3 , node A will retx packet i until this
happened
t1 to t2 is finite
No matter t1<t2 or t1>t2
Node B transmit frames carrying RN  i+1
from time t2 until t3 since g>0, t2 to t3 is
finitelive!
Go Back n ARQ with modulo
m>n
Go Back n ARQ with modulo
m>n
SN min (t1 )  SN  SN min (t1 )  n  1
SN min (t1 )  RN(t 2 )  SN min (t1 )  n

RN(t 2 )-SN  n
at B, receive SN  RN mod m release
received packet at increment RN
at A, SN min (t 2 )  RN  SN min (t 2 )  n
Go Back n ARQ with modulo
m>n
2.4.3 Selective Repeat ARQ


Even if unnecessary retx are avoided,go
back n protocol must re-tx at least one
round-trip-delay when a single error
occurs in an awaited packet
Idea of selective repeat ARQ is to
accept out -of-order packet,and to
request retx from A only for those
packets that are not correctly received
Selective Repeat ARQ



RN: lowest number packet not yet
correctly received
N: window size
Let p is probability of frame error,the
expected number  of packets delivered
to B per frame
  1-p  throughput of ideal
selective repeat
Ideal go back n ARQ

r = ( 1-p ) + p( 1 +  +  )

r : 平均等?Frames可等到next awaited
frame
( 1-p ) : 下一個成功
 p : 失敗
1  p
1 p
r 
 
1 p
1  p

(
1

)
Selective Repeat ARQ modulo
m2n



B accept RN~RN+n-1
Feedback also contains which packets
beyond RN have been correctly
received
Accepted out -of-order packets are
saved until earlier packets are accepted
& released
Selective Repeat ARQ modulo
m2n
t1 : frame was first generated at node A
at time t1
t2 : frame is received at node B
RN(t2)-nSNRN(t2)+n-1
If mod m ,and if packets are accepted in
the range RN(t2)~RN(t2)+n-1
it is necessary for B to distinguish
values of SN in the entire rangem2n
2.4.4 ARPANET ARQ



Using 8 stop-and-wait strategies in
parallel
Each incoming packet is assigned to
one of eight virtual channels if one of
eight is idle
If all channels are busy,wait
ARPANET ARQ
ARPANET ARQ




More overhead is required
Sequence number modulo 2
Each frame carries information for all 8 virtual
channels
ack information is repeated so often
(Typically,only one retx is required in forward
direction)
Undesirable : packets released at receiver in
a different order
Section 2.5
Framing
2.5 Framing

Decide where successive frames start
and stop
1.
2.
3.
Character-based framing : use special
control characters for idle fill and to
indicate frame beginning and ending
Bit-oriented framing with flags:use
special bit string(flag)
Length counts:in a field of the header
2.5.1 Character-Based
Framing



SYN(synchronous idle) : provides idle
fill b/w frames
STX(start of txt)
ETX(end of text)
Character-Based Framing
Character-Based Framing

If the packet to be transmitted in an
arbitrary binary string,packet might
contain ETX character ,for example
trouble!
transparent mode:DLE character is
inserted before STX (Data Link Escape)

DLE in data:DLE DLE DLE

E.g. : (x)DLE ETX  end of frame
(x)DLE DLE ETX  DLE ETX 的 Data
Character-Based Framing
Character-Based Framing

Disadvantages



Excessive use of framing overhead
Each frame must consist of an integer number of
characters
What happens if error?



Error in DLE ETX ending a frame : won't detect
end of frame
Error in data causes DLE ETX: interpret as end of
frame
Probability : 2-L CRC undetected
2.5.2 Bit-Oriented Framing :
Flags




Another approach : use a flag at the end of
frame
Bit stuffing is used to avoid confusing b/w
data ad flag
Difference b/w bit-oriented & character-based
framing:bit-oriented can have any length of
bits
For example : 0160 as a flag to indicate frame
ending

Rule : insert (stuff) a 0 into data string of the
frame proper after each successive 5 1`s
Bit-Oriented Framing : Flags
Bit-Oriented Framing : Flags

After stuffing : never contains more
than 5 consecutive 1`s.If a string of 5
1`s is followed by a 1 frame end



016 : frame end
016 0 : normal frame termination
016 1 : abnormal termination  abort
Bit-Oriented Framing : Flags

討論(fig 2.36)




The first stuffed bit : not necessary(不會混
淆,因為just start)
Second stuffed bit : necessary
Third stuffed bit : could be eliminated
Fourth stuffed bit : required(無法分辨0是否
stuffed)
by modifying stuffing rule, but the
reduction of overhead is negligible
Bit-Oriented Framing : Flags

Consider the overhead


Assume a frame(before bit stuffing)
consists of i id random binary variables
with equal probability 0 or 1
Assume for increased generality that the
flag uses 01j for some j


01j0 : normal termination
01j+1 : abnormal
Bit-Oriented Framing : Flags
An insertion will occur at the i-th bit of the
original frame (for i  j)
if the string from i-j+1 to I is 01j-1
probability = 2-j
 An insertion will also occur (for i  2j-1)
if string from i-2j+2 to i is 012j-2(01j-11j-1)
probability = 2-2j+1 (ignore this term,太小)

Bit-Oriented Framing : Flags
Bit j-1 occur an insertion if the first j-1 bits are all
1`s
 probability = 2-j+1
Recall:
Expected value of a sum of r.v`s =
Expected number f insertions in a frame  r.v`s
=  expected number of insertions at i - th bit
i
for k(original frame length)  j-1
Expected number of insertions
2-j+1 + (k-j+1)2-j = (k-j+3)2-j

Bit-Oriented Framing : Flags

E{overhead} = (E{k}-j+3)2-j+j+1(2.33)


j+1 means termination string
Since E{k}>>j
E{overhead}  E{k}2-j+j+1(2.34)
Bit-Oriented Framing : Flags

Minimize(2.34) for a given E{k}find optimal
j


So, optimal j must :
E{k}2-j+j+1 < E{k}2-j-1+j+2
E{k}2-j-1 <1
smallest j : j = log2E{k} (2.36)
E{overhead}  log2E{k} +2 (2.37)
For example
if E{k} = 1000 bits , optimal j = 9
E{overhead}  12 bits
for j =6 , E{overhead}  23 bits
2.5.3 Length Fields

Basic problem in framing




Determine where each idle fill string ends(trivial,
when pattern is broken) where each frame
ends:harder
Include a length field in the frame header(e.g.
DECNET) length field(overhead) must have at
least  log2Kmax +1 bits where Kmax is maximum
frame size
Compared to 2.37similar overhead
Question

Any other method requires smaller overhead
Bit-Oriented Framing : Flags

Information theory

By source coding theorem
Given any probability assignment P(K) on frame
lengths.Minimum expected number of bits that
can encode such a length is at least entropy of
that distribution
H   P(K) log 2
K
1
bits
P(K)
(2.38)
at least this many bits of framing overhead to
specify length
Bit-Oriented Framing : Flags

If uniform : P(K) = 1/Kmax for 1  K  Kmax
H = log2Kmax

If geometric distance on lengths
H= log2E{K}+log2e for large E{K}(2.37)-1/2

Note : geometric : have largest entropy.
i.e.requires more bits than any other distance
Bit-Oriented Framing : Flags

If one does this for a geometric distance
unary-binary encoding



In particular , for a given j , K = i2j+r;0r<2j
Encoding for K : i個0`s followed by a 1 (unary
encoding of i) followed by ordinary binary
encoding of r (j bits)
For example : if j=2 , k=7  i=1,r=3
so, K = 01 11
Bit-Oriented Framing : Flags


End of encoding : occurring j bits after the
first 1 .
In general :
K (maps) bit string of length K/2j +1+j
E{overhead}  E{K}2-j+1+j (2.40)
與(2.34)相同
Again , minimize by choosing j =  log2E{K}
2.5.4 Framing with Errors


Error in the flag  will not detect frame-end
until next flag is detected CRC check with 2
frames (undetected probability = 2-L)
Error within the frame to change a bit string
into the flag 0160
0100110111001…(sent)
0100111111001…(received)
Probability  1/32 Kp , where p is bit error
probability using CRC, undetected probability = 2-L
Framing with Errors

If length field has error  causes
receiver to look for CRC in wrong place
 2-L
Framing with Errors

There are several partial solutions to
the above problems , but none are
without disadvantages

Using a fixed-length header for each
frame , and put length of frame in header ,
and header has its own CRC

If error in length field , still got CRC. But have
to resynchronize after such an error. 因為will
not know when next frame starts. 2 CRC`s
must be used  inefficient some what!
Framing with Errors

Put length field of one frame into trailer of
the preceding frame



Avoid inefficiency , but still requires a special
synchronizing sequence after each detected
error
Require a special header whenever length of
next frame is unknown
Use a longer CRC

Reduce probability of falsely accepting a frame
Framing with Errors

Regard framing as being at a higher layer
than ARQ




Packets would be separated by flags
Resulting sequence of packets & flags would be
divided into fixed-length frames. ( If a packet
ended in middle of a frame  idle fill)
Because of fixed-length , CRC would always be
found
Disadvantage : delay

A packet could not be accepted until entire frame
containing end of packet was accepted
2.5.5 Maximum Frame(packet)
Size

Variable packet lengths


Most existing packet networks
Use very short frames with a fixed
length

ISDN,ATM:53bytes
Maximum Frame(packet) Size

Variable frame length



Fixed number V of overhead bits
Let Kmax = maximum length of a packet
Assume each message is broken up into as
many maximum-length packets as possible
with last packet containing what is left over


message of length M  M/Kmax packets
Total bits transmitted = M + M/Kmax V
Maximum Frame(packet) Size

Kmax越大越好
1. As Kmax ,
V
fraction V  K
 M 


K
 max 

overhead
max
2. Processing on a frame basis
1. Kmax  , processing 
Maximum Frame(packet) Size

Kmax越小越好
1. Pipeline


Assume a packet must be completely received
over one link before starting transmission
over the next
If message is broken into several packets ,
earlier packets may proceed along the path
on first link  reducing overall message
delay
Maximum Frame(packet) Size
Maximum Frame(packet)
Size(pipeline cont`d)

Let's consider combined effects of overheads
& pipelining


Assume message transmitted over j equal-capacity
links and that network is lightly loaded(no waiting
packets) and ignore propagation delay
Total time T required to transmit message to
destination

T = time for first packet to travel over the first j-1 links
+ time for entire message to travel over the final link
Maximum Frame(packet) Size
(pipeline cont`d)

Assume MKmax
Let C be capacity of each link
TC = number of bit transmission times =(Kmax +
V)(j-1) + M + M/Kmax V
Approximate : E{M/Kmax } = E{M/Kmax}+1/2
E{TC}  (Kmax+V)(j-1)+E{M}+E{M}V/Kmax +V/2
Maximum Frame(packet) Size
(pipeline cont`d)

K max
to minimize E{TC}
E{M }V
j 1
so, Kmax 
An overhead V
,
As path length j 
,
Kmax
Kmax


In practice , see if delay is important
Maximum Frame(packet) Size
(pipeline cont`d)

Delay for stream-type traffic(such as voice)


delay from when a given bit enters the network
until that bit leaves
Consider the light leading case





Assume arrival rate R
Packet length K
The first bit in a packet is held up for K/R waiting time
for packet to be assembled
Along the path , link capacities C1,C2…(>R)
A given packet is delayed by [(K+V)/Ci ] on i-th link
Maximum Frame(packet) Size
(pipeline cont`d)

Total delay
T 



K
1
 ( K  V )
(2.45)
R
Ci
i
[(K+V)/Ci ]  K/Ri for each link i
T as K until [(K+V)/Ci ] = K/R for some link
yields minimum delay (i.e. small K)
Under heavy-loading

Use long packets by some users increases
delay for all users
Maximum Frame(packet) Size
2. Retransmission
 increase waiting time
 small maximum packet size
3. Large frame have higher probability of
error than small frames
 In WAN , frame size order of 1~ a few K bits
 In LAN , much longer frame size , 因為single
multi access link
Maximum Frame(packet) Size

Fixed frame length


Determine end of frame same
Optimal packet length  smaller
Homework One







2.15
2.16
2.17
2.30
2.33
2.39
共六題
Section 2.8
Point-to-Point Protocols
at Network Layer

Major issues



Routing
Flow control
Here, smaller issue:



Transfer of packets between a pair of nodes
Distinguish packets of one session from another
Distinguish packets within same session.
2.8.1 Session ID & addressing


Brute-force approach : source & destination
ID allows different packets of same paths →
But considerable overhead
If uses virtual circuit(VC) →far less overhead


Each link shared by a set of “virtual channels”
When set up, a path is established,use one
unused virtual channel to that session.
Virtual Channel
Session ID & addressing

Header:virtual channel #
→because limited capacity of link.
so upper bound on #of sessions
→use a fixed # of bits(overhead)
Session ID in TRMNET 1970
Session ID & addressing

Note: data from multiple sessions are
included in a single frame



Go back n ARQ with modulo m=8
Virtual channel # :identify session
→”statistical multiplexing “:link is
multiplexed between virtual channels


Sessions are served in “round-robin”
Each frame :takes some chars from each session
Session ID in codex networks



Again, multiple sessions transmitting
chars within the same frame
But, a more efficient encoding is used
to represent VC#
Four bit “nibbles”
Figure 2.49
Figure 2.49

Map char into one nibble(highly
probable)



Map char into two nibble(less likely)
Map char into three nibble(least likely)
Packet header:1 nibble for start record
1 or more nibble for
session#
─under heavy loading:header =1byte
2.8.2 packet numbering, Window
Flow Control,Error Recovery

Reorder or re-tx packets→need packet
numbering can be done in Network or
Transport Layer





This is necessary, because:
at DLC Layer:
1. CRC could fail
2. If link fail, DLC don’t know how many packets
was sent
3. If node fail, packets stored at the node are lost
Error Recovery
(at Network or Transport Layer)



Similar to ARQ at DLC Layer
Each packet within a session is numbered
modulo m=2k
Different between end-to-end and DLC



1. End-to-end involves 2 sites and subnet in
between
DLC:2 nodes with a link in between
2. Sequence numbering for end-to-end error
recovery involves only packets of a given sessions.
DLC:all packets using the link
3. frame stay in order on a link, packets might
arrive out of order in a network.
Error Recovery




Note:VC would guarantee in order for same
session,
but,link fails→a new path is set up.
Last packet on old path might arrive out of
order,relative to first packet on new path.
Packet retx, and arbitrary delay→earlier copy
can remain in network until packet numbering
wraps around→trouble.
Error Recovery



1. insist use virtual circuits
2. Modulus large enough
3. Packets are destroyed after lifetime.
Flow Control


Use of either go back n or selective repeat
ARQ,also provide flow control:window
size=n
Some limitation:



1. If ACK not arrive because of error, packet
should be re-tx.
If ACK is delayed due to congestion, packet should
not be re-tx.
→difficult to set “time-out”
Flow Control

Partial solution(at destination)



1. Slow down the source, but not delay
ACK.
2. “permit”:tells source how many
packets is prepared to receive.
RN:provide ACK
Discussion:Error recovery at
transport vs network layer


From practical standpoint, belongs to
transport layer.
Large # of networks do not provide reliable
service


E.g. internet protocol
Disadvantage for error recovery at transport


ACK are slow due to congestion
ACK was throw away

→no way to distinguish
Discussion:Error recovery at
transport vs network layer

When congestion ,


Packet retx→greater congestion
More dropped packets→unstable
2.8.3 X.25(self-reading)
2.8.4 The Internet Protocol(IP)

2 transport layer protocols were
developed along with IP


TCP(transmission control protocol):
reliable VC service
UPP(user datagram protocol):simply
where to sent datagram to destination
2.8.4 The Internet Protocol(IP)

Primary functions of IP:




1.route datagram through internet
2.provide addressing to identify source &
destination
3.fragment datagram into smaller pieces
Addresses in IP:32 bits



1.class A(0):7 bit network ID, 24 bit host ID
2.class B(10):14 bit network ID,16 bit host ID
3.class C(11):22 bit network ID,8 bit host ID
2.9 Transport Layer

Functions:




1. Breaking message into packets
2. error recovery
3. flow control
4. Multiplexing / Demultiplexing sessions
together
2.9.2

In ICP, entire address of a source(or
destination)is called a “socket”.


(Network ID, host ID→in IP header,
user/process ID within that
node→”port”→in transport header)
All session between same pair of hosts
are multiplexed together at transport
layer into a common lower-layer session
2.9.3 Error recovery in TCP


Enlarge modulus to allow out-of-order
packet arrivals.
Some complications:


1. retx timeouts (retx due to congestion,…)
(if done at network layer, better estimate
delay)
2.9.3 Error recovery in TCP

2. Setting up &tearing down connection


Packet from an old connection entering a new
connection
Packet still exist at some nodes after loss of
connection
2.9.4 Flow control in TCP/IP

Source monitor round-trip delay


Provide measure of congestion
Unfair :




”good citizen” session cut back under congestion,
“bad citizen” do not cut back
→network resources should be shared fairly, need
to have individual control over session.
But, network layer does not know session.
2.10.1 ATM
(Asynchronous Transfer Mode)


Cell: 53 bytes : 48+5(header)
Because packetization delay of voice


E.g. 64 kbps voice(by 8 bit sample each 125 sec),
time to collect 48 bytes=6 ms.
ATM uses VC



Address :
(user-network interface) 24 bits16 million
sessions
(Internal subnet )28 bits 268 million.
2.10.1 ATM
(Asynchronous Transfer Mode)

Address field is divided into 2 subfield:



VCI(Virtual channel identifier)
VPI(Virtual path identifier)
→sessions sharing same path are assigned
same VPI to be switched together
2.10.1 ATM
(Asynchronous Transfer Mode)

Use CRC to “correct” errors(not just detect)




Bit error rate(fiber)<10-9
Single error correction might remove most
errors(note: CRC checks only header)
Why?(voice,videos, tx)
Neither ARQ nor framing is required


Bit error rate is quite low
Voice, video.
2.10.2 Adaptation layer




Breaking incoming source data into ATM
cells.(network layer)
Used only on entry & exit from the
network(transport layer)
Not yet well-defined
Different types of input:




Class
Class
Class
Class
1:CBR:64 kbps voice…
2:VBR:packetized voice or video
3:connection-oriented data
4:connectionless data:datagram
2.10.2 Adaptation layer

Class 3(connection-oriented) traffic



Split into 2 sublayer:
Convergence & segmentation/reassembly
→flow control error recovery
2.10.2 Adaptation layer
‧Class 4(connectionless) traffic

Routed still by VC??Trouble


Passes through adaptation layer, use a
datagram switch
Use permanent VC to carry all datagram
between 2 switches
2.10.3 Congestion

Congestion is still a problem for broadband
networks


Due to large data rate for video applications,etc.
3 mechanisms



1. At connection setup time, negotiate QoS,
burstiness.
2. Monitor each connection
3. Use priority bit in ATM header
2.10.3 Congestion

For connectionless, no negotiation,



Carefully controlled to avoid excessive
delays for connection-oriented sessions.
Usually, a higher-layer network handles
this.
For negotiation →QoS guarantee
2.10.3 Congestion
‧For monitor & regular →e.g. leaky
bucket

(note:For light loaded,allow excessive
traffic )


Discarded later when congestion
For priority:by user to indicate low
priority traffic

E.g. video/voice compression.
Session ID & addressing