DOC PREVIEW
Princeton COS 461 - lecture 10 Links

This preview shows page 1-2-3-18-19-37-38-39 out of 39 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 39 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Links&Reading:&Chapter&2&COS&461:&Computer&Networks&Spring&2009&(MW&1:30‐2:50&in&COS&105)&Mike&Freedman&hGp://www.cs.princeton.edu/courses/archive/spring09/cos461/&1!Goals&of&Today’s&Lecture&• Link‐layer&services&– Encoding,&framing,&and&error&detecTon&– Error&correcTon&and&flow&control&• Sharing&a&shared&media&– Channel&parTToning&– Taking&turns&– Random&access&• Ethernet&protocol&– Carrier&sense,&collision&detecTon,&and&random&access&– Frame&structure&– Hubs&and&switches&2!Message,&Segment,&Packet,&and&Frame&3!HTTP TCP IP Ethernet interface HTTP TCP IP Ethernet interface IP IP Ethernet interface Ethernet interface SONET interface SONET interface host host router router HTTP message TCP segment IP packet IP packet IP packet Ethernet frame Ethernet frame SONET frameLink&Layer&Protocol&for&Each&Hop&• IP&packet&transferred&over&mulTple&hops&– Each&hop&has&a&link&layer&protocol&– May&be&different&on&different&hops&• Analogy:&trip&from&Princeton&to&Lausanne&– Limo:&Princeton&to&JFK&– Plane:&JFK&to&Geneva&– Train:&Geneva&to&Lausanne&• Refining&the&analogy&– Tourist&==&packet&– Transport&segment&==&communicaTon&link&– TransportaTon&mode&==&link‐layer&protocol&– Travel&agent&==&rouTng&algorithm&4!Adaptors&CommunicaTng&• Link&layer&implemented&in&adaptor&(network&interface&card)&– Ethernet&card,&PCMCIA&card,&802.11&card&• Sending&side:&– Encapsulates&datagram&in&a&frame&– Adds&error&checking&bits,&flow&control,&etc.&• Receiving&side&– Looks&for&errors,&flow&control,&etc.&– Extracts&datagram&and&passes&to&receiving&node&5!sending node frame receiving node datagram frame adapter adapter link layer protocolLink‐Layer&Services&• Encoding&– RepresenTng&the&0s&and&1s&• Framing&– EncapsulaTng&packet&into&frame,&adding&header,&trailer&– Using&MAC&addresses,&rather&than&IP&addresses&• Error&detecTon&– Errors&caused&by&signal&aGenuaTon,&noise.&&– Receiver&detecTng&presence&of&errors&• Error&correcTon&– Receiver&correcTng&errors&without&retransmission&• Flow&control&– Pacing&between&adjacent&sending&and&receiving&nodes&6!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&7!0 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0Problem&With&Simple&Approach&• Long&strings&of&0s&or&1s&introduce&problems&– No&transiTons&from&low‐to‐high,&or&high‐to‐low&• Receiver&keeps&average&of&signal&it&has&received&– Uses&the&average&to&disTnguish&between&high&and&low&– Long&flat&strings&make&receiver&sensiTve&to&small&change&• TransiTons&also&necessary&for&clock&recovery&– Receiver&uses&transiTons&to&derive&its&own&clock&– Long&flat&strings&do&not&produce&any&transiTons&– Can&lead&to&clock&drid&at&the&receiver&• AlternaTves&(see&SecTon&2.2)&– Non‐return&to&zero&inverted:&&TransiTon&for&1,&None&for&0&– Manchester&encoding:&&clock&XOR&NRZ:&&LH&(0),&HL&(1)&&8!Framing&• Break&sequence&of&bits&into&a&frame&– Typically&implemented&by&the&network&adaptor&• SenTnel‐based&– Delineate&frame&with&special&paGern&(e.g.,&01111110)&– Problem:&what&if&special&paGerns&occurs&within&frame?&– SoluTon:&escaping&the&special&characters&• E. g.,&sender&always&inserts&a&0&ader&five&1s&• …&and&receiver&always&removes&a&0&appearing&ader&five&1s&– Similar&to&escaping&special&characters&in&C&programs&9!01111110! 01111110!Frame contents!Framing&(ConTnued)&• Counter‐based&– Include&the&payload&length&in&the&header&– …&instead&of&pumng&a&senTnel&at&the&end&– Problem:&what&if&the&count&field&gets&corrupted?&• Causes&receiver&to&think&the&frame&ends&at&a&different&place&– SoluTon:&catch&later&when&doing&error&detecTon&• And&wait&for&the&next&senTnel&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&&10!Error&DetecTon&• Errors&are&unavoidable&– Electrical&interference,&thermal&noise,&etc.&• Error&detecTon&– Transmit&extra&(redundant)&informaTon&&– Use&redundant&informaTon&to&detect&errors&– Extreme&case:&send&two&copies&of&the&data&– Trade‐off:&accuracy&vs.&overhead&• Techniques&for&detecTng&errors&– Parity&checking&– Checksum&– Cyclic&Redundancy&Check&(CRC)&11!Error&DetecTon&Techniques&• Parity&check&– Add&an&extra&bit&to&a&7‐bit&code&– Odd&parity:&ensure&an&odd&number&of&1s&• E.g.,&0101011&becomes&01010111&– Even&parity:&ensure&an&even&number&of&1s&• E.g.,&0101011&becomes&01010110&• Checksum&– Treat&data&as&a&sequence&of&16‐bit&words&– Compute&a&sum&of&all&16‐bit&words,&with&no&carries&– Transmit&the&sum&along&with&the&packet&• Cyclic&Redundancy&Check&(CRC)&– See&SecTon&2.4.3&12!Point‐to‐Point&vs.&Broadcast&Media&• Point‐to‐point&– PPP&for&dial‐up&access&– Point‐to‐point&link&between&Ethernet&switch&and&host&• Broadcast&(shared&wire&or&medium)&– TradiTonal&Ethernet&– 802.11&wireless&LAN&13!MulTple&Access&Protocol&• Single&shared&broadcast&channel&– Avoid&having&mulTple&nodes&speaking&at&once&– Otherwise,&collisions&lead&to&garbled&data&• MulTple&access&protocol&– Distributed&algorithm&for&sharing&the&channel&– Algorithm&determines&which&node&can&transmit&• Classes&of&techniques&– Channel&parTToning:&divide&channel&into&pieces&– Taking&turns:&passing&a&token&for&the&right&to&transmit&– Random&access:&allow&collisions,&and&then&recover&14!Channel&ParTToning:&TDMA&TDMA:&Tme&division&mulTple&access&&• Access&to&channel&in&"rounds"&&– Each&staTon&gets&fixed&length&slot&in&each&round&• Time‐slot&length&is&packet&transmission&Tme&&– Unused&slots&go&idle&&• Example:&6‐staTon&LAN&with&slots&1,&3,&and&4&15!Channel&ParTToning:&FDMA&FDMA:&frequency&division&mulTple&access&&•


View Full Document

Princeton COS 461 - lecture 10 Links

Documents in this Course
Links

Links

39 pages

Lecture

Lecture

76 pages

Switches

Switches

35 pages

Lecture

Lecture

42 pages

Links

Links

39 pages

Lecture

Lecture

34 pages

Topology

Topology

42 pages

Lecture

Lecture

42 pages

Overview

Overview

42 pages

Sockets

Sockets

45 pages

Load more
Download lecture 10 Links
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view lecture 10 Links and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view lecture 10 Links 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?