Docsity

Link Layer Services and Techniques in Computer Networks, Study notes of Computer Systems Networking and Telecommunications

Partial preview of the text

Download Link Layer Services and Techniques in Computer Networks and more Study notes Computer Systems Networking and Telecommunications in PDF only on Docsity!

  • Link Layer CS 242: Computer NetworksWeek 11: Monday, 11/18/07Daniel BilarWellesley CollegeFall

Goals today ^ Understand principles behind data linklayer services:^ ^ Error detection, correction^ ^ Sharing a broadcast channel: multiple access ^ A popular one: EthernetSome slides adapted and pictures gratefullyacknowledged from Kurose, Liebeherr,Rexford, Schul

Message, Segment, Packet, Frame^ HTTP TCP^ IP^ Ethernetinterface

HTTP TCP IP Ethernetinterface

IP^

IP Ethernetinterface

Ethernetinterface SONETSONETinterface^ interface host^

host

router^

router HTTP messageTCP segment IP packet^

IP packet IP packet Ethernet frame

Ethernet frame SONET frame

Link-Layer Services ^ Encoding^ ^ Representing the 0s and 1s ^ Framing^ ^ Encapsulating packet into frame, adding header,trailer^ ^ Using MAC addresses, rather than IP addresses ^ Error detection^ ^ Errors caused by signal attenuation, noise^ ^ Receiver detecting presence of errors ^ Error correction^ ^ Receiver correcting errors without retransmission ^ Flow control^ ^ Pacing between adjacent sending and receiving nodes

Semi-autonomous  An adapter can receive aframe, determine if it has anerror, and discard it

without notifying^ its ‘parent’  It will interrupt its parentonly if it wants to pass anetwork-layer datagram upthe protocol stack.

cpu^ memory^ controllerphysicaltransmission

hostbus(e.g., PCI) networkadaptercard host schematic applicationtransportnetworklink^ linkphysical

Encoding ^ Signals propagate over physical links^ ^ Source node encodes the bits into a signal^ ^ Receiving node decodes the signal back into bits ^ Simplify some electrical engineering details^ ^ Assume two discrete signals, high and low^ ^ E.g., could correspond to two different voltages ^ Simple approach^ ^ High for a 1, low for a 0

Framing ^ Break sequence of bits into a frame^ ^ Typically implemented by the network adaptor ^ Sentinel-based

: Delineate frame with special

pattern (e.g., 01111110)^01111110 ^ Subtle problem: what if special patterns occurs withinframe?^ ^ Solution: ‘escaping’ the special characters^ Sender always inserts a 0 after five 1s and receiver alwaysremoves a 0 appearing after five 1s^ ^ Similar to escaping special characters in C programs

01111110 Frame contents

Framing (Continued) ^ Counter-based

Include the payload length in

the header instead of putting a sentinel at theend^ ^ Problem: what if the count field gets corrupted?^ ^ Causes receiver to think the frame ends at a different place^ ^ Solution: catch later when doing error detection^ ^ And wait for the next sentinel for the start of a new frame  Clock-based

Make each frame a fixed size

^ No ambiguity about start and end of frame ^ But … may be wasteful

Error Detection  Errors are unavoidabledue electrical interference,thermal noise, bad cablesetc.  Approach ^ Transmit extra (redundant)information ^ Use redundant informationto detect errors ^ Extreme case: send twocopies of the data ^ Trade-off again! Accuracyvs. overhead

EDC= Error Detection and Correctionbits (redundancy)D^ = Data protected by errorchecking, may include header fieldsError detection not 100% reliable!protocol may miss some errors, butrarelyLarger EDC field yields betterdetection and correction

Error Detection Techniques 1.^ Parity check^ ^ Add an extra bit to a 7-bit code^ ^ Odd parity: ensure an odd number of 1s^ ^ E.g., 0101011 becomes 0101011

1 ^ Even parity: ensure an even number of 1s^ ^ E.g., 0101011 becomes 0101011

0

2.^ Checksum^ ^ Treat data as a sequence of 16-bit words^ ^ Compute a sum of all the 16-bit words, with no carries^ ^ Transmit the sum along with the packet 3.^ Cyclic Redundancy Check (CRC)^ ^ Use modulo arithmetic to calculate r bits of redundancy for dbits of data^ ^ See ch 5.2.3 in book

Multiple Access Protocol ^ Single shared broadcast channel^ ^ Avoid having multiple nodes speaking at once^ ^ Otherwise, collisions lead to garbled data ^ Multiple access protocol^ ^ Distributed algorithm for sharing the channel^ ^ Algorithm determines which node cantransmit

Multiple Access Techniques ^ Channel partitioning^ ^ Divide channel into pieces ^ Taking turns^ ^ Passing a token for the right to transmit ^ Random access^ ^ Allow collisions, and then recover ^ The acronym for Multiple Access Carrier isMAC