You are on page 1of 39

Review up to Lecture 6 2/17/2021

2.3 Internet Layer (IP)


 Systems may be attached to
different networks
 Routing of data
 Routing functions across multiple
networks
 Implemented in end systems and
routers

Note: Systems may be computers, routers,


devices

For/from William Stallings Data & Computer Communications


1
2/17/2021 For/from William Stallings Data & Computer Communications 1

2.3 TCP/IP Encapsulation

For/from William Stallings Data & Computer Communications


2
2/17/2021 For/from William Stallings Data & Computer Communications 2

1
Review up to Lecture 6 2/17/2021

3.1 Terminology (2)

 Direct link
 No intermediate devices
 Point-to-point
 Provides a Direct link
 Only 2 devices share link
 Multi-point
 More than two devices share the
link

3
For/from William Stallings Data & Computer Communications

3.1 Terminology (3)


 Simplex
 Uni-directional data transfer
 e.g. Television
 Half duplex
 Either direction, but only one way
at a time
 e.g. police radio
 Full duplex
 Both directions at the same time
 e.g. telephone

4
For/from William Stallings Data & Computer Communications

2
Review up to Lecture 6 2/17/2021

3.1 Frequency, Spectrum and


Bandwidth
 Time domain concepts
 Continuous signal
 Varies in a smooth way over time
 Discrete signal
 Maintains a constant level then
changes to another constant level
 Periodic signal
 Pattern repeated over time
 Aperiodic signal
 Pattern not repeated over time

5
For/from William Stallings Data & Computer Communications

3.1 Continuous & Discrete


Signals

Continuous and aperiodic

6
For/from William Stallings Data & Computer Communications

3
Review up to Lecture 6 2/17/2021

3.1 Periodic
Signals
 Peak Amplitude (A)
 maximum strength
of signal
 volts
 Frequency (f)
 Rate of change of
signal
 Hertz (Hz) or cycles
per second
 Period = time for
one repetition (T)
 T = 1/f
 Phase ()
 Relative position in
time 7
For/from William Stallings Data & Computer Communications

3.1 Varying Sine Waves

8
For/from William Stallings Data & Computer Communications

4
Review up to Lecture 6 2/17/2021

3.1 Wavelength
 Distance occupied by one cycle
 Distance between two points of
corresponding phase in two
consecutive cycles
  meters : T (period) is in seconds
 Assuming signal velocity v m/s
  = v.T
 f = v
 v = 3*108 ms-1 (speed of light in free
space)
9
For/from William Stallings Data & Computer Communications

π
sin(2πft)

3.1 Addition of
Frequency
Components
π
(1/3)sin(2π(3f)t)

10
For/from William Stallings Data & Computer Communications
(4/π)[sin(2πft)+(1/3)sin(2π(3f)t)]

10

5
Review up to Lecture 6 2/17/2021

3.1 Frequency
Domain

(4/π)[sin(2πft)+(1/3)sin(2π(3f)t)]

11
For/from William Stallings Data & Computer Communications

11

3.1 Spectrum & Bandwidth


 Spectrum
 range of frequencies contained in a
signal
 Absolute bandwidth
 width of a spectrum
 Effective bandwidth
 Often just bandwidth
 Narrow band of frequencies
containing most of the energy
 DC Component
 Component of zero frequency 12
For/from William Stallings Data & Computer Communications

12

6
Review up to Lecture 6 2/17/2021

3.1 Signal with DC Component

(4/π)[sin(2πft)+(1/3)sin(2π(3f)t)]

13
For/from William Stallings Data & Computer Communications

13

3.2 Analog and Digital Data


Transmission

 Data
 Entities that convey meaning
 Signals
 Electrical or electromagnetic
representations of data
 Transmission
 Communication of data by
propagation and processing of
signals

14
For/from William Stallings Data & Computer Communications

14

7
Review up to Lecture 6 2/17/2021

Asynchronous (diagram)

time

15
For/from William Stallings Data & Computer Communications

15

Synchronous - Block Level


 It needs an indication of both the start
and the end of a block
 Use pre-amble and post-amble strings

 e.g. series of SYN (hex 16) characters


 e.g. Synchronous Data Link Control (SDLC) has a
flag 01111110 for pre- and post-amble

 It is more efficient (lower overhead)


than asynchronous transmission

16
For/from William Stallings Data & Computer Communications

16

8
Review up to Lecture 6 2/17/2021

Synchronous (diagram)

[encapsulation to IP level]

Overhead: e.g. HDLC (at layer 2) has 48 bits in its pre-


and post-amble so the overhead on a 1000 byte (8000
bit) block would be 48x100/8048 % = 0.6%

17
For/from William Stallings Data & Computer Communications

17

3.3 Transmission Impairments


Attenuation (1)
 Signal strength falls off with
distance
 this depends on the medium
 Received signal strength:
 must be enough to be detected
 must be sufficiently higher than
noise to be received without error
 Attenuation is an increasing
function of frequency giving
signal distortion
18
For/from William Stallings Data & Computer Communications

18

9
Review up to Lecture 6 2/17/2021

3. 3 Attenuation
 Attenuation at frequency f relative to 1000Hz

19
For/from William Stallings Data & Computer Communications

19

3.3 Delay Distortion (2)

20
For/from William Stallings Data & Computer Communications

20

10
Review up to Lecture 6 2/17/2021

3.3 Noise (1)


 Additional signals are inserted between the
transmitter and the receiver
 Thermal Noise
 Caused by thermal agitation of electrons
 It is uniformly distributed
 It is White noise (broadband noise)

T is temperature in degrees Kelvin


N0 is noise power density in watts per 1 Hz of
bandwidth
k is Boltzmann’s constant = 1.38x10-23 J/K

21
For/from William Stallings Data & Computer Communications

21

3.3 Noise (1)

 Intermodulation Noise
 Signals that are the sum and difference of
the original frequencies sharing a
medium
 Crosstalk
 A signal from one line is picked up by
another line
 Impulse
 Irregular pulses or spikes
 e.g. External electromagnetic
interference
22
For/from William Stallings Data & Computer Communications

22

11
Review up to Lecture 6 2/17/2021

3.3 Noise (3)

23
For/from William Stallings Data & Computer Communications

23

3.4 Communication Channel


Capacity: Nyquist Channel
Bandwidth : 1

 Data rate of a binary signal


 2Bc bits per second (1 bit per
half cycle or signal element)
 Bandwidth required is
 Bc Hertz
 A 3100 Hz voice channel can
therefore carry 6200 bps

24
For/from William Stallings Data & Computer Communications

24

12
Review up to Lecture 6 2/17/2021

3.4 Communication Channel


Nyquist Bandwidth : 2
 Data rate of an Multi-level
signal in signal element
 Each signal element carries one
of M voltage levels representing
the value of log2 M bits [this is
not the same as PSK or QPSK or
FSK ]
 2Bc log2 M bits per second
 M = 8 gives 6B bits per second and
a 3100 Hz voice channel could then
carry 18,600 bps

25
For/from William Stallings Data & Computer Communications

25

3.4 Channel Capacity


 Signal to Noise Ratio

26
For/from William Stallings Data & Computer Communications

26

13
Review up to Lecture 6 2/17/2021

3.4 Shannon capacity

 Maximum channel capacity C

C = Bc log2 (1 + SNR)

for a bandwidth of Bc Hertz


(note SNR is a ratio here and not
dB)
 The ratio C/Bc is the maximum
theoretical bandwidth efficiency
27
For/from William Stallings Data & Computer Communications

27

3.4 Shannon capacity


Example: Spectrum of 3 to 4 MHz
SNRdB = 24dB then
Bc = 4-3 MHz = 1 MHz
SNRdB = 24dB = 10 log10(SNR)
SNR = 251
C = Bc log2(SNR+1) = 1x106log2(252) =>
8Mbps

Also from Nyquist Bandwidth relationship


C = 2 Bc log2M
where M is levels per signal element
so log2M = 8/2 = 4
so M = 16 levels
Also remember Signal Energy /bit to Noise power density per Hertz is
important

28
For/from William Stallings Data & Computer Communications

28

14
Review up to Lecture 6 2/17/2021

4.1 Point-to-point Transmission


Characteristics of Guided Media

29
For/from William Stallings Data & Computer Communications

29

4.1 Attenuation of Typical


Guided Media

30
For/from William Stallings Data & Computer Communications

30

15
Review up to Lecture 6 2/17/2021

5 Encoding Schemes

 Binary data is encoded for


transmission using, for example
 Nonreturn to Zero-Level (NRZ-L)
 Nonreturn to Zero Inverted (NRZI)
 Bipolar -Alternate Mark Inversion (AMI)
 Pseudoternary
 Manchester
 Differential Manchester
 Details follow in later slides

31
For/from William Stallings Data & Computer Communications

31

Comparison of Encoding
Schemes : 2 Signal Spectrum

32
For/from William Stallings Data & Computer Communications

32

16
Review up to Lecture 6 2/17/2021

Non-return to Zero: 2
NRZ-L : 1

 Two different voltages for 0 and 1 bits


 The voltage is constant during a bit interval
 no transition i.e. no return to zero voltage
 e.g. NRZ can use the absence of voltage for a zero, and
a constant positive voltage for a one

33
For/from William Stallings Data & Computer Communications

33

Non-return to Zero: 2
NRZ-L : 1

 Two different voltages for 0 and 1 bits


 The voltage is constant during a bit interval
 no transition i.e. no return to zero voltage
 e.g. NRZ can use the absence of voltage for a zero, and
a constant positive voltage for a one

34
For/from William Stallings Data & Computer Communications

34

17
Review up to Lecture 6 2/17/2021

Multilevel Binary : 1
 Use more than two levels
Opposite levels

(Alternate Mark Inversion)

Opposite levels
 See following slides
35
For/from William Stallings Data & Computer Communications

35

Biphase : 1
Manchester
 Used by IEEE 802.3
 A transition occurs in the middle of each bit period
 A transition serves as both clock and data
 Low to high represents a binary one
 High to low represents a binary zero

36
For/from William Stallings Data & Computer Communications

36

18
Review up to Lecture 6 2/17/2021

Biphase : 2
Differential Manchester
 Used by IEEE 802.5
 A mid-bit transition is clocking only
 A transition at the start of a bit period
represents a binary zero
 No transition at the start of a bit period
represents a binary one
 Note: this is a differential encoding
scheme

37
For/from William Stallings Data & Computer Communications

37

Scrambling techniques : 4
B8ZS : 1
 Based on Bipolar-Alternate Mark Inversion
 If an octet of all zeros is present,
 and the last voltage pulse preceding it was positive,
encode as 000+-0-+
 and last voltage pulse preceding it was negative,
encode as 000-+0+-

V- violation
- + 0+-
of alternating 1’s

38
For/from William Stallings Data & Computer Communications

38

19
Review up to Lecture 6 2/17/2021

Scrambling techniques : 6
High Density Bipolar 3 Zeros
 HDB3
 Based on bipolar-AMI
 String of four zeros changed with one
pulse for an odd # pulses or two pulses
for an even # pulses since last
substitution (V causes voltage on line)

even even

Violation: same as previous different from last V


different from last V 39
For/from William Stallings Data & Computer Communications

39

5.2 Modulation
Frequency Shift Keying : 1
 Values are represented by
different frequencies (near carrier
frequency)

40
For/from William Stallings Data & Computer Communications

40

20
Review up to Lecture 6 2/17/2021

5.2 Digital Data, Analog Signals


FSK on Voice Grade Line

1170 2125

Full Duplex transmission

41
For/from William Stallings Data & Computer Communications

41

5.2 Digital Data, Analog Signals


Phase Shift Keying : 3
 Differential PSK
 Phase shifted relative to previous
transmission rather than some
reference signal
 “0” is same phase as previous bit
 “1” is opposite phase of previous bit

Differential Phase Shift Keying

42
For/from William Stallings Data & Computer Communications

42

21
Review up to Lecture 6 2/17/2021

5.2 Digital Data, Analog Signals


Quadrature PSK : 1
 More efficient use of bandwidth as
each signal element represents
more than one bit
 e.g. shifts of /2 (90o)
 Each element represents two bits

43
For/from William Stallings Data & Computer Communications

43

5.2 Digital Data, Analog Signals


Quadrature PSK : 3
 A 9600bps modem use 12 phase angles ,
four of which have two amplitudes
 each signal element represents 4 bits

 D = R/(bits per signal element)


= R/log2(#signal levels)
 D = modulation rate (baud rate)
 R = data rate in bps = 9600
 number of different signal levels = 16
(M in Ed10)
 bits per signal element= 4 (L in Ed10)

 D = 9600/4 = 2400 baud

44
For/from William Stallings Data & Computer Communications

44

22
Review up to Lecture 6 2/17/2021

Performance of Digital to
Analog Modulation Schemes : 4

( )
d
B

Eb/N0 = (S/R)/N0
= [S/R]/[N/BT]
= [S/N][BT/R]
[Eb/N0]dB = ( [S/N] /[R/BT] )dB

45
For/from William Stallings Data & Computer Communications

45

5.3 Now Change point of view to


the baseband user Analog Signal
 Digitization
 Conversion of analog data into
digital data
 Digital data can then be
 transmitted using
 NRZ-L or
 a code other than NRZ-L
 converted to an analog signal using
modulation techniques

46
For/from William Stallings Data & Computer Communications

46

23
Review up to Lecture 6 2/17/2021

Analog Data, Digital Signals : 2

 Digitization
 An analogue signal is
converted to a digital
signal using a quantizer
 The first step produces
samples in a Pulse
Amplitude Modulated
Signal
(PAM samples)

47
For/from William Stallings Data & Computer Communications

47

Analog Data, Digital Signals : 3


Digitization
Equal quantization steps

48
For/from William Stallings Data & Computer Communications

48

24
Review up to Lecture 6 2/17/2021

Analog Data, Digital Signals : 4


 A PAM signal may converted to
 Pulse code modulation (PCM)

3 bit converter

Ts

49
For/from William Stallings Data & Computer Communications

49

Nyquist Sampling Theorem


applied to baseband analog
user signals Bu
 If a signal is sampled at regular
intervals at a rate higher than
twice the highest signal
frequency, the samples contain
all the information of the
original signal
 Voice data is limited to below
4000Hz

50
For/from William Stallings Data & Computer Communications

50

25
Review up to Lecture 6 2/17/2021

Pulse Code Modulation(PCM) : 2


changes a sampled baseband
user signal to a binary signal

 Bu = 4000Hz requires at least


8000 samples per second
according to the Nyquist
baseband sampling theorem
 8-bit samples
 8*8000 => 64 kbps
 Each PAM sample is assigned a
digital value
51
For/from William Stallings Data & Computer Communications

51

Pulse Code Modulation(PCM) : 3


 An n = 4-bit system gives 24 =
16 quantization levels
 Quantized signal issues
 Quantizing error or noise is added

 SNRQuantization = (20 Log10(2n) + 1.76)dB


 = (6.02n + 1.76)dB

52
For/from William Stallings Data & Computer Communications

52

26
Review up to Lecture 6 2/17/2021

Pulse Code Modulation(PCM) : 4

 An n=8 bit sample gives 28 =


256 levels
 SNRQuantization = 49.92 dB
 For telephony
 8000 samples per second of 8 bits
each gives 64 kbps
 Quality is comparable to analog
transmission

53
For/from William Stallings Data & Computer Communications

53

At this point the course content


looked at advanced analog
modulation/digital modulation
schemes
 These are the basis for analog
carrier systems.
 The first one is sufficient for
understanding the original idea
behind the telephone channels
and the modulation to higher
frequencies to carry more voice
channels. Others need to be
known for general questions.
54
For/from William Stallings Data & Computer Communications

54

27
Review up to Lecture 6 2/17/2021

Analog
Modulation

55
For/from William Stallings Data & Computer Communications

55

Ch17.3 Spread Spectrum

 Analog or digital data


 Analog signal
 Spread data over a wide bandwidth
 Makes jamming and interception
harder

56
For/from William Stallings Data & Computer Communications

56

28
Review up to Lecture 6 2/17/2021

Spread Spectrum

 Frequency hopping
 The signal is broadcast over a
pseudo randomly chosen set of
frequencies
 Direct Sequence
 Each bit is represented by multiple
bits in the transmitted signal
 this is called a chipping code
 the original data stream is XOR’d with
a pseudo random bit stream which
causes phase shifts in the transmitted
carrier
57
For/from William Stallings Data & Computer Communications

57

Spread Spectrum
Frequency Hopping

s(t)

Lookup table

58
For/from William Stallings Data & Computer Communications

58

29
Review up to Lecture 6 2/17/2021

Spread Spectrum
Frequency hopping

FSK: Frequency Shift Keying


BPSK: Binary Phase Shift Keying

59
For/from William Stallings Data & Computer Communications

59

CH.17.4 Spread Spectrum


Direct Sequence

60
For/from William Stallings Data & Computer Communications

60

30
Review up to Lecture 6 2/17/2021

S6.3
Error Detection - Parity Bit
 Additional bits added by the
transmitter for an error detection
code
 Parity
 Value of the parity bit is such that the
character has even (even parity) or
odd (odd parity) number of ones
 111001 => 1110011 for odd parity
 111001 => 1110010 for even parity
 The problem is that an even number
of bit errors goes undetected

61
61
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

61

0 1 1 1 1 1 0 1
0 1 1 1 0 0 1 0
0 0 1 1 0 0 1 1
0 1 0 0 0 1 0 0
1 0 1 1 1 1 1 0
1 1 0 0 0 1 1 0
62
62
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

62

31
Review up to Lecture 6 2/17/2021

6.4 Internet Checksum


 This uses the one’s complement addition
of unsigned binary numbers
 For example:

1101
0011 1011
11000
+110 + 1
0 1001
Here there
1111 is an end
63
For/from
For/from
William
William
Stallings
Stallingsaround
DataData
& Computer
& Computer
Communications
Communications
63

63

Example Of Internet Checksum

64
64
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

64

32
Review up to Lecture 6 2/17/2021

6.5
Cyclic Redundancy Check

 For a block of k bits the transmitter


generates an n bit sequence
 Transmit k+n bits which is exactly
divisible by some number P
 The receiver divides the frame by
that same number P
 If there is no remainder, assume there is
no error

65
65
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

65

Error Detection - Modulo 2


Cyclic Redundancy Check : 6

66
66
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

66

33
Review up to Lecture 6 2/17/2021

Error Detection - Modulo 2


Cyclic Redundancy Check : 7

+R

67
67
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

67

Error Detection - Polynomial


Cyclic Redundancy Check : 4
The form of Ed.10 is different and less intuitive

P= 110101

FCS bits

68
68
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

68

34
Review up to Lecture 6 2/17/2021

Polynomial C R C : 4
P= 110101

69
69
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

69

Problem 6.11

 The continuation of the table in Fig.6.6


looks like this:

70
70
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

70

35
Review up to Lecture 6 2/17/2021

6.6 Error Correction

71

6.6 Error Correction


 Block Code Principles

Hamming Distance d(V1, V2)


between two n-bit binary sequences is the
number of bits in which the numbers
disagree (are different).

 011011 and
110001 gives a Hamming Distance of 3

72
72
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

72

36
Review up to Lecture 6 2/17/2021

6.6 Error Correction


 Block Code Principles

A k-bit data sequence is coded into an n-


bit code word, (n,k)

The minimum Hamming Distance of a code


is

dmin = min[d(wi,wj)] for i NE j

73
73
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

73

6.6 Error Correction


Energy/bit point of
uncoded comparable to
10-6 coded point

74
74
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

74

37
Review up to Lecture 6 2/17/2021

Hamming (7,4) code


(This code has 112 invalid codewords and a Hamming Distance
of 3 = weight of non-zero codeword with smallest weight
Information Codeword Weight
b1 b2 b3 b4 b1 b2 b3 b4 b5 b6 b7 w(b)

0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 1 1 1 1 4
0 0 1 0 0 0 1 0 1 0 1 3
0 0 1 1 0 0 1 1 0 1 0 3
0 1 0 0 0 1 0 0 0 1 1 3
0 1 0 1 0 1 0 1 1 0 0 3
0 1 1 0 0 1 1 0 1 1 0 4
0 1 1 1 0 1 1 1 0 0 1 4
1 0 0 0 1 0 0 0 1 1 0 3
1 0 0 1 1 0 0 1 0 0 1 3
1 0 1 0 1 0 1 0 0 1 1 4
1 0 1 1 1 0 1 1 1 0 0 4
1 1 0 0 1 1 0 0 1 0 1 4
1 1 0 1 1 1 0 1 0 1 0 4
1 1 1 0 1 1 1 0 0 0 0 3 75
1 1 1 For/from
1 William Stallings 1
Data1& Computer
1 1 1 Communications
1 1 7

75

Stop and Wait

 Source transmits frame


 Destination receives frame and
replies with an
acknowledgement
 Source waits for an ACK before
sending the next frame
 Destination can stop flow by not
ACK’ing
 Works well for a few large
frames 76

76
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

76

38
Review up to Lecture 6 2/17/2021

Sliding Windows Flow Control


 Allows multiple frames to be in transit
 The receiver buffer is W frames long
 The transmitter can send up to W
frames without an ACK
 Each frame is numbered
 An ACK includes the number of the next
frame expected
 The sequence number is bounded by
the field size (k)
 Frames are numbered modulo 2k
77

77
For/from
For/from
William
William
Stallings
Stallings
DataData
& Computer
& Computer
Communications
Communications

77

At this point we can amongst other things


1 Determine bandwidths of mathematical expressions, understand
and apply noise relationships, signal distortion, handle
encapsulation in stacks
2 recognize and interpret and apply encoding techniques, bit
encoding, and modulation techniques
3 answer any question given a baseband user signal of bandwidth Bu
and requiring the bit rate R given an oversampling rate (multiple
of Nyquist sampling rate) to meet a SNRquant . We can also work
out any problem with any combination of knowns and unknowns
for the above and use quantization.
4 work out the theoretical capacity C in bps of a Communication
Channel of bandwidth Bc given the SNR of the channel. Or any
combination problem using known and unknown C, Bc and SNR.
5 move between 2 and 3, and we can
6 determine the Nyquist bit rate’s multilevels required in a signal
element to transmit a required bit rate R over a communication
bandwidth BC
7 solve parity and checksum calculations
8 calculate and apply CRC and FCS and show how it works in
hardware

78
For/from William Stallings Data & Computer Communications

78

39

You might also like