CMPE 150 Introduction to Computer Networks Dr Chane L Fullmer chane cse ucsc edu Spring 2003 UCSC cmpe150 1 Homework Assignments Homework assignment 4 Chapter three Due May 29 THIS THURSDAY Spring 2003 UCSC cmpe150 2 Homework Assignments Homework assignment 5 Chapter two Due June 5th only one short week from today Spring 2003 UCSC cmpe150 3 Optional Class Project Network programming project Goal In lieu of taking final examination Or just a wildcard for mid term or final Build an FTP client server from scratch Using C language Details on web page now Due by next Wednesday Spring 2003 UCSC June 4th cmpe150 4 Class Final Exam Final exam Three hours 40 50 questions comprehensive Multiple choice as the midterm Scantron bring your sheet and pencils Wednesday June 11th 8 00 11 00 AM Spring 2003 Two weeks from tomorrow Tick tick tick UCSC cmpe150 5 CMPE 150 Introduction to Computer Networks Set 16 MORE End to End Transmission Control TCP and UDP Spring 2003 UCSC cmpe150 6 Flow Control vs Congestion Control Congestion control Global issue concerns all routers and hosts on path from Source to Destination make sure every subnet can handle the traffic Router 1Mbps Router 1Mbps 1Mbps Receiver Senders Spring 2003 UCSC cmpe150 7 Flow Control vs Congestion Control Flow Control Involves two endpoints Make sure sender doesn t transmit faster than receiver can absorb packets Server 1Gbps Spring 2003 File transfer UCSC cmpe150 PC 1Mbps 8 TCP Flow Control Transmission Window a k a congestion window cwnd Sliding window maintained by sender conservation of packets Receiver s window set through socket API controlled by the receiver advertised to the sender in field of TCP header RAW cwnd 1 2 3 4 5 6 7 8 9 10 Sent and ACKed 11 12 Can t send Sent not ACKed Send ASAP Spring 2003 UCSC cmpe150 9 Data Flow Conservation of packets Inject new packets at the rate ACKs are returned by receiver New window cwnd initially cwnd 1 segment Sender s window min cwnd RAW Spring 2003 UCSC cmpe150 10 TCP Congestion Control Slow Start Due to Van Jacobson SIGCOMM 88 Algorithm used at beginning of connection and after a timeout leads to exponential growth in the amount of outstanding data in network cwnd doubles every RTT Algorithm When an ACK is received before timeout Spring 2003 cwnd cwnd 1 for each ack d segment UCSC cmpe150 11 TCP Congestion Control Slow start continues until BWDP is exceeded then Routers drop packets losses occur Need to stop exponential increase Use congestion avoidance to deal with lost packets Slow down the transmission rate Provide for linear increase of the transmission window In practice congestion avoidance implemented together with slow start Spring 2003 UCSC cmpe150 12 Congestion Avoidance CA is flow control imposed by the sender Introduce a new variable ssthresh initialized to 65 535 max window If timeout set ssthresh cwnd 2 and cwnd 1 Re enter slow start until cwnd ssthresh When cwnd ssthresh then grow cwnd linearly until it reaches RAW ACK is received before a timeout then Spring 2003 cwnd cwnd 1 cwnd Hence cwnd increases by 1 segment every RTT UCSC cmpe150 13 Putting it together Slow start and congestion avoidance The algorithm If cwnd ssthresh do slow start Else if cwnd ssthresh Spring 2003 do congestion avoidance UCSC cmpe150 14 Graph of CA and SS Spring 2003 UCSC cmpe150 15 TCP Congestion Control Underdamped Feedback System cwnd ssthresh ssthresh 2 rt times Spring 2003 UCSC cmpe150 16 Problems with CA and SS Slow start is an attempt to discover the network bandwidth Discovery proceeds by filling network queues in intermediate routers Once queues are full routers drop packets Once loss discovered it s too late TCP sender reduces window when loss is discovered Queue level oscillates between full and cwnd 2 What sort of problems does this introduce Spring 2003 UCSC cmpe150 17 Fast Retransmit and Fast Recovery When third duplicate ACK is detected For each additional duplicate ACK Retransmit missing segment Set ssthresh cwnd 2 Set cwnd ssthresh 3 increment cwnd by one segment transmit a new packet if possible why With each ACK we know a data pkt left the network When new ACK arrives cwnd ssthresh Spring 2003 UCSC cmpe150 18 Nagle s Algorithm Problem with interactive applications such as Telnet or Rlogin produce tinygrams Normally each keystroke generates a packet 40 bytes overhead for one byte of data is unacceptable Plus server echoes the data Keystroke Data byte server Ack of data byte Client echo Echo of data byte Server Display Ack of echoed data Spring 2003 UCSC cmpe150 19 Nagle s Algorithm Solution proposed in RFC 896 in 1984 For Silly Window Syndrome Solution only one outstanding small segment is allowed no additional small segments can be sent until the previous is ACKed Once the ACK arrives several small segments will have been buffered and can now be transmitted Solution is self clocking based on ACK arrival Sometimes Nagle s alg Should be turned off X window system server Spring 2003 need to send mouse movements for real time applications UCSC cmpe150 20 Improvements to TCP SACK include information in the ACK which indicates missing packets in the window Vegas use rate control instead of arrival of ACKs to pace data into network Santa Cruz use relative delay over forward path to anticipate queue buildup Spring 2003 UCSC cmpe150 21 TCP SACK Goal Improve TCP error recovery mechanism Selectively acknowledge lost data within the transmission window Uses sequence number ranges example ACK 1000 SACK 1040 1080 Limited by max size of TCP header to 3 distinct ranges Important when there are multiple losses per window multiple losses often results in a timeout Significance performance improvements in wired networks Does this approach improve congestion control Spring 2003 UCSC cmpe150 22 TCP Vegas Brakmo and O Malley Sigcomm 96 Two main parts new and early retransmission mechanism new congestion policy Improved RTT estimate sender records time for every packet sent calculate RTT for every ACK received Spring 2003 UCSC cmpe150 23 Vegas Retransmission Policy When a duplicate ACK is received if current time timestamp RTO retransmit segment Note earlier retransmission than Reno if elapsed time is not large enough check again for 2nd duplicate ACK finally retransmit on 3rd duplicate ACK Allows for faster retransmissions when duplicates arrive Spring 2003 UCSC cmpe150 24 Vegas Retransmission Policy cont When nonduplicate ACK arrives if 1st or 2nd after a retransmission check timestamp on all
View Full Document
Unlocking...