csci 6760 computer networks spring 2017
play

CSCI 6760 - Computer Networks Spring 2017 Instructor: Prof. Roberto - PowerPoint PPT Presentation

source: computer-networks-webdesign.com CSCI 6760 - Computer Networks Spring 2017 Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu These slides are adapted from the textbook slides by J.F. Kurose and K.W. Ross Chapter 3: Transport Layer


  1. source: computer-networks-webdesign.com CSCI 6760 - Computer Networks Spring 2017 Instructor: Prof. Roberto Perdisci perdisci@cs.uga.edu These slides are adapted from the textbook slides by J.F. Kurose and K.W. Ross

  2. Chapter 3: Transport Layer Our goals: } learn about transport layer } understand principles protocols in the Internet: behind transport layer services: } UDP: connectionless transport } TCP: connection-oriented } multiplexing/demultiplexing transport } reliable data transfer } TCP congestion control } flow control } congestion control 3-2 Transport Layer

  3. Transport services and protocols application transport } provide logical communication network data link between app processes running on physical different hosts } transport protocols run in end systems } send side: breaks long app messages into segments, passes to network layer } rcv side: reassembles segments application transport into messages, passes to app network data link layer physical } more than one transport protocol available to apps } Internet: TCP and UDP 3-3 Transport Layer

  4. Transport vs. network layer } network layer: logical Household analogy: communication between hosts 12 kids sending letters to 12 kids } transport layer: logical communication between } processes = kids processes } app messages = letters in } relies on and enhances network envelopes layer services } hosts = houses } transport protocol = Ann and Bill } network-layer protocol = postal service 3-4 Transport Layer

  5. Internet transport-layer protocols application } reliable, in-order delivery transport network (TCP) data link physical network } connection setup data link network physical data link } flow control physical } congestion control network } unreliable, unordered data link physical network delivery: UDP data link physical } extension of “best-effort” IP network data link application physical network } Do not provide: transport data link network physical data link } delay guarantees physical } bandwidth guarantees 3-5 Transport Layer

  6. Multiplexing/demultiplexing Multiplexing at send host: Demultiplexing at rcv host: gathering data from multiple delivering received segments sockets, enveloping data with to correct socket header (later used for demultiplexing) = socket = process P4 application P1 P2 P3 application P1 application transport transport transport network network network link link link physical physical physical host 3 host 2 host 1 3-6 Transport Layer

  7. How demultiplexing works } host receives IP datagrams } each datagram has source IP 32 bits address, destination IP address source port # dest port # } each datagram carries 1 transport-layer segment other header fields } each segment has source and destination port number } host uses IP addresses & port application numbers to direct segment to data appropriate socket (message) TCP/UDP segment format 3-7 Transport Layer

  8. Connectionless demultiplexing } When host receives UDP } Create sockets with port segment: numbers: } checks destination port number DatagramSocket mySocket1 = new in segment DatagramSocket(12534); } directs UDP segment to socket DatagramSocket mySocket2 = new with that port number DatagramSocket(12535); } IP datagrams with different } UDP socket identified by two- source IP addresses and/or tuple: source port numbers ( dest IP address, dest port number) directed to same socket 3-8 Transport Layer

  9. Connectionless demux (cont) DatagramSocket serverSocket = new DatagramSocket(6428); P1 P2 P1 P3 SP: 6428 SP: 6428 DP: 9157 DP: 5775 SP: 9157 SP: 5775 DP: 6428 DP: 6428 client Client server IP: A IP:B IP: C SP provides “return address” 3-9 Transport Layer

  10. Connection-oriented demux } TCP socket identified by 4- } Server host may support tuple: many simultaneous TCP sockets: } source IP address } source port number } each socket identified by its own 4-tuple } dest IP address } Web servers have different } dest port number sockets for each connecting } receiving host uses all four client values to direct segment to } non-persistent HTTP will have appropriate socket different socket for each request 3-10 Transport Layer

  11. Connection-oriented demux (cont) P1 P6 P2 P1 P4 P5 P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 DP: 80 DP: 80 client Client server IP: A S-IP: A S-IP: B IP:B IP: C D-IP:C D-IP:C 3-11 Transport Layer

  12. Connection-oriented demux: Threaded Web Server P1 P2 P1 P4 P3 SP: 5775 DP: 80 S-IP: B D-IP:C SP: 9157 SP: 9157 DP: 80 DP: 80 client Client server IP: A S-IP: A S-IP: B IP:B IP: C D-IP:C D-IP:C 3-12 Transport Layer

  13. Chapter 3 outline } 3.1 Transport-layer services } 3.5 Connection-oriented } 3.2 Multiplexing and transport: TCP demultiplexing } segment structure } 3.3 Connectionless } reliable data transfer transport: UDP } flow control } 3.4 Principles of reliable data } connection management transfer } 3.6 Principles of congestion control } 3.7 TCP congestion control 3-13 Transport Layer

  14. UDP: User Datagram Protocol [RFC 768] } “no frills,” “bare bones” Internet transport protocol Why is there a UDP? } “best effort” service, UDP } no connection establishment segments may be: (which can add delay) } lost } simple: no connection state at } delivered out of order to app sender, receiver } connectionless: } small segment header } no handshaking between } no congestion control: UDP can UDP sender, receiver blast away as fast as desired } each UDP segment handled independently of others 3-14 Transport Layer

  15. UDP: more } often used for streaming 32 bits multimedia apps source port # dest port # } loss tolerant Length, in checksum bytes of UDP length } rate sensitive segment, } other UDP uses including header } DNS } SNMP Application } reliable transfer over UDP: add data reliability at application layer (message) } application-specific error recovery! UDP segment format 3-15 Transport Layer

  16. UDP checksum Goal: detect “errors” (e.g., flipped bits) in transmitted segment Sender: Receiver: } treat segment contents as } compute checksum of received sequence of 16-bit integers segment } checksum: addition (1’s } check if computed checksum complement sum) of segment equals checksum field value: contents } NO - error detected } sender puts checksum value } YES - no error detected. But into UDP checksum field maybe errors nonetheless? More later …. 3-16 Transport Layer

  17. Internet Checksum Example } Note } When adding numbers, a carryout from the most significant bit needs to be added to the result } Example: add two 16-bit integers 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 sum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 checksum 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1 3-17 Transport Layer

  18. Principles of Reliable data transfer } important in app., transport, link layers } top-10 list of important networking topics! } characteristics of unreliable channel will determine complexity of reliable data transfer protocol (rdt) 3-18 Transport Layer

  19. Principles of Reliable data transfer 3-19 Transport Layer

  20. Principles of Reliable data transfer 3-20 Transport Layer

  21. Reliable data transfer: getting started rdt_send(): called from above, deliver_data(): called by (e.g., by app.). Passed data to rdt to deliver data to upper deliver to receiver upper layer send receive side side udt_send(): called by rdt, rdt_rcv(): called when packet to transfer packet over arrives on rcv-side of channel unreliable channel to receiver 3-21 Transport Layer

  22. Reliable data transfer: getting started We’ll: } incrementally develop sender, receiver sides of reliable data transfer protocol (rdt) } consider only unidirectional data transfer } but control info will flow on both directions! } use finite state machines (FSM) to specify sender, receiver event causing state transition actions taken on state transition state: when in this state state “state” next state event 1 uniquely determined 2 actions by next event 3-22 Transport Layer

  23. Rdt1.0: reliable transfer over a reliable channel } underlying channel perfectly reliable } no bit errors } no loss of packets } separate FSMs for sender, receiver: } sender sends data into underlying channel } receiver read data from underlying channel rdt_send(data) rdt_rcv(packet) Wait for Wait for call from call from extract (packet,data) packet = make_pkt(data) below above deliver_data(data) udt_send(packet) receiver sender 3-23 Transport Layer

  24. Rdt2.0: channel with bit errors } underlying channel may flip bits in packet } checksum to detect bit errors } the question: how to recover from errors: } acknowledgements (ACKs): receiver explicitly tells sender that pkt received OK } negative acknowledgements (NAKs): receiver explicitly tells sender that pkt had errors } sender retransmits pkt on receipt of NAK } new mechanisms in rdt2.0 (beyond rdt1.0 ): } error detection } receiver feedback: control msgs (ACK,NAK) rcvr->sender 3-24 Transport Layer

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend