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