Quiz #1. Transport Layer 3-2 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 TCP. Transport Layer3-2 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection.
Advertisements

1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A note on the use.
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 16 Omar Meqdadi Department of Computer Science and Software Engineering University.
1 Transport Layer Lecture 9 Imran Ahmed University of Management & Technology.
CS 471/571 Transport Layer 5 Slides from Kurose and Ross.
CSE551: Computer Network Review r Network Layers r TCP/UDP r IP.
Transport Layer3-1 Homework r Chapter 2#10,13-18 r Due Wed September 17.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
Transport Layer3-1 Pipelined protocols Pipelining: sender allows multiple, “in-flight”, yet-to- be-acknowledged pkts m range of sequence numbers must be.
Transport Layer 4 Slides from Kurose and Ross
Transport Layer 3-1 Transport services and protocols  provide logical communication between app processes running on different hosts  transport protocols.
CPSC 441: Intro, UDP1 Transport Layer Instructor: Carey Williamson Office: ICT Class Location:
Chapter 3 outline 3.1 transport-layer services
EEC-484/584 Computer Networks Lecture 15 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 3: Transport Layer
The Future r There will be a Wireshark TCP homework up on the wiki later today. It will be due Wednesday. r The next test is coming soon – next Wednesday????
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Lecture 8 Chapter 3 Transport Layer
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
Chapter 3 Transport Layer
The Future r Let’s look at the homework r The next test is coming the 19 th (just before turkey day!) r Monday will finish TCP canned slides r Wednesday.
CPSC 441: Intro, UDP1 Instructor: Anirban Mahanti Office: ICT Class Location: ICT 121 Lectures: MWF 12:00 – 12:50 Notes.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Announcement Homework 1 graded Homework 2 out –Due in a week, 1/30 Project 2 problems –Minet can only compile w/ old version of gcc (2.96). –Only tlab-login.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
8-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Transport Layer Transport Layer. Transport Layer 3-2 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet,
CECS 474 Computer Network Interoperability Notes for Douglas E. Comer, Computer Networks and Internets (5 th Edition) Tracy Bradley Maples, Ph.D. Computer.
EEC-484/584 Computer Networks Lecture 7 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Network LayerII-1 RSC Part III: Transport Layer 3. TCP Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are, mainly, part.
Transport Layer1 Reliable Transfer Ram Dantu (compiled from various text books)
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Network LayerII-1 RSC Part III: Transport Layer 1. Basic Concepts Redes y Servicios de Comunicaciones Universidad Carlos III de Madrid These slides are,
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
3: Transport Layer3b-1 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data flow in same connection m MSS: maximum.
2: Transport Layer 21 Transport Layer 2. 2: Transport Layer 22 TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581 r full duplex data: m bi-directional data.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
Chapter 3 Transport Layer
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross Addison-Wesley,
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
Adapted from: Computer Networking, Kurose/Ross 1DT066 Distributed Information Systems Chapter 3 Transport Layer.
Transport Layer 3-1 Internet Transport Layer Lecture 8 Dr. Najla Al-Nabhan.
Prof. Younghee Lee 1 1 Computer Networks u Lecture 5: Transport services and protocols Prof. Younghee Lee * Some part of this teaching materials are prepared.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer3-1 Transport Layer If you are going through Hell Keep going.
Application Layer 2-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Transport Layer1 Goals: r understand principles behind transport layer services and protocols: m UDP m TCP Overview: r transport layer services r multiplexing/demultiplexing.
Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Chapter 3 Transport Layer
Chapter 3 Transport Layer
Chapter 3 Transport Layer
Introduction to Networks
Chapter 3 Transport Layer
Transport Layer Our goals:
Chapter 3 Transport Layer
Chapter 3 Transport Layer
Presentation transcript:

Quiz #1

Transport Layer 3-2 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you see the animations; and can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:  If you use these slides (e.g., in a class) that you mention their source (after all, we’d like people to use our book!)  If you post any slides on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. Thanks and enjoy! JFK/KWR All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Lecture 7 University of Nevada – Reno Computer Science & Engineering Department Fall 2015 CPE 400 / 600 Computer Communication Networks Prof. Shamik Sengupta Office SEM 204

Chapter 3 Transport Layer

Transport Layer Our goals:  understand principles behind transport layer services  learn about transport layer protocols in the Internet:  UDP: connectionless unreliable transport  TCP: connection-oriented reliable transport  TCP: connection oriented reliable transport  Principles of reliability  Connection management  flow control  congestion control

Transport services and protocols  provide logical communication between processes running on different hosts  transport protocols run in end systems  End-to-end communications  send side: breaks app messages into segments, passes to network layer  rcv side: reassembles segments into messages, passes to app layer application transport network data link physical application transport network data link physical logical end-end transport

Internet transport-layer protocols  reliable, in-order delivery: TCP  Connection oriented  unreliable, unordered delivery: UDP  Mostly used for streaming services  DNS queries  More delay sensitive than loss sensitive application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical logical end-end transport

UDP: User Datagram Protocol [RFC 768]  At a quick glance:  “no frills,” “bare bones” Internet transport protocol  “best effort” service, UDP segments may be:  lost  delivered out of order to app  connectionless:  no handshaking between UDP sender, receiver  each UDP segment handled independently of others Why is there a UDP?  no connection establishment (which can add delay)  simple: no connection state at sender, receiver  small segment header – only 8 bytes compared to TCP’s 20 bytes  no congestion control: UDP can blast away as fast as desired

UDP: more  often used for streaming multimedia apps  loss tolerant  rate sensitive  other UDP uses  DNS  SNMP  DHCP  Majorly in control comn. source port #dest port # 32 bits Application data (message) UDP segment format length checksum Length, in bytes of UDP segment, including header

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

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 wraparound sum checksum

Internet Checksum Example  Suppose that we have the following:     What is the checksum?

Transport Layer Protocol for reliable data transfer

Principles of Reliable data transfer Sender sends one packet, then waits for receiver response stop and wait  Sender needs to know whether receiver has received the packets  Simplest implementation: A very interesting case of sequence numbers!

Stop & Wait protocol 15

World is not ideal Practical scenario: underlying channel can lose packets (data or ACKs) because of many reasons  What if data packet gets lost?  What if Ack packet gets lost?

Stop & wait protocol with loss 17

World is not ideal Practical scenario: underlying channel can lose packets (data or ACKs) because of many reasons  What if data packet gets lost?  What if Ack packet gets lost? Approach: sender waits “reasonable” amount of time for ACK  retransmits if no ACK received in this time 18

ACK packet lost 19

New constraint: Stop & wait protocol with delay Practical scenario:  What if Ack packet just delayed (not lost) Approach: sender waits “reasonable” amount of time for ACK  retransmits if no ACK received in this time  if pkt (or ACK) just delayed (not lost):  retransmission will be duplicate  Sender, receiver need to specify seq # of pkt being handled 20

Stop & wait protocol with delay 21

Performance of stop-and-wait first packet bit transmitted, t = 0 senderreceiver RTT last packet bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R Packet size = 8 Kb Transmission rate = 1 Mbps = 30 sec. Not very efficient!!!

Transport Layer 3-23 Pipelined protocols pipelining: sender allows multiple, “in-flight”, yet-to-be- acknowledged pkts  range of sequence numbers must be increased  buffering at sender and/or receiver  two generic forms of pipelined protocols: go-Back-N, selective repeat

Transport Layer 3-24 Pipelining: increased utilization first packet bit transmitted, t = 0 senderreceiver RTT last bit transmitted, t = L / R first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R last bit of 2 nd packet arrives, send ACK last bit of 3 rd packet arrives, send ACK 3-packet pipelining increases utilization by a factor of 3

Transport Layer 3-25 Pipelined protocols: overview Go-back-N:  sender can have up to N unacked packets in pipeline  receiver only sends cumulative ack  doesn’t ack packet if there’s a gap  sender has timer for oldest unacked packet  when timer expires, retransmit all unacked packets Selective Repeat:  sender can have up to N unack’ed packets in pipeline  rcvr sends individual ack for each packet  sender maintains timer for each unacked packet  when timer expires, retransmit only that unacked packet

Transport Layer 3-26 Go-Back-N: sender  k-bit seq # in pkt header  “window” of up to N, consecutive unack’ed pkts allowed  ACK(n): ACKs all pkts up to, including seq # n - “cumulative ACK”  may receive duplicate ACKs (see receiver)  timer for oldest in-flight pkt  timeout(n): retransmit packet n and all higher seq # pkts in window

Transport Layer 3-27 ACK-only: always send ACK for correctly-received pkt with highest in-order seq #  may generate duplicate ACKs  need only remember expectedseqnum  out-of-order pkt:  discard (don’t buffer): no receiver buffering!  re-ACK pkt with highest in-order seq # GBN: receiver

Transport Layer 3-28 GBN in action send pkt0 send pkt1 send pkt2 send pkt3 (wait) sender receiver receive pkt0, send ack0 receive pkt1, send ack1 receive pkt3, discard, (re)send ack1 rcv ack0, send pkt4 rcv ack1, send pkt5 pkt 2 timeout send pkt2 send pkt3 send pkt4 send pkt5 X loss receive pkt4, discard, (re)send ack1 receive pkt5, discard, (re)send ack1 rcv pkt2, deliver, send ack2 rcv pkt3, deliver, send ack3 rcv pkt4, deliver, send ack4 rcv pkt5, deliver, send ack5 ignore duplicate ACK sender window (N=4)

Transport Layer 3-29 Selective repeat  receiver individually acknowledges all correctly received pkts  buffers pkts, as needed, for eventual in-order delivery to upper layer  sender only resends pkts for which ACK not received  sender timer for each unACKed pkt  sender window  N consecutive seq #’s  limits seq #s of sent, unACKed pkts

Transport Layer 3-30 Selective repeat data from above:  if next available seq # in window, send pkt timeout(n):  resend pkt n, restart timer ACK(n) :  mark pkt n as received  if n smallest unACKed pkt, advance window base to next unACKed seq # sender pkt n  send ACK(n)  out-of-order: buffer  in-order: deliver (also deliver buffered, in-order pkts), advance window to next not-yet-received pkt otherwise:  ignore receiver

Transport Layer 3-31 Selective repeat in action send pkt0 send pkt1 send pkt2 send pkt3 (wait) sender receiver receive pkt0, send ack0 receive pkt1, send ack1 receive pkt3, buffer, send ack3 rcv ack0, send pkt4 rcv ack1, send pkt5 pkt 2 timeout send pkt2 X loss receive pkt4, buffer, send ack4 receive pkt5, buffer, send ack5 rcv pkt2; deliver pkt2, pkt3, pkt4, pkt5; send ack2 record ack3 arrived sender window (N=4) record ack4 arrived record ack5 arrived Q: what happens when ack2 arrives?

Transport Layer 3-32 Selective repeat: dilemma example:  seq #’s: 0, 1, 2, 3  window size=3 receiver window (after receipt) sender window (after receipt) pkt0 pkt1 pkt pkt0 timeout retransmit pkt X X X will accept packet with seq number 0 (b) oops! pkt0 pkt1 pkt pkt X will accept packet with seq number pkt3 (a) no problem receiver can’t see sender side. receiver behavior identical in both cases! something’s (very) wrong!  receiver sees no difference in two scenarios!  duplicate data accepted as new in (b) Q: what relationship between seq # size and window size to avoid problem in (b)?

Transport Layer 3-33 Reliable Data Transfer Mechanisms  Acknowledgement  to tell the sender that a packet or set of packets has been received correctly.  Pipelining  to improve sender utilization over a stop- and- wait mode of operation.  Checksum  to detect bit errors in a transmitted packet  Timer  to timeout/ retransmit a packet, possibly because the packet ( or its ACK) was lost within the channel  Sequence Number  for sequential numbering of packets of data flowing from sender to receiver.

Transport Layer 3-34 TCP: Overview RFCs: 793,1122,1323, 2018, 2581  full duplex data:  bi-directional data flow in same connection  MSS: maximum segment size  connection-oriented:  handshaking (exchange of control msgs) inits sender, receiver state before data exchange  flow controlled:  sender will not overwhelm receiver  point-to-point:  one sender, one receiver  reliable, in-order byte steam:  no “message boundaries”  pipelined:  TCP congestion and flow control set window size

Transport Layer 3-35 TCP segment structure source port # dest port # 32 bits application data (variable length) sequence number acknowledgement number receive window Urg data pointer checksum F SR PAU head len not used options (variable length) URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) # bytes rcvr willing to accept counting by bytes of data (not segments!) Internet checksum (as in UDP)

Transport Layer 3-36 TCP seq. numbers, ACKs sequence numbers:  byte stream “number” of first byte in segment’s data acknowledgements:  seq # of next byte expected from other side  cumulative ACK Q: how receiver handles out-of-order segments  A: TCP spec doesn’t say, - up to implementor source port # dest port # sequence number acknowledgement number checksum rwnd urg pointer incoming segment to sender A sent ACKed sent, not- yet ACKed (“in-flight”) usable but not yet sent not usable window size N sender sequence number space source port # dest port # sequence number acknowledgement number checksum rwnd urg pointer outgoing segment from sender

Transport Layer 3-37 TCP seq. numbers, ACK s User types ‘c’ host ACKs receipt of echoed‘C’ host ACKs receipt of ‘c’, echoes back ‘C’ simple telnet scenario Host B Host A Seq=42, ACK=79, data = ‘c’ Seq=79, ACK=43, data = ‘C’ Seq=43, ACK=80

Coming up… Further details on TCP