1 / 28

Data Link Layer

Data Link Layer. IS250 Spring 2010 chuang@ischool.berkeley.edu. 802.3 Ethernet 802.11 WiFi 802.16 WiMax DSL Cable modem Cellular (3G, 2.5G, …) SONET, STS, OC …. LAN: local area network MAN: metropolitan area network WAN: wide area network Backbone network Access network

sonnagh
Download Presentation

Data Link Layer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Data Link Layer IS250 Spring 2010 chuang@ischool.berkeley.edu

  2. 802.3 Ethernet 802.11 WiFi 802.16 WiMax DSL Cable modem Cellular (3G, 2.5G, …) SONET, STS, OC … LAN: local area network MAN: metropolitan area network WAN: wide area network Backbone network Access network The “last mile” aka “first mile” aka “local loop” Network Technologies

  3. Link Layer Functionalities • Framing • Error detection or correction • Media access control

  4. Framing • Message transmitted over link as string of 0’s and 1’s • Sender and receiver has to agree where is the beginning and end of a message  framing • A frame is a link layer message unit • The prelude and/or postlude are special characters or character sequences that help establish the beginning and end of the frame • The header contains control information that is used by the network (e.g., network address; error detection) • The payload contains data that is meaningful only for the sender and receiver

  5. Dealing with Errors • Data can be corrupted during transmission • Bits lost • Bit values changed • Frame includes additional information to help detect or correct errors • Set by sender; checked by receiver • Statistical guarantee

  6. Error Detection M f • Message M • H = f(M) • Transmitted T = M || H • Received R = M’ || H’ • If H’ = f(M’) then no error H M H M’ H’

  7. Error Detection Schemes • Parity • Send an additional parity bit (H) per character • Even parity: if # of 1’s in character is odd, H = 1; else H = 0 • Odd parity: if # of 1’s in character is odd, H = 0; else H = 1 • Cannot detect even numbers of bit errors • Checksum • Treat data as sequence of integers • Compute and send arithmetic sum (H) • Handles multiple bit errors, but not all errors • Cyclic Redundancy Check (CRC)

  8. Checksum Examples • Checksum computed over data • Checksum appended to frame • 2nd bit reversed in each item, but checksum is the same

  9. Cyclic Redundancy Check • CRC is a mathematical function of data, computed as the remainder from a division of two binary numbers, one representing the message M, and the other a fixed divisor P. • Example: CRC-CCITT: • P(X) = x16 + x12 + x5 + 1; or • P = 10001000000100001 • CRC-CCITT can detect: • all single/double bit errors • All odd-numbered bit errors • 100% of burst errors <= 16 bits • 99.997% of burst errors = 17 bits • 99.998% of burst errors >= 18 bits

  10. CRC Algorithm • CRC can be computed and verified using binary long division • Numerical example • Use CRC scheme with P(x) = x5 + x4 + x + 1 • P: 110011 (6 bits) • Message M: 11100011 (8 bits) • Divide M by P; use the remainder as the CRC (what we call ‘H’ on slide 6) [Note: remainder one bit shorter than P] • Transmitted message T = M || H • Receiver performs CRC verification on received message T’: divide T’ by P will produce zero remainder if no error

  11. Numerical Example        10110110 110011 ) 1110001100000 110011            101111 110011             111000 110011               101100 110011                111110 110011 11010 = H T = M || H = 1110001111010

  12. Verification        10110110 110011 ) 1110001111010 110011            101111 110011             111001 110011               101010 110011                110011 110011 00000 No error since remainder is 0

  13. Ethernet Wi-Fi Media Access Control • How do multiple, independent computers coordinate access to a shared communication medium?

  14. Local Area Networks • LAN characteristics: • High throughput • Relatively low cost • Distance limitations • Often rely on shared media • Different topologies

  15. Ethernet • Most widely deployed LAN technology • IEEE 802.3 standard • Several generations • Same frame format • Different data rates (10Mbps, 100Mbps, 1Gbps, 10Gbps) • Different media (coax, twisted pair, fiber)

  16. Shared Medium • Shared medium used for all transmissions • Only one station transmit at any time • Stations take turns using medium • Media access control (MAC) policy ensures fairness

  17. Data Transmission in Ethernet • Only one station transmit at any time • Signal propagates across entire cable • All stations receive transmission • CSMA/CD media access scheme

  18. CSMA/CD • Multiple access (MA) • Multiple computers attach to shared media • Each uses same access algorithm • Carrier Sense (CS) • Wait until medium is idle • Begin to transmit frame • Simultaneous transmission possible

  19. CSMA/CD (2) • Two simultaneous transmissions • Interfere with one another • Called a collision • CSMA plus collision detection (CD) • Listen to medium during transmission • Detect whether another station’s signal interferes • Back off from interference and try again

  20. Example

  21. Back-off after Collision • When collision occurs • Wait random time t1, 0 <= t1 <= d • Use CSMA and try again • If second collision occurs • Wait random time t2, 0 <= t2 <= 2d • Double range for each successive collision • Called exponential backoff

  22. Wireless Ethernet (Wi-Fi) • Uses unlicensed spectrum (ISM band)

  23. WLAN Media Access • Limited range • Not all stations receive all transmissions • Cannot use CSMA/CD • Example • Maximum transmission distance is d • Stations 1 and 3 do not receive each other’s transmissions • Known as the “hidden terminal” problem

  24. CSMA/CA • Collision avoidance (CA) • upon sensing idle channel, waits for a random backoff duration before attempting to transmit • RTS/CTS Mechanism • Handshake before data transmission • Request to Send (RTS): “X is about to send to Y” • Clear to Send (CTS): “Y is about to receive from X” • Data frame sent from X to Y • Collisions of control messages possible; but control messages are much shorter than data frames

  25. Addressing in Shared Medium • All stations on shared media receive all transmissions • Each frame contains address of intended recipient • Stations discard any frame addressed to another station • Shared media provide no confidentiality • Network analyzers can run in promiscuous mode • Designed for testing/debugging • Allows network interface to accept all packets

  26. /Size Ethernet Addressing & Frame Format • Each station assigned unique 48-bit (6 byte) address • Known as Ethernet address, MAC address, or Physical address • Address assigned when network interface card (NIC) manufactured • Ethernet frame format:

  27. Ethernet Evolution • Original Ethernet: bus topology • Modern Ethernet: star topology • Ethernet hub: • Propagates each incoming signal to all connections • noise and collisions also propagated • Ethernet switch: • Operates on frames • Does not forward noise or collisions • Understands addresses • Only forwards when necessary • Allows independent transmission on different segments

  28. Layer 2 is not limited to LANs • Backbone operators (e.g., AT&T) deploy and operate long-haul copper-based or fiber-based digital circuits • SONET (Synchronous Optical Network) and SDH (Synchronous Digital Hierarchy) standards support framing, multiplexing, synchronization. OC-192 9.953Gbps OC-768 39.813Gbps

More Related