
Chapter 5 Data Link Layer computer networking kemh es F Ku A note on the use of these ppt slides: 到 We're making these slides freely available to all (faculty,students,readers). They're in PowerPoint form so you can add,modify,and delete slides Computer Networking. (including this one)and slide content to suit your needs.They obviously represent a lot of work on our part.In retum for use,we only ask the A Top Down Approach following: Featuring the Internet 3rd edition. Jim Kurose,Keith Ross Addison-Wesley,July 2004. Thanks and enjoy!JFK/KWR All material copyright 1996-2004 J.F Kurose and K.W.Ross,All Rights Reserved 5:DataLink Layer 5a-1
5: DataLink Layer 5a-1 Chapter 5 Data Link Layer Computer Networking: A Top Down Approach Featuring the Internet, 3rd edition. Jim Kurose, Keith Ross Addison-Wesley, July 2004. A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: ❑ If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) ❑ If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright 1996-2004 J.F Kurose and K.W. Ross, All Rights Reserved

Chapter 5:The Data Link Layer Our goals: understand principles behind data link layer services: o error detection,correction o sharing a broadcast channel:multiple access o link layer addressing o reliable data transfer,flow control:done! instantiation and implementation of various link layer technologies 5:DataLink Layer 5a-2
5: DataLink Layer 5a-2 Chapter 5: The Data Link Layer Our goals: understand principles behind data link layer services: error detection, correction sharing a broadcast channel: multiple access link layer addressing reliable data transfer, flow control: done! instantiation and implementation of various link layer technologies

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 ATM and MPLS 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5:DataLink Layer 5a-3
5: DataLink Layer 5a-3 Chapter 5 outline 5.1 Introduction and services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5.6 Hubs and switches 5.7 PPP 5.8 Link Virtualization: ATM and MPLS

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 o wired links o wireless links o LANs Link-layer PDU is a frame, encapsulates a network-layer datagram Link-layer protocol has the responsibility of transferring datagram from one node to ad jacent node over a link 5:DataLink Layer 5a-4
5: DataLink Layer 5a-4 Link Layer: Introduction 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 Link-layer PDU is a frame, encapsulates a network-layer datagram “link” Link-layer protocol has the responsibility of transferring datagram from one node to adjacent node over a link

Link layer:context Datagram transferred by transportation analogy different link protocols trip from Princeton to Lausanne over different links: o e.g.,Ethernet on first link, o limo:Princeton to JFK frame relay on o plane:JFK to Geneva intermediate links,802.11 o train:Geneva to Lausanne on last link 口tourist=datagram 口Each link protocol ▣transport segment= provides different communication link services transportation mode o e.g.,may or may not provide reliable data link layer protocol transfer over link travel agent routing algorithm 5:DataLink Layer 5a-5
5: DataLink Layer 5a-5 Link layer: context Datagram transferred by different link protocols over different links: e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link Each link protocol provides different services e.g., may or may not provide reliable data transfer over link transportation analogy trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne tourist = datagram transport segment = communication link transportation mode = link layer protocol travel agent = routing algorithm

Link Layer Services Framing: o encapsulate datagram into frame,adding header,trailer o 'physical addresses'used in frame headers to identify source,destination different from IP address! ▣Link access o Media access control(MAC)protocol o Coordinate the frame transmissions of many nodes if multiple nodes share a medium Reliable delivery between adjacent nodes o we learned how to do this already (chapter 3)! o seldom used on low bit error link(fiber,some twisted pair) o Used on wireless links:high error rates Correct an error locally at link level 5:DataLink Layer 5a-6
5: DataLink Layer 5a-6 Link Layer Services Framing: encapsulate datagram into frame, adding header, trailer ‘physical addresses’ used in frame headers to identify source, destination • different from IP address! Link access Media access control (MAC) protocol Coordinate the frame transmissions of many nodes if multiple nodes share a medium Reliable delivery between adjacent nodes we learned how to do this already (chapter 3)! seldom used on low bit error link (fiber, some twisted pair) Used on wireless links: high error rates • Correct an error locally at link level

Link Layer Services (more) ▣Flow Control: o pacing between adjacent sending and receiving nodes ▣Error Detection: o errors caused by signal attenuation,noise. o receiver detects presence of errors: signals sender for retransmission or drops frame Error Correction: o receiver identifies and corrects bit error(s)without resorting to retransmission Half-duplex and full-duplex o with half duplex,nodes at both ends of link can transmit, but not at same time 5:DataLink Layer 5a-7
5: DataLink Layer 5a-7 Link Layer Services (more) Flow Control: pacing between adjacent sending and receiving nodes 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, nodes at both ends of link can transmit, but not at same time

Adaptors Communicating datagram sending link layer protocol rcving node node frame frame Adapter card Adapter card link layer implemented in receiving side "adaptor"(aka NIC) o looks for errors,rdt,flow o Ethernet card,PCMCI control,etc card,802.11 card o extracts datagram,passes to receiving node sending side: ▣adapter is semi-- o encapsulates datagram in autonomous a frame link physical layers o adds error checking bits, rdt,flow control,etc. 5:DataLink Layer 5a-8
5: DataLink Layer 5a-8 Adaptors Communicating link layer implemented in “adaptor” (aka NIC) Ethernet card, PCMCI card, 802.11 card sending side: encapsulates datagram in a frame adds error checking bits, rdt, flow control, etc. receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to receiving node adapter is semiautonomous link & physical layers sending node frame rcving node datagram frame Adapter card Adapter card link layer protocol

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 ATM 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5:DataLink Layer 5a-9
5: DataLink Layer 5a-9 Chapter 5 outline 5.1 Introduction and services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5.6 Hubs and switches 5.7 PPP 5.8 Link Virtualization: ATM

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 datagram datagram YI all bits in D' N OK detected error ←d data bits D EDC EDC (bit-error prone link 5:DataLink Layer 5a-10
5: DataLink Layer 5a-10 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