Académique Documents
Professionnel Documents
Culture Documents
Chapter 2
Getting Connected
Chapter 2
Problems
In Chapter 1 we saw networks consists of links
interconnecting nodes. How to connect two
nodes together?
We also introduced the concept of cloud
abstractions to represent a network without
revealing its internal complexities. How to
connect a host to a cloud?
n
n
n
n
n
n
n
Chapter 2
Chapter Outline
Perspectives on Connecting nodes
Encoding
Framing
Error Detection
Reliable Transmission
Ethernet and Multiple Access Networks
Wireless Networks
n
n
Chapter 2
Chapter Goal
Exploring different communication medium over
which we can send data
Understanding the issue of encoding bits onto
transmission medium so that they can be
understood by the receiving end
Discussing the matter of delineating the
sequence of bits transmitted over the link into
complete messages that can be delivered to the
end node
Discussing different technique to detect
transmission errors and take the appropriate
action
n
n
Chapter 2
Chapter 2
Perspectives on Connecting
Chapter 2
n
n
Chapter 2
Links
All practical links rely on some sort of electromagnetic
radiation propagating through a medium or, in some
cases, through free space
One way to characterize links, then, is by the medium
they use
n
Chapter 2
Links
Chapter 2
Links
Electromagnetic spectrum
10
Chapter 2
Links
How links are used
For last miles, use cost effective links as
shown in the next slide
n For interconnecting cities, you need long
distance and very high speed links, such as
fiber. The fiber uses SONET (Synchronous
Optical Network).
n Links inside buildings or a campus Local
Area Networks
n
11
Chapter 2
Links
12
Chapter 2
Encoding
13
Chapter 2
Encoding
n
Baseline wander
n
14
Chapter 2
Encoding
Problem with NRZ
2.
Clock recovery
n
15
Chapter 2
Encoding
NRZI
Non Return to Zero Inverted
n Sender makes a transition from the current
signal to encode 1 and stay at the current
signal to encode 0
n Solves for consecutive 1s
n Do nothing about consecutive 0s
n
16
Chapter 2
Encoding
Manchester encoding
n
n
17
Chapter 2
Encoding
n
18
Chapter 2
Encoding
19
Chapter 2
Encoding
4B/5B encoding
n
Chapter 2
4B/5B Encoding
21
Chapter 2
Encoding
n
4B/5B encoding
0000 11110
0001 01001
0010 10100
..
..
1111 11101
16 left
11111 when the line is idle
00000 when the line is dead
00100 to mean halt
13 left : 7 invalid, 6 for various
control signals
22
Chapter 2
Framing
We are focusing on packet-switched networks,
which means that blocks of data (called frames
at this level), not bit streams, are exchanged
between nodes.
It is the network adaptor that enables the nodes
to exchange frames.
Chapter 2
Framing
Chapter 2
Framing
n
Byte-oriented Protocols
n
25
Chapter 2
Framing
BISYNC sentinel approach
n
n
n
n
n
26
Chapter 2
Framing
27
Chapter 2
Framing
n
01111110
28
Chapter 2
Framing
29
Chapter 2
PPP Framing
n
n
30
Chapter 2
Framing
Byte-counting approach
Instead of detecting the end of frame with a
sentinel value, we put the byte count in the
header
n DDCMP in DECnet
n count : how many bytes are contained in the
frame body
n If count is corrupted
n
n
n
n
Chapter 2
Framing
32
Chapter 2
Framing
n
Chapter 2
Framing
HDLC Protocol
n
34
Chapter 2
Framing
HDLC Protocol
n
5 consecutive 1s
n
35
Chapter 2
Error Detection
n
n
n
n
Detecting Error
Correction Error
Two approaches when the recipient detects an
error
n
Chapter 2
Error Detection
Common technique for detecting transmission
error
n
37
Chapter 2
Error Detection
n
Identical No error
Differ Error
Poor Scheme ???
n
n
38
Chapter 2
Error Detection
n
Receiver
m
39
Chapter 2
Two-dimensional parity
n
40
Chapter 2
Two-dimensional parity
Two-dimensional parity catches all 1-, 2-, and 3bit errors and most 4-bit errors
41
Chapter 2
Two-dimensional parity
42
Chapter 2
43
n
n
Chapter 2
Chapter 2
45
Chapter 2
1s complement of -5 is 11010
1s complement of -3 is 11100
11010 + 11100 = 10110, with carry
So the result is 10110 + carry = 10111, which is -8 in 1s
complement
46
Chapter 2
n
n
n
Chapter 2
Checksum Comment
Chapter 2
49
Chapter 2
50
n
n
n
n
n
n
n
n
Chapter 2
51
Chapter 2
Chapter 2
53
Chapter 2
54
Chapter 2
55
Chapter 2
Let P(x) represent what the sender sent and P(x) + E(x) is the
received string. A 1 in E(x) represents that in the corresponding
position in P(x) the message the bit is flipped.
We know that P(x)/C(x) leaves a remainder of 0, but if E(x)/C(x)
leaves a remainder of 0, then either E(x) = 0 or C(x) is factor of
E(x).
When C(x) is a factor of E(x) we have problem; errors go
unnoticed.
If there is a single bit error then E(x) = xi, where i determines the
bit in error. If C(x) contains two or more terms it will never divide
E(x), so all single bit errors will be detected.
56
Chapter 2
57
Chapter 2
CRC-8 = x8+x2+x+1
CRC-10 = x10+x9+x5+x4+x+1
CRC-12 = x12+x11+x3+x2+x+1
CRC-16 = x16+x15+x2+1
CRC-CCITT = x16+x12+x5+1
CRC-32 =
x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1
58
Chapter 2
59
Chapter 2
CRC Exercise
60
Chapter 2
Reliable Transmission
n
n
n
n
n
Chapter 2
Reliable Transmission
62
Chapter 2
Reliable Transmission
63
Chapter 2
64
Chapter 2
Chapter 2
66
Chapter 2
Chapter 2
Bits per frame Time per frame = 1024 8 0.045 = 182 Kbps
Or about one-eighth of the links capacity
68
Chapter 2
69
Chapter 2
70
Chapter 2
71
Chapter 2
WHY?
72
Chapter 2
73
Chapter 2
74
Chapter 2
Accept it
Now the receiver needs to decide whether or not to send an ACK
75
Let SeqNumToAck
n
Chapter 2
76
Chapter 2
LAF = 9
Chapter 2
The longer it takes to notice that a packet loss has occurred, the
more severe the problem becomes
78
Receiver sends NAK for frame 6 when frame 7 arrive (in the previous
example)
n
Additional Acknowledgement
n
Chapter 2
Selective Acknowledgement
n
79
Chapter 2
Delay Bandwidth
80
Chapter 2
Finite size
n
81
Chapter 2
Is this sufficient?
82
Chapter 2
n
n
n
Is this sufficient?
Depends on RWS
If RWS = 1, then sufficient
If RWS = SWS, then not good enough
83
Chapter 2
84
Chapter 2
Reliable
Preserve the order
n
n
Flow control
n
85
Chapter 2
86