Computer Communication Networks Midterm Review

Similar documents
Computer Communication Networks Midterm Review

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

Chapter 3 Transport Layer

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

Chapter III: Transport Layer

CSE 4213: Computer Networks II

Lecture 5. Transport Layer. Transport Layer 1-1

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

Computer Networking Introduction

TCP (Part 2) Session 10 INST 346 Technologies, Infrastructure and Architecture

10 minutes survey (anonymous)

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 9

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

CSC 401 Data and Computer Communications Networks

Transport Layer: outline

Fall 2012: FCM 708 Bridge Foundation I

Chapter 3 Transport Layer

CS 4390 Computer Networks. Pointers to Corresponding Section of Textbook

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

CS450 Introduc0on to Networking Lecture 14 TCP. Phu Phung Feb 13, 2015

Chapter 3 Transport Layer

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

Chapter 3- parte B outline

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

CSCD 330 Network Programming

CSC 4900 Computer Networks: TCP

Transport Layer: Outline

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

Chapter 3 Transport Layer

COMP 431 Internet Services & Protocols. Transport Layer Protocols & Services Outline. The Transport Layer Reliable data delivery & flow control in TCP

Chapter III: Transport Layer

TCP. TCP: Overview. TCP Segment Structure. Maximum Segment Size (MSS) Computer Networks 10/19/2009. CSC 257/457 - Fall

Lecture 8. TCP/IP Transport Layer (2)

Routers. Session 12 INST 346 Technologies, Infrastructure and Architecture

Computer Networking: A Top Down Approach

CNT 6885 Network Review on Transport Layer

Chapter 3 outline. TDTS06 Computer networks. Principles of Reliable data transfer. Reliable data transfer: getting started

CS Lecture 1 Review of Basic Protocols

RSC Part III: Transport Layer 3. TCP

The Transport Layer: TCP & Reliable Data Transfer

Lecture 12: Transport Layer TCP again

Transport Protocols and TCP

CSC 8560 Computer Networks: TCP

CC451 Computer Networks

CS 43: Computer Networks. 18: Transmission Control Protocol October 12-29, 2018

Application. Transport. Network. Link. Physical

Department of Computer and IT Engineering University of Kurdistan. Transport Layer. By: Dr. Alireza Abdollahpouri

TCP: Overview RFCs: 793,1122,1323, 2018, 2581

LECTURE 3 - TRANSPORT LAYER

Chapter 3 Transport Layer

CS457 Transport Protocols. CS 457 Fall 2014

CSCE 463/612 Networks and Distributed Processing Spring 2017

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

Chapter 3 Transport Layer

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

Lecture 3 The Transport Control Protocol (TCP) Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

The Transport Layer Multiplexing, Error Detection, & UDP

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

NWEN 243. Networked Applications. Layer 4 TCP and UDP

The Transport Layer Reliable data delivery & flow control in TCP. Transport Layer Protocols & Services Outline

Foundations of Telematics

TCP: Overview RFCs: 793, 1122, 1323, 2018, 2581

TCP : Fundamentals of Computer Networks Bill Nace

Master Course Computer Networks IN2097

Final Exam for ECE374 05/03/12 Solution!!

Distributed Systems. 5. Transport Protocols

Chapter 3 Transport Layer

Chapter 3: Transport Layer. Chapter 3 Transport Layer. Chapter 3 outline. Transport services and protocols

Distributed Systems. 5. Transport Protocols. Werner Nutt

By Ossi Mokryn, Based also on slides from: the Computer Networking: A Top Down Approach Featuring the Internet by Kurose and Ross

School of Engineering Department of Computer and Communication Engineering Semester: Fall Course: CENG415 Communication Networks

Pipelined protocols: overview

Course on Computer Communication and Networks. Lecture 5 Chapter 3; Transport Layer, Part B

Lecture 3: The Transport Layer: UDP and TCP

Chapter 3: Transport Layer Part A

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

CSC358 Week 5. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Internet and Intranet Protocols and Applications

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

CMPE150 Midterm Solutions

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START

Lecture 11: Transport Layer Reliable Data Transfer and TCP

Go-Back-N. Pipelining: increased utilization. Pipelined protocols. GBN: sender extended FSM

internet technologies and standards

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

Transmission Control Protocol

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

Chapter 6 Transport Layer

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

ECE 650 Systems Programming & Engineering. Spring 2018

MIDTERM EXAMINATION #2 OPERATING SYSTEM CONCEPTS U N I V E R S I T Y O F W I N D S O R S C H O O L O F C O M P U T E R S C I E N C E

Chapter 3: Transport Layer

Transport Layer PREPARED BY AHMED ABDEL-RAOUF

Internet transport-layer protocols. Transport services and protocols. Sending and receiving. Connection-oriented (TCP) Connection-oriented

internet technologies and standards

Transcription:

Computer Communication Networks Midterm Review ICEN/ICSI 416 Fall 2017 Prof. Dola Saha 1

Instructions Put your name and student id on each sheet of paper! The exam is closed book. You cannot use any computer or phone during the exam. You can use calculator, but not one from your phone or laptop. You have 60 minutes to complete the exam. Be a smart exam taker - if you get stuck on one problem go on to another problem. The total number of points for each question is given in parenthesis. There are 100 points total. Show all your work. Partial credit is possible for an answer, but only if you show the intermediate steps in obtaining the answer. If you make a mistake, it will also help the instructor show you where you made a mistake. 2

What is included? Foundation Application Layer Transport Layer 3

Packet Switching vs Circuit Switching A R = 100 Mb/s C B queue of packets waiting for output link R = 1.5 Mb/s D E Advantages Disadvantages 4

Internet Protocol Stack application: supporting network applications FTP, SMTP, HTTP transport: process-process data transfer TCP, UDP network: routing of datagrams from source to destination IP, routing protocols link: data transfer between neighboring network elements Ethernet, 802.11 (WiFi) physical: bits on the wire / over the air application transport network link physical 5

Encapsulation message segment datagram frame H n H l H n H t H t H t M M M M application transport network link physical source link physical switch H l H n H n H t H t H t M M M M destination application transport network link physical H l H n H n H t H t M M network link physical H n H t M router 6

Socket What is a socket? The point where a local application process attaches to the network An interface between an application and the network An application creates the socket The interface defines operations for Creating a socket Attaching a socket to the network Sending and receiving messages through the socket Closing the socket 7

Socket programming Two socket types for two transport services: UDP: unreliable datagram TCP: reliable, byte stream-oriented Server side: o DO NOT specify IP Address o By not specifying an IP Address, the application program is willing to accept connections on any of local hosts IP Addresses 8

Performance Bandwidth Width of the frequency band Number of bits per second that can be transmitted over a communication link 1 Mbps: 1 x 10 6 bits/second = 1x2 20 bits/sec Delay Time elapsed for a packet to travel from a sender to receiver seconds 9

Four Sources of Packet Delay A transmission propagation B nodal processing queueing d nodal = d proc + d queue + d trans + d prop d proc : nodal processing check bit errors determine output link typically < msec d queue : queueing delay time waiting at output link for transmission depends on congestion level of router 10

Four Sources of Packet Delay A transmission propagation B nodal processing queueing d nodal = d proc + d queue + d trans + d prop d trans : transmission delay: L: packet length (bits) R: link bandwidth (bps) d trans = L/R d trans and d prop very different d prop : propagation delay: d: length of physical link s: propagation speed in medium (~2x10 8 m/sec) d prop = d/s 11

Round Trip Time (RTT) Time: From packet starting to leave a node To response came back to the same node ßACK 12

Performance Latency = Propagation + processing + transmit + queue Propagation = distance/speed of light Transmit = size/bandwidth Processing = depends on the node (hardware + software), but fairly constant Queue = congestion in the node à changes with time One bit transmission => propagation is important Large bytes transmission => bandwidth is important 13

Delay X Bandwidth We think the channel between a pair of processes as a hollow pipe Latency (delay) length of the pipe and bandwidth the width of the pipe Delay of 50 ms and bandwidth of 45 Mbps 50 x 10-3 seconds x 45 x 10 6 bits/second 2.25 x 10 6 bits = 280 KB data. Significance This represents the maximum amount of data the sender can send before it would be possible to receive a response Network as a pipe 14

Persistent and non-persistent HTTP non-persistent HTTP issues: requires 2 RTTs per object OS overhead for each TCP connection browsers often open parallel TCP connections to fetch referenced objects persistent HTTP: server leaves connection open after sending response subsequent HTTP messages between same client/server sent over open connection client sends requests as soon as it encounters a referenced object as little as one RTT for all the referenced objects 15

Digital Audio (1) ADC (Analog-to-Digital Converter) produces digital audio from a microphone Telephone: 8000 8-bit samples/second (64 Kbps); computer audio is usually better quality (e.g., 16 bit) ADC Continuous audio (sine wave) Digital audio (sampled, 4-bit quantized) 16

Digital Video (3) Step 1: Pixels are mapped to luminance (brightness)/chrominance (YCbCr) color space Luma signal (Y), Chroma signal: 2 components (Cb and Cr) Chrominance is sub-sampled, the eye is less sensitive to chrominance Input 24-bit RGB pixels 8-bit luminance pixels 8-bit chrominances every 4 pixels for 17

Streaming Stored Media (5) Interleaving spreads nearby media samples over different transmissions to reduce the impact of loss Packet stream Media samples Loss reduces temporal resolution; doesn t leave a gap 18

DNS name resolution example host at cis.poly.edu wants IP address for gaia.cs.umass.edu root DNS server iterated query: contacted server replies with name of server to contact I don t know this name, but ask this server local DNS server dns.poly.edu 1 requesting host cis.poly.edu 2 8 3 4 5 7 TLD DNS server 6 authoritative DNS server dns.cs.umass.edu gaia.cs.umass.edu 19

Infrastructure Services Name Resolution Name resolution in practice, where the numbers 1 10 show the sequence of steps in the process. 20

BitTorrent: requesting, sending file chunks requesting chunks: at any given time, different peers have different subsets of file chunks periodically, Alice asks each peer for list of chunks that they have Alice requests missing chunks from peers, rarest first sending chunks: tit-for-tat Alice sends chunks to those four peers currently sending her chunks at highest rate other peers are choked by Alice (do not receive chunks from her) re-evaluate top 4 every 10 secs every 30 secs: randomly select another peer, starts sending chunks optimistically unchoke this peer newly chosen peer may join top 4 21

BitTorrent: tit-for-tat (1) Alice optimistically unchokes Bob (2) Alice becomes one of Bob s top-four providers; Bob reciprocates (3) Bob becomes one of Alice s top-four providers higher upload rate: find better trading partners, get file faster! 22

BitTorrent: another aspect Peers in a BitTorrent swarm download from other peers that may not yet have the complete file 23

UDP: User Datagram Protocol [RFC 768] 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 UDP use: streaming multimedia apps (loss tolerant, rate sensitive) DNS SNMP reliable transfer over UDP: add reliability at application layer application-specific error recovery! 24

UDP: segment header source port # dest port # length 32 bits application data (payload) UDP segment format checksum length, in bytes of UDP segment, including header why is there a UDP? no connection establishment (which can add delay) simple: no connection state at sender, receiver small header size no congestion control: UDP can blast away as fast as desired 25

rdt3.0: stop-and-wait operation first packet bit transmitted, t = 0 last packet bit transmitted, t = L / R sender receiver RTT first packet bit arrives last packet bit arrives, send ACK ACK arrives, send next packet, t = RTT + L / R U sender = L / R RTT + L / R =.008 30.008 = 0.00027 26

Pipelined protocols pipelining: sender allows multiple, in-flight, yet-to-beacknowledged 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 27

Pipelining: increased utilization first packet bit transmitted, t = 0 last bit transmitted, t = L / R sender receiver RTT ACK arrives, send next packet, t = RTT + L / R first packet bit arrives last packet bit arrives, send ACK 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! U sender = 3L / R RTT + L / R =.0024 30.008 = 0.00081 28

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 29

GBN in action sender window (N=4) sender receiver send pkt0 send pkt1 send pkt2 send pkt3 (wait) rcv ack0, send pkt4 rcv ack1, send pkt5 ignore duplicate ACK (ack1) pkt 2 timeout send pkt2 send pkt3 send pkt4 send pkt5 X loss receive pkt0, send ack0 receive pkt1, send ack1 receive pkt3, discard, (re)send ack1 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 30

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

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

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-oforder segments A: TCP spec doesn t say, - up to implementor outgoing segment from sender source port # dest port # sequence number acknowledgement number rwnd checksum sent ACKed urg pointer sent, not-yet ACKed ( in-flight ) window size N sender sequence number space incoming segment to sender source port # dest port # sequence number acknowledgement number A rwnd checksum usable but not yet sent urg pointer not usable 33

TCP round trip time, timeout Q: how to set TCP timeout value? longer than RTT but RTT varies too short: premature timeout, unnecessary retransmissions too long: slow reaction to segment loss Q: how to estimate RTT? SampleRTT: measured time from segment transmission until ACK receipt ignore retransmissions SampleRTT will vary, want estimated RTT smoother average several recent measurements, not just current SampleRTT 34

TCP round trip time, timeout EstimatedRTT = (1- a)*estimatedrtt + a*samplertt exponential weighted moving average influence of past sample decreases exponentially fast RTT: gaia.cs.umass.edu to fantasia.eurecom.fr typical value: a = 0.125 350 300 RTT: gaia.cs.umass.edu to fantasia.eurecom.fr RTT (milliseconds) RTT (milliseconds) 250 200 150 samplertt EstimatedRTT 100 Timeout = 2*EstimatedRTT 1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106 time (seconds) time (seconnds) SampleRTT Estimated RTT 35

Jacobson/Karels Algorithm timeout interval: EstimatedRTT plus safety margin large variation in EstimatedRTT -> larger safety margin estimate SampleRTT deviation from EstimatedRTT: RFC 6298 DevRTT = (1-b)*DevRTT + b*( SampleRTT-EstimatedRTT ) Measure of variability (typically, b = 0.25) TimeoutInterval = EstimatedRTT + 4*DevRTT estimated RTT safety margin 36

TCP Reno Congestion Window Size 80 70 60 50 40 30 20 10 Slow Start Round: Packet # 1: P1 2: P2, P3 3: P4-P7 4: P8-P15 Congestion Avoidance ssthresh = 64 ssthresh = cwnd/2 = 36 Triple Duplicate ACK cwnd = cwnd/2 Fast Recovery (dup ACK) followed by Congestion Avoidance (new ACK) Timeout Slow Start ssthresh = cwnd/2 = 26 0 1 6 11 16 21 26 31 Transmission Rounds 37

Good Luck!!! 38