
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various error detection and correction techniques used in data communication, including crc, sequence numbers, and the 3-way handshake. Topics include different types of packet errors, their causes, and methods for detecting and correcting them. The document also covers the importance of efficiency and the role of sequence numbers in packet transmission.
Typology: Slides
1 / 32
This page cannot be seen from the preview
Don't miss anything!

























An Engineering Approach to Computer Networking An Engineering Approach to Computer Networking
DetectsDetects
u u
all single bit errors all single bit errors
u u
almost all 2-bit errors almost all 2-bit errors
uu
any odd number of errors any odd number of errors
uu
all bursts up to M, where generator length is M all bursts up to M, where generator length is M
u u
longer bursts with probability 2^-m longer bursts with probability 2^-m
Efficiency is importantEfficiency is important
u u
touch each data byte only once touch each data byte only once
n n
nn
uu
all use same scheme all use same scheme
u u
treat data bytes as 16-bit integers treat data bytes as 16-bit integers
u u
add with end-around carry add with end-around carry
uu
one’s complement = checksum one’s complement = checksum
uu
catches all 1-bit errors catches all 1-bit errors
u u
longer errors with longer errors with prob
prob 1/
Different from bit errorsDifferent from bit errors
u u
types types
FF
not just erasure, but also duplication, insertion,etc.not just erasure, but also duplication, insertion,etc.
u u
correction correction
F F
retransmission, instead of redundancyretransmission, instead of redundancy
DuplicationDuplication
u u
same packet received twice same packet received twice
FF
usually due to retransmissionusually due to retransmission
n n
InsertionInsertion
uu
packet from some other conversation received packet from some other conversation received
F F
header corruptionheader corruption
nn
ReorderingReordering
u u
packets received in wrong order packets received in wrong order
FF
usually due to retransmissionusually due to retransmission
FF
some routers also reordersome routers also reorder
DetectionDetection
u u
Sequence numbers Sequence numbers
u u
Timeouts Timeouts
nn
CorrectionCorrection
uu
Retransmission Retransmission
LossLoss
u u
gap in sequence space allows gap in sequence space allows
receiver to detect lossreceiver
to detect loss
FF
e.g. received 0,1,2,5,6,7 => lost 3,4e.g. received 0,1,2,5,6,7 => lost 3,
u u
acks acks carry
carry
cumulative cumulative seq
seq #
uu
redundant information redundant information
uu
if no if no ack
ack for a while,
for a while,
sender sender suspects loss
suspects loss
n n
ReorderingReordering
nn
DuplicationDuplication
nn
InsertionInsertion
u u
if the received if the received seq
seq
FF
more on this latermore on this later
Long enough so that sender does not confuse sequenceLong enough so that sender does not confuse sequencenumbers onnumbers on acks
acks
n n
E.g, sending at < 100 packets/sec (R)E.g, sending at < 100 packets/sec (R)
u u
wait for 200 wait for 200 secs
secs before giving up (T)
before giving up (T)
uu
receiver may dally up to 100 sec (A) receiver may dally up to 100 sec (A)
uu
packet can live in the network up to 5 minutes (300 s) packet can live in the network up to 5 minutes (300 s)
maximum packet lifetime) maximum packet lifetime)
u u
can get an can get an ack
ack as late as 900 seconds after packet sent out
as late as 900 seconds after packet sent out
u u
sent out 900100 = 90,000 packets sent out 900100 = 90,000 packets
uu
if if seqence
seqence space smaller, then can have confusion
space smaller, then can have confusion
uu
so, sequence number > log (90,000), at least 17 bits so, sequence number > log (90,000), at least 17 bits
n n
In general 2^seqIn general 2^
seq_size > R(2 MPL + T + A)
_size > R(2 MPL + T + A)
If noIf no acks
acks, then size depends on two things
, then size depends on two things
u u
reordering span: how much packets can be reordered reordering span: how much packets can be reordered
FF
e.g. span of 128 =>e.g. span of 128 => seq
seq # > 7 bits
u u
burst loss span: how many consecutive burst loss span: how many consecutive pkts
pkts. can be lost
. can be lost
F F
e.g. possibility of 16 consecutive lost packets => seqe.g. possibility of 16 consecutive lost packets =>
seq # > 4 bits
uu
In practice, hope that technology becomes In practice, hope that technology becomes obselete
obselete before
before
worst case hits! worst case hits!
Receiver should be able to distinguish packets from otherReceiver should be able to distinguish packets from otherconnectionsconnections
n n
Why?Why?
u u
receive packets on VCI 1 receive packets on VCI 1
uu
connection closes connection closes
uu
new connection also with VCI 1 new connection also with VCI 1
u u
delayed packet arrives delayed packet arrives
u u
could be accepted could be accepted
nn
SolutionSolution
uu
flush packets on connection flush packets on connection clos
clos
u u
can’t do this for connectionless networks like the Internet can’t do this for connectionless networks like the Internet
Per-connectionPer-connection
incarnation number incarnation number
u u
incremented for each connection from each host incremented for each connection from each host
u u
uu
F F
need stable storage, which is expensiveneed stable storage, which is expensive
nn
Reassign port numbers only after 1 MPLReassign port numbers only after 1 MPL
u u
Assign port numbers serially: new connections have new portsAssign port numbers serially: new connections have new ports
u u
Unix starts at 1024 Unix starts at 1024
u u
this fails if we wrap around within 1 MPL this fails if we wrap around within 1 MPL
uu
also fails of computer crashes and we restart with 1024 also fails of computer crashes and we restart with 1024
nn
Assign initial sequence numbers seriallyAssign initial sequence numbers serially
u u
new connections may have same port, but new connections may have same port, but seq
seq # differs
u u
fails on a crash fails on a crash
nn
Wait 1 MPL after boot up (30s to 2 min)Wait 1 MPL after boot up (30s to 2 min)
uu
this flushes old packets from network this flushes old packets from network
u u
used in most Unix systems used in most Unix systems
Problem really is thatProblem really is that SYNs
SYNs themselves are not protected with
themselves are not protected with
sequence numberssequence numbers
n n
3-way handshake protects against delayed SYNs3-way handshake protects against delayed
SYNs
At receiver, from a gap in sequence spaceAt receiver, from a gap in sequence space
u u
send a send a
nack nack to the sender
to the sender
n n
At sender, by looking at cumulative acksAt sender, by looking at cumulative
acks, and
, and timeing
timeing out if no
out if no
ack for a whileack
for a while
uu
need to choose timeout interval need to choose timeout interval