《全套英文版《计算机网络》PPT电子课件教案-Chapter 5 The Data Link Layer》由会员分享,可在线阅读,更多相关《全套英文版《计算机网络》PPT电子课件教案-Chapter 5 The Data Link Layer(114页珍藏版)》请在金锄头文库上搜索。
1、Chapter 5: The Data Link LayerOur goals: runderstand principles behind data link layer services:merror detection, correctionmsharing a broadcast channel: multiple accessmlink layer addressingmreliable data transfer, flow control: done!rinstantiation and implementation of various link layer technolog
2、iesOverview:rlink layer servicesrerror detection, correctionrmultiple access protocols and LANsrlink layer addressing, ARPrspecific link layer technologies:mEthernetmhibs, bridges, switchesmIEEE 802.11 LANsmPPPmATM15: DataLink LayerLink Layer: setting the context25: DataLink LayerLink Layer: setting
3、 the contextrtwo physically connected devices:mhost-router, router-router, host-hostrunit of data: frameapplication transport network link physicalnetwork link physicalMMMMHtHtHn HtHnHlMHtHnHlframephys. linkdata link protocoladapter card 35: DataLink LayerLink Layer ServicesrFraming, link access: me
4、ncapsulate datagram into frame, adding header, trailermimplement channel access if shared medium, mphysical addresses used in frame headers to identify source, dest different from IP address!rReliable delivery between two physically connected devices: mwe learned how to do this already (chapter 3)!m
5、seldom used on low bit error link (fiber, some twisted pair)mwireless links: high error rates Q: why both link-level and end-end reliability?45: DataLink LayerLink Layer Services (more)rFlow Control: mpacing between sender and receiversrError Detection: merrors caused by signal attenuation, noise. m
6、receiver detects presence of errors: signals sender for retransmission or drops frame rError Correction: mreceiver identifies and corrects bit error(s) without resorting to retransmission55: DataLink LayerLink Layer: Implementationrimplemented in “adapter” me.g., PCMCIA card, Ethernet card mtypicall
7、y includes: RAM, DSP chips, host bus interface, and link interfaceapplication transport network link physicalnetwork link physicalMMMMHtHtHn HtHnHlMHtHnHlframephys. linkdata link protocoladapter card65: DataLink LayerError DetectionEDC= Error Detection and Correction bits (redundancy) D = Data prote
8、cted 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 correction75: DataLink LayerParity CheckingSingle Bit Parity: Detect single bit errorsTwo Dimensional Bit Parity: Detect and cor
9、rect single bit errors0085: DataLink LayerInternet checksumSender:rtreat segment contents as sequence of 16-bit integersrchecksum: addition (1s complement sum) of segment contentsrsender puts checksum value into UDP checksum fieldReceiver:rcompute checksum of received segmentrcheck if computed check
10、sum equals checksum field value:mNO - error detectedmYES - no error detected. But maybe errors nonethless? More later .Goal: detect “errors” (e.g., flipped bits) in transmitted segment (note: used at transport layer only)95: DataLink LayerChecksumming: Cyclic Redundancy Checkrview data bits, D, as a
11、 binary numberrchoose r+1 bit pattern (generator), G rgoal: choose r CRC bits, R, such thatm exactly divisible by G (modulo 2) mreceiver knows G, divides by G. If non-zero remainder: error detected!mcan detect all burst errors less than r+1 bitsrwidely used in practice (ATM, HDCL)105: DataLink Layer
12、CRC ExampleWant: D.2r XOR R = nG equivalently: D.2r = nG XOR R equivalently: if we divide D.2r by G, want reminder RR = remainder D.2r G115: DataLink LayerMultiple Access Links and ProtocolsThree types of “links”:rpoint-to-point (single wire, e.g. PPP, SLIP)rbroadcast (shared wire or medium; e.g, Et
13、hernet, Wavelan, etc.)rswitched (e.g., switched Ethernet, ATM etc)125: DataLink LayerMultiple Access protocolsrsingle shared communication channel rtwo or more simultaneous transmissions by nodes: interference monly one node can send successfully at a time rmultiple access protocol:mdistributed algo
14、rithm that determines how stations share channel, i.e., determine when station can transmitmcommunication about channel sharing must use channel itself! mwhat to look for in multiple access protocols: synchronous or asynchronous information needed about other stations robustness (e.g., to channel er
15、rors) performance 135: DataLink LayerMultiple Access protocolsrclaim: humans use multiple access protocols all the time rclass can “guess“ multiple access protocols mmultiaccess protocol 1:mmultiaccess protocol 2:mmultiaccess protocol 3:mmultiaccess protocol 4:145: DataLink LayerMAC Protocols: a tax
16、onomyThree broad classes:rChannel Partitioningmdivide channel into smaller “pieces” (time slots, frequency)mallocate piece to node for exclusive userRandom Accessmallow collisionsm“recover” from collisionsr“Taking turns”mtightly coordinate shared access to avoid collisionsGoal: efficient, fair, simple, decentralized155: DataLink LayerChannel Partitioning MAC protocols: TDMATDMA: time division multiple access racce