15-441 - KesdenISO/OSI Reference ModelThe Data Link LayerLink Layer Design IssuesManagement of the MediaLink TypesAddress TypesEncodingNRZ (Non-Return to Zero)Ethernet Manchester Encoding4B/5B EncodingFramingFraming, ExampleExample: Point-To-Point Protocol (PPP), contSlide 15Example: Point-To-Point Protocol (PPP), contLCP Packet TypesError Correction vs. Error DetectionSimple ParityClose Enough?Hamming DistanceThinking about Error Detection and CorrectionHamming Distance and EC/EDSlide 24How Many Check Bits?Hamming’s CodeHamming’s Code (Example)Hamming’s Code (Ex.), cont.Slide 29ChecksumsChecksums, cont.Checksum, cont.Slide 3301/15/19115-441 - Kesden15-441 - KesdenLecture 5/Spring 200701/15/192ISO/OSI Reference ModelISO/OSI Reference ModelApplicationPresentationSessionTransportNetworkData Link – We are herePhysical – We’ve been here01/15/193The Data Link LayerThe Data Link LayerThe physical layer was responsible for hiding the physical properties of the media. The network layer is responsible for moving packets from network to network.The link layer is responsible for getting packets from one machine to another on a particular network. For our purposes, a network is a collection of machines connected via a communications channel such that the connection logically appears as if it was a single wire or bus, regardless of the actual media or configuration.01/15/194Link Layer Design IssuesLink Layer Design IssuesManagement of the media, generallyEncodingFramingError-detection/Error-correction [maybe]Flow control [maybe]01/15/195Management of the MediaManagement of the MediaIn many cases, there may be limitations about who can use the actual physical network connection and when.Broadcast media, such as ethernet, is the classic example. This issue belongs to a sublayer of the data link layer called the Medium Access Control (MAC) layer.01/15/196Link TypesLink TypesBroadcast:–Senders and receivers share medium – all stations hear all transmissions–Radio–Sometimes wired, e.g. ethernetPoint-to-point–Fiber, RS232, USB (upstream vs. downstream)Switched–Token ring01/15/197Address TypesAddress TypesStatic – anointed, soft-configuredStatic – anointed, more hard-wired–Ethernet, 48 bits: [????]24 bits “per manufacturer”24 bits assigned by manufacturer–Port/Position on switchDynamic – “Anyone else use 45?”Special addresses, e.g. designated broadcast01/15/198EncodingEncodingIt is often the case that the physical layer has “personality”. For example, baseband signals send 1s and 0s as high and low voltages. But if the voltage doesn’t change for a long time, timing tolerance becomes and issue.Long streams of 0s or 1s could lead to miscounted bits.Typically, it is the link layer’s responsibility to mitigate this type of physical layer property.This is done by encoding the bits in a way that is not subject to this type of problem.01/15/199NRZ (Non-Return to Zero)NRZ (Non-Return to Zero)00 0 100 1 11Easy thing to doHard to count 0’s or 1sNot necessarily balanced01/15/1910Ethernet Manchester EncodingEthernet Manchester Encoding00 1 10 = rising transition1 = falling transition•1 transitions per bit, but twice as much bandwidth•High-low pattern has good electrical properties•Balanced signal – no net DC voltage. •This allows AC coupled power supply on receiver. •If code had a DC bias, it would be lost in the transformer on the receiver side.01/15/19114B/5B Encoding4B/5B EncodingData encoded as symbols with 5 bit symbols representing 4 bit patterns100Mbps data requires 125MhzEach valid symbol has at least two 1s–Guarantees transitions16 data symbols–8 additional symbols used for controlIdleFrame boundaryFDDI is one example01/15/1912FramingFramingPhysical layer is typically not error-freeLink layer must discard correct and/or replace defective data, depending on quality of service.Typical approach is to break streams of 1’s and 0’s into more managable pieces called framesFrames typically contain data bits and error correction or error detection bitsDepending on the protocol, defective frames may be corrected (if possible) or discarded. Some link layer protocols might also handle retransmission of defective frames01/15/1913Framing, ExampleFraming, ExampleWhich way do we lose more?01/15/1914Example: Point-To-Point Protocol Example: Point-To-Point Protocol (PPP), (PPP), contcontFlag Address Control Protocol Payload Checksum Flag01111110 11111111 00000011 01111110Indicatesstartof frameIndicatesend of frameAlways all 1s.All stations accept all packetsUsually as shown. Indicates unnumbered frame. Can provide numbered frames and reliable link layer – especially useful for noisy linesWhich network layer is above?The network layer packet111 1 or 2variable 2 or 41Can be omitted by negotiation01/15/1915Example: Point-To-Point Protocol Example: Point-To-Point Protocol (PPP), (PPP), contcontDEADESTABLISHED AUTHENTICATENETWORKTERMINATEOPENCarrier detectfailedfailedOptionsagreedAuthentication successfulNCP configurationdoneCarrier dropped01/15/1916Example: Point-To-Point Protocol Example: Point-To-Point Protocol (PPP), (PPP), contcontFlag Address Control Protocol Payload Checksum Flag01111110 11111111 00000011 01111110111 1 or 2variable 2 or 41 Code Identifier Length Data1231LCP PacketWhat type?To match request and reply01/15/1917LCP Packet TypesLCP Packet TypesName Direction DescriptionConfigure-requestInitiatorResponderData has proposed options and valuesConfigure-ACKInitiatorResponderAll proposed options and values acceptedConfigure-NAKInitiatorResponderData has rejected optionsConfigure-RejectInitiatorResponderData has non-negotiable optionsTerminate-RequestInitiatorResponderRequest to close lineTerminate-ACKInitiatorResponderOK, line is closedCode-RejectInitiatorResponderUnknown requestProtocol-RejectInitiatorResponderUnknown protocolEcho-requestInitiatorResponderPlease echo this frame (send back) (testing)Echo-replyInitiatorResponderHere is the frame back (testing)Discard-requestInitiatorResponderThrow this frame away (testing)01/15/1918Error Correction vs. Error DetectionError Correction vs.
View Full Document