DOC PREVIEW
MIT 6 033 - Link Layer & Network Layer

This preview shows page 1-2-3-27-28-29 out of 29 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 29 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 29 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 29 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 29 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 29 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 29 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 29 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Link Layer & Network Layer Some slides are from lectures by Nick Mckeown, Ion Stoica, Frans Kaashoek, Hari Balakrishnan, and Sam Madden Prof. Dina KatabiChapter 7.B and 7.C2Previous LectureWe learned how to share the network infrastructure between many connections/flowsWe also learned about the implications of the sharing scheme (circuit or packet switching) on the service that the traffic receives3This LectureAn Example: HTTPLayeringLink Layer4Example: HTTP over the Internet Using TCP/IP and EthernetAppOSR2 R3R4R1R5Ethernet“A” MIT“B” (CNN.Com)EthernetAppOS12346720191817591081213111516145In the sending host1. Application-Programming Interface (API)Application requests TCP connection with “B”2. Transmission Control Protocol (TCP)Creates TCP “ Connection setup” packetTCP requests IP packet to be sent to “B”TCPDataTCPHeaderTCP PacketType = Connection SetupEmpty in Connection Setup Packet6In the sending host (2)3. Internet Protocol (IP)Creates IP packet with correct addresses.IP requests packet to be sent to router.IPDataTCP PacketEncapsulationIPHeaderIP PacketDestination Address: IP “ B”Source Address: IP “A”Protocol = TCPTCPDataTCPHeader7In the sending host (3)4. Link (“MAC” or Ethernet) ProtocolCreates MAC frame. Wait for access to the line.Send each bit of the frame.EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC “ R1”Source Address: MAC “A”Protocol = IPIPDataIPHeaderEncapsulation8In Router R15. Link (“MAC” or Ethernet) ProtocolAccept MAC frame, check address and Frame Check Sequence (FCS) to ensure no bit errors. Pass data to IP Protocol.EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC “ R1”Source Address: MAC “A”Protocol = IPIPDataIPHeaderDecapsulation9In Router R16. Internet Protocol (IP)Use IP destination address to decide where to send packet next (“ next-hop routing”).Request Link Protocol to transmit packet.IPDataIPHeaderIP PacketDestination Address: IP “B”Source Address: IP “ A”Protocol = TCP10In Router R17. Link (“MAC” or Ethernet) ProtocolCreates MAC frame. Wait for access to the line.Send each bit of the frame.EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC “R2”Source Address: MAC “R1”Protocol = IPIPDataIPHeaderEncapsulation11In Router R516. Link (“MAC” or Ethernet) ProtocolCreates MAC frame. Wait for access to the line.Send each bit of the frame.EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC “B”Source Address: MAC “R5”Protocol = IPIPDataIPHeaderEncapsulationSteps 8- 15 are the same as before …12In the receiving host17. Link (“MAC” or Ethernet) ProtocolAccept MAC frame, check address and Frame Check Sequence (FCS) for bit errors. Pass data to IP Protocol.EthernetDataIP PacketEthernetFCSEthernetHeaderEthernet PacketDestination Address: MAC “B”Source Address: MAC “R5”Protocol = IPIPDataIPHeaderDecapsulation13In the receiving host (2)18. Internet Protocol (IP)Verify IP address.Extract/decapsulate TCP packet from IP packet.Pass TCP packet to TCP Protocol.IPDataTCP PacketDecapsulationIPHeaderIP PacketDestination Address: IP “ B”Source Address: IP “A”Protocol = TCPTCPDataTCPHeader14In the receiving host (3)19. Transmission Control Protocol (TCP)Accepts TCP “ Connection setup” packetEstablishes connection by sending “ Ack” .20. Application-Programming Interface (API)Application receives request for TCP connection with “ A”.TCPDataTCPHeaderTCP PacketType = Connection SetupEmpty15This LectureAn Example: HTTPLayeringLink Layer16Network ArchitectureProblemNetworks are complex (heterogeneity, distributed, delay, losses, reordering, …)How do we organize a network implementation?SolutionTo deal with complexity use layering17LayeringLayering is a particular form of abstractionThe system is broken into a vertical hierarchy of logically distinct entities (layers)The service provided by one layer is based solely on the service provided by layer below18Layering: Our HTTP ExampleNetworkLinkTransportThe 4-layer Internet modelApplicationHTTPIPTCPEthernetEnd-to-End Layer19Who Does What?Link Layer: Delivers data from one end of a link to the otherNetwork LayerRoutes packets and delivers them to their destination Transport LayerProvides useful abstractions: stream, message Can provide reliabilityCan provide congestion controlApplication LayerYour application: HTTP, FTP, etc.20Where are these layers? Link and network layers are implemented everywhereThe end-to-end layer (i.e., transport and application) is implemented only at hostsApplicationTransportNetworkDatalinkApplicationTransportNetworkDatalinkNetworkDatalinkPhysical mediumPeer-layer communicationRouterHostHost21EncapsulationA layer can use only the service provided by the layer immediate below itEach layer may change and add a header to data packetdatadatadatadatadatadatadatadata22InterfaceHigher layer calls lower layer e.g., Link_Send(this_data, this_link)Lower layer uses an up-call function to inform the higher layer of data arrivale.g., Network_Handle()23Multiplexing in the InternetMany possible applications, transports, and link layersBut they all use IP at the network layer InternetLinkTransportApplicationIPEthernetPacketradioTCP UDPTelnet FTP HTTP24This LectureAn Example: HTTPLayeringLink Layer25Link LayerProblem: Deliver data from one end of the link to the otherNeed to address:Bits Analog BitsFramingErrorsMedium Access Control (The Ethernet Paper)26Sending bitsBits Analog BitsReceiver needs to detect the value of the bitsManchester Encoding: each bit is a transitionHaving a transition in each bit allows the receiver to synchronize to the sender’s clockTime0 1 1 1 027FramingReceiver needs to detect the beginning and the end of a frameUse special bit-pattern to separate framesE.g., pattern could be 1111111 (7 ones)Bit stuffing is used to ensure that a special pattern does not occur in the data If pattern is 1111111 Whenever the sender sees a sequence of 6 ones in the data, it inserts a zero (reverse this operation at receiver)28Error HandlingDetection: Use error detection codes, which add some redundancy to allow detecting errorsWhen errors are detectedCorrection: •Some codes allow for correctionRetransmition: •Can have the link layer retransmit the frame (rare)Discard: •Most link layers just discard the frame and rely on


View Full Document

MIT 6 033 - Link Layer & Network Layer

Documents in this Course
TRIPLET

TRIPLET

12 pages

End Layer

End Layer

11 pages

Quiz 1

Quiz 1

4 pages

Threads

Threads

18 pages

Quiz I

Quiz I

15 pages

Atomicity

Atomicity

10 pages

QUIZ I

QUIZ I

7 pages

Load more
Download Link Layer & Network Layer
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 Link Layer & Network Layer 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 Link Layer & Network Layer 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?