Computer Communication Networks Midterm Review

Similar documents
Transport Layer Protocols

Final for ECE374 05/06/13 Solution!!

First Midterm for ECE374 03/09/12 Solution!!

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

Computer Networks & Security 2014/2015

Computer Networks. Chapter 5 Transport Protocols

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

First Midterm for ECE374 02/25/15 Solution!!

First Midterm for ECE374 03/24/11 Solution!!

Architecture and Performance of the Internet

Digital Audio and Video Data

Transport Layer and Data Center TCP

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

Ethernet. Ethernet. Network Devices

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Delay, loss, layered architectures. packets queue in router buffers. packets queueing (delay)

TCP in Wireless Mobile Networks

How do I get to

Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

Internet structure: network of networks

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Chapter 5. Transport layer protocols

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

La couche transport dans l'internet (la suite TCP/IP)

Computer Networks and the Internet

Network Performance: Networks must be fast. What are the essential network performance metrics: bandwidth and latency

[Prof. Rupesh G Vaishnav] Page 1

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

Introduction. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

Visualizations and Correlations in Troubleshooting

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Chapter 1 Computer Networks and the Internet

Mobile Communications Chapter 9: Mobile Transport Layer

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Protocols. Packets. What's in an IP packet

Computer Networks UDP and TCP

D. SamKnows Methodology 20 Each deployed Whitebox performs the following tests: Primary measure(s)

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

Transport Layer. Chapter 3.4. Think about

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

Overview of Computer Networks

Computer Networks Homework 1

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Objectives of Lecture. Network Architecture. Protocols. Contents

Chapter 11. User Datagram Protocol (UDP)

Computer Networks - CS132/EECS148 - Spring

This sequence diagram was generated with EventStudio System Designer (

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

Lecture 28: Internet Protocols

ECE/CS 372 introduction to computer networks. Lecture 2. Midterm scheduled for Tuesday, May 7 th

La couche transport dans l'internet (la suite TCP/IP)

TCP for Wireless Networks

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Homework 2 assignment for ECE374 Posted: 02/20/15 Due: 02/27/15

Protocols and Architecture. Protocol Architecture.

Application Layer. CMPT Application Layer 1. Required Reading: Chapter 2 of the text book. Outline of Chapter 2

2 TCP-like Design. Answer

Computer Networks - CS132/EECS148 - Spring

CS268 Exam Solutions. 1) End-to-End (20 pts)

Transport and Network Layer

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Strategies. Addressing and Routing

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

TCP Performance Management for Dummies

2.1 Introduction. 2.2 Voice over IP (VoIP)

1. The Web: HTTP; file transfer: FTP; remote login: Telnet; Network News: NNTP; SMTP.

Written examination in Computer Networks

CH.1. Lecture # 2. Computer Networks and the Internet. Eng. Wafaa Audah. Islamic University of Gaza. Faculty of Engineering

15-441: Computer Networks Homework 2 Solution

IP - The Internet Protocol

How To Understand The Internet Of S (Netware)

Congestions and Control Mechanisms n Wired and Wireless Networks

Internet Control Protocols Reading: Chapter 3

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

What is Network Latency and Why Does It Matter?

Multiple Choice Questions

Introduction, Rate and Latency

How To Understand The Internet From A Telephone To A Computer (For A Computer)

Networking Test 4 Study Guide

Based on Computer Networking, 4 th Edition by Kurose and Ross

Answer: that dprop equals dtrans. seconds. a) d prop. b) d trans

Introduction to TCP/IP

Classes of multimedia Applications

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

Computer Networks CS321

IP address format: Dotted decimal notation:

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

Based on Computer Networking, 4 th Edition by Kurose and Ross

An Introduction to VoIP Protocols

Transcription:

Computer Communication Networks Midterm Review ICEN/ICSI 416 Fall 2016 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 grader show you where you made a mistake. 2

What is included? Foundation Application Layer Transport Layer The material covered by Prof. Hany Elgala will NOT be included in the midterm. 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 80 Slow Start Congestion Avoidance Congestion Avoidance Slow Start Congestion Window Size 70 60 50 40 30 20 10 Round: Packet # 1: P1 2: P2, P3 3: P4-P7 4: P8-P15 ssthresh = 64 Triple Duplicate ACK cwnd = cwnd/2 ssthresh = cwnd/2 = 36 Timeout ssthresh = cwnd/2 = 26 0 1 6 11 16 21 26 31 Transmission Rounds 37

Good Luck!!! 38