chapter 6 the data link layer
play

Chapter 6 The Data Link layer 6.1 introduction, 6.5 link - PowerPoint PPT Presentation

Chapter 6 The Data Link layer 6.1 introduction, 6.5 link virtualization: services MPLS 6.2 error detection, 6.6 data center correction networks 6.3 multiple access 6 3 l i l 6 7 6.7 a day in the life of d i h lif f protocols a


  1. Chapter 6 The Data Link layer 6.1 introduction, 6.5 link virtualization: services MPLS 6.2 error detection, 6.6 data center correction networks 6.3 multiple access 6 3 l i l 6 7 6.7 a day in the life of d i h lif f protocols a web request 6 4 LAN 6.4 LANs (play animati n in ppt (play animation in .ppt slide on your own)  addressing, ARP  Ethernet  Ethernet  layer-2 switches  VLANS VLANS 12/5/2017 Data Link Layer (SSL) 6-1 1

  2. Link Layer: context  A link connects two adjacent IP nodes (layer 3) along a path along a path  IP datagram transferred by  IP datagram transferred by different link protocols over different  An Ethernet switch links which may provide different (layer 2) is considered to services ser ces be part of a link be part of a link 12/5/2017 Data Link Layer (SSL) 6-2 2

  3. Link Layer: context  Link can be  Link can be  unit of data: frame , wire which encapsulates an  IP datagram g wireless wireless   IP expects no service LAN (layer 2)  guarantee from links WAN (virtual link)  application application M M transport M H t network network M H n H t data link protocol p t l link l k link M H l H n H t M H l H n H t physical physical frame phys. link trailer trailer adapter card 12/5/2017 Data Link Layer (SSL) 6-3 3

  4. Link Layer Services L nk Layer Serv ces  Framing  Encapsulate datagram with header and trailer  E  Error Detection D t ti n  errors caused by signal attenuation, noise.  receiver detects presence of errors  Error Correction  E C cti n  receiver identifies and corrects bit error(s) without resorting to retransmission  Link access  Link access access protocol for shared channel access   “MAC” addresses used in frame headers to identify source, destination , o different from IP addresses o why both MAC and IP addresses? 12/5/2017 Data Link Layer (SSL) 6-4 4

  5. Link Layer Services (more) L nk Layer Serv ces (more)  Half-duplex and full-duplex  with half duplex (shared channel), nodes at both ends of p ( ), link can transmit, but not at same time  Flow Control  pacing between sender and receiver(s)  pacing between sender and receiver(s)  Reliable delivery between two physically connected devices  we learned how to do this already (chapter 3)  seldom used on low error-rate links (fiber, some twisted pair) pair)  wireless links: high error rates Q: why both link-level and end-end reliability? 12/5/2017 Data Link Layer (SSL) 6-5 5

  6. Chapter 6 The Data Link layer 6.1 introduction, 6.5 link virtualization: services MPLS 6.2 error detection, 6.6 data center correction networks 6.3 multiple access 6 3 l i l 6 7 6.7 a day in the life of d i h lif f protocols a web request 6 4 LAN 6.4 LANs (play animati n in ppt (play animation in .ppt slide on your own)  addressing, ARP  Ethernet  Ethernet  layer-2 switches  VLANS VLANS 12/5/2017 Data Link Layer (SSL) 6-6 6

  7. Cyclic Redundancy Check (CRC) - sender  View data bits, D, as a  Goal : choose r CRC binary number bits, R, such that <D,R> , , , is exactly divisible by G using modulo 2 arithmetic arithmetic  Modulo 2 arithmetic  there is no carry in  Choose r+1 bit pattern addition, and no borrow (generator), G in subtraction  addition and subtraction same as bitwise exclusive OR (XOR) 12/5/2017 Data Link Layer (SSL) 6-7 7

  8. Cyclic Redundancy Check (CRC) - receiver  Receiver knows G,  Bit string <D,R> sent performs division. If p is is exactly divisible by x tl di isibl b non-zero remainder, G error detected !  can detect all burst n d t t ll b st  errors less than r+1 bits;  longer burst errors are detectable with probability 1 (0 5) r probability 1-(0.5) 12/5/2017 Data Link Layer (SSL) 6-8 8

  9. CRC Theory and Example Want: (D*2r) XOR R = nG add R to both sides: dd R t b th id D*2 r XOR R XOR R = (nG) XOR R Equivalently Equivalently: the remainder from dividing D*2r by G is equal to R; to R; the desired CRC bit string is D*2r R = remainder[ ] G 12/5/2017 Data Link Layer (SSL) 6-9 9

  10. Chapter 6 The Data Link layer 6.1 introduction, 6.5 link virtualization: services MPLS 6.2 error detection, 6.6 data center correction networks 6.3 multiple access 6 3 l i l 6 7 6.7 a day in the life of d i h lif f protocols a web request 6 4 LAN 6.4 LANs (play animati n in ppt (play animation in .ppt slide on your own)  addressing, ARP  Ethernet  Ethernet  layer-2 switches  VLANS VLANS 12/5/2017 Data Link Layer (SSL) 6-10 10

  11. Links and Multiple Access Protocols Two types of “links”:  point-to-point p p  fiber optic link  link between Ethernet switch and host  broadcast (shared wire or medium)  broadcast (shared wire or medium)  old-fashioned Ethernet  shared coax cable in HFC (hybrid fiber cable), e.g., Spectrum  wireless (802.11 LAN and others), etc. humans at a party humans at a party shared cable (e.g., sh d bl ( (shared air, acoustics) shared RF shared RF old Ethernet) (e.g., 802.11 WiFi) (satellite) 12/5/2017 Data Link Layer (SSL) 6-11 11

  12. Mult ple Access protocols Multiple Access protocols single shared broadcast channel  two or more simultaneous transmissions by nodes may i l i i b d interfere with each other  collision if a node receives two or more signals at the same g time  N  Need a protocol to determine when nodes can transmit d t l t d t mi h d s t smit  no out-of-band channel for coordination 12/5/2017 Data Link Layer (SSL) 5-12 12

  13. MA Protocols: a taxonomy Three broad classes:  Channel Partitioning  Channel Partitioning (e.g., cell phones) (e g cell phones)  divide channel into smaller “pieces” (frequency bands, time slots, codes)  allocate a piece to each node for exclusive use ll t i t h d f l i  Random Access (e.g., early Ethernet, 802.11 wifi)  shared channel shared channel , collisions allowed collisions allowed  “recover” from collisions  does not provide QoS p Q  “Taking turns” (e.g., token-ring LAN, FDDI)  nodes take turns  a node with more to send can take a longer turn d ith t s d t k l t 12/5/2017 Data Link Layer (SSL) 6-13 13

  14. Channel Partitioning protocols FDMA: frequency division multiple access * FDMA f di i i l i l *  each station assigned a fixed frequency band (note: MIMO antenna can use multiple frequencies) antenna can use multiple frequencies)  unused transmission time in frequency bands go idle uency s bands frequ FDM cable * multiple transmitters p 12/5/2017 Data Link Layer (SSL) 6-14 14

  15. Channel Partitioning protocols TDMA: time division multiple access*  each station gets fixed length slot (length = pkt g g ( g p trans time) in each frame  requires time synchronization  unused slots go idle  unused slots go idle 6 slot 6-slot frame 3 3 4 1 4 1 * multiple transmitters 12/5/2017 Data Link Layer (SSL) 6-15 15

  16. Random Access Protocols  When node has packet to send  transmit at full channel data rate  no a priori coordination among nodes i i di ti d  two or more transmitting nodes ➜ “collision”  random access MA protocol specifies:  random access MA protocol specifies:  how to detect collision  how to recover from collision (e.g., via delayed retransmissions) retransmissions)  examples (chronological):  ALOHA  slotted ALOHA  CSMA, CSMA/CD, CSMA/CA 12/5/2017 Data Link Layer (SSL) 6-16 16

  17. Slotted Aloha  time is divided into equal size slots (pkt trans. times)  requires time synchronization  node with new arriving pkt: transmit at beginning of  node with new arriving pkt: transmit at beginning of next slot  if collision: retransmit pkt in a future slot with p probability p (or one of K slots at random), until successful. Success (S), Collision (C), Empty (E) slots 12/5/2017 Data Link Layer (SSL) 6-17 17

  18. Slotted Aloha efficiency L Long-term fraction of time slots that are f i f i l h successful? Suppose N nodes have packets to send Suppose N nodes have packets to send  each transmits in slot with probability p  prob. successful transmission S is by a particular node: S = p (1-p) (N-1) by any of N nodes: S = Prob [one of N nodes transmits] S = Prob [one of N nodes transmits] = N p (1-p) (N-1) Channel occupied Channel occupied by useful … choosing optimum p, let N -> infinity transmissions < = 1/e = .37 as N -> infinity = 1/e = 37 as N > infinity 37% of time 37% of time 12/5/2017 Data Link Layer (SSL) 6-18 18

  19. S ∂ ∂ [NP (1 [NP (1 P) P) N 1 ] ] − = = − P P ∂ ∂ S ∂ NP (1 ( P) ) N 1 (1 ( P) ) N 1 N − − = − + − P P ∂ ∂ NP (N 1) (1 P) N(1 P) N 2 N 1 − − = − − − + − N(1 N(1 P) P) N 2 N 2 { P(N { P(N 1) 1) 1 1 P } P } − = − − − + − 0 N(1 P) { NP P 1 P } N 2 − P = − − + + − 0 1.0 S 1 ∂ 0 when P to maximize S = = ∂ P P N N ∂ My terminology : “Probability Division Multiplex” Division of probability does not have to be fair, i.e., p y P 1 +P 2 + … +P N = 1 is condition for maximum 12/5/2017 Data Link Layer (SSL) 6-19 19

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend