Chapter 2 Physical - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Chapter 2 Physical

Description:

Network delays (bandwidth, propagation, congestion), server delays, time of day, location, ... HDLC denotes beginning and end of a packet/frame with '01111110' flag ... – PowerPoint PPT presentation

Number of Views:35
Avg rating:3.0/5.0
Slides: 25
Provided by: profri
Category:
Tags: chapter | physical

less

Transcript and Presenter's Notes

Title: Chapter 2 Physical


1
Chapter 2Physical Data-Link Layers
  • Professor Rick Han
  • University of Colorado at Boulder
  • rhan_at_cs.colorado.edu

2
Announcements
  • Read all of Chapter 1,
  • Read Chapter 2, sections 2.1-2.8, skip Section
    2.9 Network Adaptors
  • Lecture slides for this week will be online soon
  • Follow the Lectures link on class Web site
  • Homework 1 up soon on Web, due date either next
    Thursday or Tues 1/28
  • Today, Chapters 1 and 2

3
Homework 1 Ping
  • Ping program allows you to send a packet to a
    host and have it echoed back
  • Used to probe the network for roundtrip times
    packet losses
  • Is server is alive?
  • What might influence roundtrip times?
  • Network delays (bandwidth, propagation,
    congestion), server delays, time of day,
    location,

4
The Layered Network Stack
Internet Stack
Application Layer
Transport Layer (TCP/UDP)
Network Layer (IP)
Data Link Layer
Physical Layer
5
Layer 1 The Physical Layer
  • Host A encodes the bit into an analog signal.
    Host B decodes the analog signal into a received
    bit.

6
Encoding Mapping Digital Bits to Analog Waveforms
  • 1 -gt 5 volts
  • 0 -gt -5 volts on copper wire
  • Could also correspond to light intensity on
    optical fiber
  • In general, called Pulse Amplitude Modulation
    (PAM)

7
Encoding Mapping Digital Bits to Analog
Waveforms (2)
  • The waveform below is a special form of PAM
    called NRZ (Non-Return to Zero)
  • NRZ Problems
  • DC bias/drift, aka baseline wander
  • Losing clock synchronization

8
Encoding Mapping Digital Bits to Analog
Waveforms (3)
  • To fix baseline wander, encode bits as
    transitions, rather than levels
  • this is called Manchester encoding
  • 1 -gt upward transition, 0 -gt downward
    transition
  • D.C. balanced to zero and easy to recover clock
  • 10 Mbps Ethernet uses Manchester encoding

9
Encoding Mapping Digital Bits to Analog
Waveforms (4)
  • Some other possible D/A mappings
  • Pulse Width Modulation Morse code
  • Pulse Position Modulation
  • FSK (Frequency Shift Key) encodes bits as diff.
    frequencies. 1200 bps modems used FSK.
  • 100 Mbps Fast Ethernet has 3 possible physical
    layers
  • 100-BaseTX 2 twisted pair copper wires
  • 100-BaseFX Optical fiber using 4B/5B NRZI
    signalling (see text)
  • 100-BaseT4 4 twisted pair copper wires
  • Gigabit Ethernet supports fiber optics and copper
    wires

10
Sending More Bits Per Second
  • How would you increase the bit rate?
  • Pack the pulses tighter together
  • There are other more clever ways
  • What problems might you encounter when packing
    pulses more tightly?
  • Noise/interference
  • Smearing of the pulse

11
Sending More Bits Per Second (2)
Wire
  • Fourier transform theory shows that a square
    pulse is sum of many different sinusoidal
    frequencies
  • Example a stereo equalizer breaks down audio
    into its sinusoidal frequencies
  • High frequencies get attenuated in wire, thereby
    smearing the square pulse
  • Closely packing time slots causes more smear
    from previous slot to interfere with current slot
  • This is called InterSymbol Interference (ISI)

12
Sending More Bits Per Second (3)
  • Can send more bits per time slot using
    multi-level D/A converter
  • 8 discrete levels
  • 111 -gt 7 V, , 000 -gt -7 V
  • 100110 -gt 1, 5,

Symbols
  • 3 bits per symbol

13
Sending More Bits Per Second (4)
  • Transmit a sequence of symbols S11, S25, S3,
  • Baud rate Symbols/sec
  • If baud rate is 1 symbol/sec, then bit rate 3
    bits/sec
  • Tripled the bit rate!
  • Limitations noise
  • Datam(t)Sm(t)SqWv(t-mT)
  • Where Sm(t) is the level of mth symbol, T
    duration of each symbol, ttime, SqWv is square
    wave

14
Sending More Bits Per Second (5)
  • Can send more bits over different frequencies
  • AM/FM radio Frequency Division Multiplexing
    (FDM)

Frequency (Hz)
GHz
KHz
MHz
  • Example send data at 3 kHz and 6 kHz
  • Modulate one bit stream Sm(t) up to 3000 Hz,
    Sm(t)cos(2p3000t) , similarly Sm(t) at 6000 Hz
  • Datam(t) Sm(t)cos(2p3000t) Sm(t)cos
    (2p6000t) simplified sq wave not
    shown
  • demodulate down by multiplying by cosines again
    and low-pass filtering

15
Sending More Bits Per Second (6)
  • Can send more bits over the same frequency!
  • Datam(t) Sm(t)cos(2p3000t) Sm(t)sin
    (2p3000t)
  • This is called Quadrature Amplitude Modulation
    (QAM).
  • If Sm(t), and Sm(t) both have 4 levels, then
    this is called 16-QAM. 9600 bps modems use this.
    Baud?

16
Code Division Multiple Access (CDMA)
  • Another physical layer signalling technique
  • In addition to multiplying the data signal by a
    cosine, you also multiply by another signal a
    chipping sequence
  • spreads the signal
  • Different chipping sequences are orthogonal, so
    multiple users can share the same bandwidth
  • CDMA is a form of spread spectrum
  • As an aside, frequency hopping is another form of
    spread spectrum, diff. from CDMA
  • Wireless Ethernet 802.11b uses this physical
    layer technique

17
Physical Layer Effects
  • Goal maximize the Signal-to-Noise ratio (SNR) to
    minimize the probability of bit error, then pass
    the bit up to Data-Link Layer
  • Unreliability
  • due toSmearing, Interference, (Wireless
    shadowing, multi-path, doppler, )
  • Apply advanced adaptive filtering and digital
    signal processing (DSP) to improve SNR
  • Propagation Delay
  • Speed of light c 3x108 m/s
  • Over copper wires, propagation speed is 2/3 of c
  • Satellite links have long prop. delays (120 ms
    one-way)
  • Interactivity requires lt400 ms roundtrip

18
Layer 2 The Data Link Layer
  • Next Problem How do I send a message from Host A
    to Host B?
  • Data Link Layer, also called Layer 2, ensures
    that host B can decode a digital message from a
    stream of bits sent by host A
  • Examples PPP (Point-to-Point Protocol), HDLC,
    LAPB, LAPD, Frame Relay,

19
The Data Link Layer (cont.)
  • A Data Link Layer Protocol implements
  • Delimiting/framing of a message
  • Fragmenting of a long message
  • Retransmission of a lost message

1011000
Host A
Host B
20
Defining a Protocol
  • A protocol is an agreement between two parties or
    endpoints as to how information is to be
    transmitted
  • A protocol implements this agreement via
  • A Header
  • How each endpoint responds to control info in the
    header ( external input)

Host A
Host B
21
Framing
Receivers A/D
data
0110011011011000100110100001110001001
  • How would you identify the start of the data?
  • How would you identify the end of the data?
  • What if this flag appears in the data?
  • Character stuffing for byte-oriented protocols
  • Bit stuffing for bit-oriented protocols
  • What if a bit error causes a flag to appear in
    data?

22
Character/Byte Stuffing
  • BiSync and PPP (common over modems)
  • Data is divided into 8-bit bytes
  • Byte boundaries synchronized btwn sender and
    receiver
  • Define a special start-of-packet N-byte flag,
    e.g. let flag be X (one byte flag)
  • Stuff X in data replace X with escape character
    E (DLE in textbook) and X, i.e X -gt (E, X)
  • Stuff E in data replace E with (E, E)
  • At rcvr, first X is start of packet (variants
    exist)

23
Character/Byte Stuffing (2)
  • Sentinel X -gt X, at both start and end of packet
  • Data X -gt (E,X)
  • Data E -gt (E,E)
  • Example Data (E,X) -gt (E,E,E,X)
  • Example Trailing E -gt (E,E) followed by last X

24
Bit Stuffing
01001000001111110000001110001001
  • HDLC uses this
  • Similar to byte stuffing, except bit stuffing is
    not confined to byte boundaries
  • HDLC denotes beginning and end of a packet/frame
    with 01111110 flag
  • Since 01111110 may occur anywhere (across byte
    boundaries) in data, then stuff it
  • At sender, after 5 consecutive ones, insert a 0
  • At receiver, 0111110 gt stuffing, so destuff,
    01111110 gt end of frame, 01111111 gt error
Write a Comment
User Comments (0)
About PowerShow.com