Chapter 5 Link Layer and LANs computer networking James F.Kurose Keith W.Ross 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 return for use,we only ask the A Top Down Approach following: Featuring the Internet, If you use these slides (e.g.,in a class)in substantially unaltered form, 3rd edition. that you mention their source(after all,we'd like people to use our book!) f you post any slides in substantially unaltered form on a ww site,that Jim Kurose,Keith Ross you note that they are adapted from(or perhaps identical to)our slides,and Addison-Wesley,July note our copyright of this material. 2004. Thanks and enjoy!JFK/KWR All material copyright 1996-2006 J.F Kurose and K.W.Ross,All Rights Reserved 5:DataLink Layer 5-1
5: DataLink Layer 5-1 Chapter 5 Link Layer and LANs 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-2006 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 5-2
5: DataLink Layer 5-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
Link Layer ▣5.1 Introduction and ▣5.6 Hubs and switches services ▣5.7PPP ▣5.2 Error detection 5.8 Link Virtualization: and correction ATM and MPLS ▣5.3 Multiple access protocols ▣5.4Link-Layer Addressing ▣5.5 Ethernet 5:DataLink Layer 5-3
5: DataLink Layer 5-3 Link Layer 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 “ink” Some terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links o wired links o wireless links o LANs layer-2 packet is a frame, encapsulates datagram data-link layer has responsibility of transferring datagram from one node to ad jacent node over a link 5:DataLink Layer 5-4
5: DataLink Layer 5-4 Link Layer: Introduction Some terminology: hosts and routers are nodes communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs layer-2 packet is a frame, encapsulates datagram “link” data-link layer has 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 over different links: Lausanne o limo:Princeton to JFK o e.g.,Ethernet on first link, 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 rdt over link link layer protocol travel agent routing algorithm 5:DataLink Layer 5-5
5: DataLink Layer 5-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 rdt 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,link access: o encapsulate datagram into frame,adding header,trailer o channel access if shared medium o "MAC"addresses used in frame headers to identify source,dest different from IP address! 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 wireless links:high error rates Q:why both link-level and end-end reliability? 5:DataLink Layer 5-6
5: DataLink Layer 5-6 Link Layer Services Framing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium “MAC” addresses used in frame headers to identify source, dest • different from IP address! 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) wireless links: high error rates • Q: why both link-level and end-end reliability?
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 5-7
5: DataLink Layer 5-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 adapter 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 ▣sending side: to rcving node o encapsulates datagram in ▣adapter is semi- a frame autonomous o adds error checking bits,link physical layers rdt,flow control,etc. 5:DataLink Layer 5-8
5: DataLink Layer 5-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 rcving node adapter is semiautonomous link & physical layers sending node frame rcving node datagram frame adapter adapter link layer protocol
Link Layer ▣5.1 Introduction and ▣5.6 Hubs and switches services ▣5.7PPP 5.2 Error detection 5.8 Link Virtualization: and correction ATM ▣5.3 Multiple access protocols ▣5.4Link-Layer Addressing ▣5.5 Ethernet 5:DataLink Layer 5-9
5: DataLink Layer 5-9 Link Layer 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 Y all bits in D N OK detected error ←dd归ta bits D EDC EDC bit-error prone link 5:DataLink Layer 5-10
5: DataLink Layer 5-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