3rd Edition Chapter 2 by chenboying

VIEWS: 5 PAGES: 16

									       EECS 325/425, Fall 2005

            November 11


     Quiz #2 Discussions
Introduction to The Link Layer
Error detection and correction

                                 1
Chapter 5: The Data Link Layer
Our goals:
 understand principles behind data link layer
  services:
      error detection, correction
      sharing a broadcast channel: multiple access protocols
      link layer addressing
      reliable data transfer, flow control: also supported by
       link layer.
 instantiation and implementation of various link
  layer technologies




                                                                 2
Chapter 5 outline
 5.1 Introduction and     5.6 Hubs and switches
    services               5.7 PPP
   5.2 Error detection    5.8 Link Virtualization
    and correction         5.9 Summary
   5.3Multiple access
    protocols
                            Also wireless links
   5.4 LAN addresses
    and ARP
   5.5 Ethernet



                                                      3
Link Layer: Introduction                “link”
Some terminology:
 hosts and routers are nodes
  (bridges and switches too)
 communication channels that
   connect adjacent nodes along
   communication path are links
       wired links
       wireless links
       LANs
 2-PDU is a frame, encapsulates
   datagram




data-link layer has responsibility of
transferring datagram from one node
to adjacent node over a link
                                                 4
 Link layer: context
                                       transportation analogy
 Datagram transferred by
                                          trip from Princeton to Lausanne
  different link protocols over
                                             limo: Princeton to JFK
  different links:                           plane: JFK to Geneva
      e.g., Ethernet on first link,         train: Geneva to Lausanne
       frame relay on intermediate
                                        tourist = datagram
       links, 802.11 on last link
                                        transport segment =
 Each link protocol provides            communication link
  different services                    transportation mode = link layer
      e.g., may or may not provide      protocol
       reliable data transfer over      travel agent = routing algorithm
       link




                                                                             5
Link Layer Services
 Framing
    encapsulate datagram into frame, adding header, trailer

 Link access:
    channel access if shared medium
    „physical addresses‟ used in frame headers to identify
     source, dest
       • different from IP address!
 Reliable delivery
    we learned how to do this already (chapter 3, between
     two end-hosts)!
    seldom used on low bit error link (fiber, some twisted
     pair)
    wireless links: high error rates
       • Q: why both link-level and end-end reliability?


                                                               6
Link Layer Services (more)
 Flow Control:
      pacing between adjacent sending and receiving nodes. Similar to
       transport-layer flow control? when do we need it?

 Error Detection:
      errors caused by signal attenuation, noise.
      receiver detects presence of errors:
        • signals sender for retransmission or drops frame

 Error Correction:
      receiver identifies and corrects bit error(s) without resorting
       to retransmission
 Half-duplex and full-duplex
      with half duplex, both ends of link can transmit, but not at
       same time
                                                                         7
  Adaptors Communicating
                datagram
                           link layer protocol               receiving
sending                                                      node
node
                frame                            frame bus
                             physical link
                adapter                          adapter

  link layer implemented in  receiving side
   “adaptor” (a.k.a. NIC)           looks for errors, reliable
     Ethernet card, PCMCI           transfer, flow control, etc
      card, 802.11 card             extracts datagram, passes
                                     to receiving node
  sending side:
     encapsulates datagram in   adapter is semi-
      a frame                     autonomous
     adds error checking bits,  link & physical layers
      reliable data transfer,
      flow control, etc.                                           8
Chapter 5 outline
 5.1 Introduction and     5.6 Hubs, bridges, and
    services                  switches
   5.2 Error detection      5.7 Wireless links and
    and correction            LANs
   5.3Multiple access       5.8 PPP
    protocols                5.9 ATM
   5.4 LAN addresses        5.10 Frame Relay
    and ARP
   5.5 Ethernet



                                                       9
Error Detection
EDC= Error Detection and Correction bits (redundancy)
D = Data protected by error checking, may include header fields

• Error detection not 100% reliable!
    • protocol may miss some errors, but rarely
    • larger EDC field yields better detection and correction




                                                                  10
Parity Checking
Single Bit Parity:          Two Dimensional Bit Parity:
Detect single bit errors    Detect and correct single bit errors




                                  0                0


FEC (Forward Error Correction) commonly used
multimedia transmission. Advantages?
                                                                   11
Recall: Internet checksum
Goal: detect “errors” (e.g., flipped bits) in transmitted
  segment (note: used at transport layer only)

                             Receiver:
Sender:                       compute checksum of received
 treat segment contents       segment
  as sequence of 16-bit       check if computed checksum
  integers                     equals checksum field value:
 checksum: addition (1‟s        NO - error detected
  complement sum) of             YES - no error detected. But
  segment contents                 maybe errors nonetheless?
 sender puts checksum
  value into UDP checksum
  field

                                                                 12
Checksumming: Cyclic Redundancy
Check
 sender/receiver choose a well-known r+1 bit pattern
  (generator), G. It makes sense to have a highest bit “1”.
 view data bits, D, as a binary number
 goal: choose r CRC bits, R, such that
       <D,R> exactly divisible by G (modulo 2)
      receiver knows G, divides <D,R> by G. If non-zero remainder:
       error detected!
      can detect all burst errors less than r+1 bits
 widely used in practice




                                                                      13
CRC Example
Want:
  D.2r XOR R = nG
equivalently:
   D.2r = nG XOR R
equivalently:
  if we divide D.2r by
  G, want remainder R


                     D.2r
    R = remainder[          ]
                      G


                                14
Food for thought: CRC claims
 Last paragraph in the section

     “Each of the CRC standards can detect burst errors of
      fewer than r+1 bits”

     “Under appropriate assumption, a burst of length greater
      than r+1 bits is detected with probability 1-0.5r ”

     “Each of the CRC standards can detect any odd number
      of errors.”




                                                                 15
Next week
 Multiple access protocols
 Ethernet




                              16

								
To top