C OMPUTER NETWORKING HOMEWORK 2. UDP VS. TCP UDP Unreliable Unordered delivery No congestion control, flow control, connection setup TCP Reliable In-order.

Slides:



Advertisements
Similar presentations
Transport Layer – TCP (Part2) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Advertisements

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.
TCP: Transmission Control Protocol Overview Connection set-up and termination Interactive Bulk transfer Timers Improvements.
Chapter 7 – Transport Layer Protocols
Computer Networks 2 Lecture 2 TCP – I - Transport Protocols: TCP Segments, Flow control and Connection Setup.
TRANSPORT LAYER  Session multiplexing  Segmentation  Flow control (TCP)  Connection-oriented (TCP)  Reliability (TCP)
Network Protocols Mark Stanovich Operating Systems COP 4610.
Transport Layer 3-1 Transport services and protocols  provide logical communication between app processes running on different hosts  transport protocols.
UNIT 07 Process – to – Process Delivery: UDP,TCP and SCTP
EEC-484/584 Computer Networks Lecture 12 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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.
1 TCP Transport Control Protocol Reliable In-order delivery Flow control Responds to congestion “Nice” Protocol.
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
EEC-484/584 Computer Networks Lecture 6 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EE 4272Spring, 2003 Chapter 7 Data Link Control Objectives: Effective & reliable data communication between two directly connected transmitting-receiving.
Copyright © 2005 Department of Computer Science CPSC 641 Winter Tutorial: TCP 101 The Transmission Control Protocol (TCP) is the protocol that sends.
Process-to-Process Delivery:
TCP: flow and congestion control. Flow Control Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a.
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.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
26-TCP Dr. John P. Abraham Professor UTPA. TCP  Transmission control protocol, another transport layer protocol.  Reliable delivery  Tcp must compensate.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
Transport Layer Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
Transport Control Protocol (TCP) Features of TCP, packet loss and retransmission, adaptive retransmission, flow control, three way handshake, congestion.
23.1 Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
CSE679: Computer Network Review r Review of the uncounted quiz r Computer network review.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Today’s topic: UDP Reliable communication over UDP.
TCP OVER ADHOC NETWORK. TCP Basics TCP (Transmission Control Protocol) was designed to provide reliable end-to-end delivery of data over unreliable networks.
ECE 4110 – Internetwork Programming
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.
Transport Protocols.
Transport Layer: Sliding Window Reliability
1 Computer Communication & Networks Lecture 23 & 24 Transport Layer: UDP and TCP Waleed Ejaz
IT 424 Networks2 IT 424 Networks2 Ack.: Slides are adapted from the slides of the book: “Computer Networking” – J. Kurose, K. Ross Chapter 3: Transport.
CS 145A Reliable Communication Netlab.caltech.edu/course.
CIS679: TCP and Multimedia r Review of last lecture r TCP and Multimedia.
INF3190 – Home Exam 2. Goal The goal of this exercise is to provide network layer reliability for the monitoring/administration tool presented in “home.
Transmission Control Protocol (TCP) TCP Flow Control and Congestion Control CS 60008: Internet Architecture and Protocols Department of CSE, IIT Kharagpur.
Network Protocols Andy Wang Operating Systems COP 4610 / CGS 5765.
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
Computer Networking Lecture 16 – Reliable Transport.
DMET 602: Networks and Media Lab Amr El Mougy Yasmeen EssamAlaa Tarek.
Fast Retransmit For sliding windows flow control we waited for a timer to expire before beginning retransmission of a packet TCP uses an additional mechanism.
Introduction to Networks
COMP 431 Internet Services & Protocols
Process-to-Process Delivery
Magda El Zarki Professor, ICS UC, Irvine
Sarah Diesburg Operating Systems COP 4610
Andy Wang Operating Systems COP 4610 / CGS 5765
CPEG514 Advanced Computer Networkst
Chapter 5 Transport Layer Introduction
Transport Protocols: TCP Segments, Flow control and Connection Setup
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Computer network HW2 -Retransmission + Congest control
Transport Layer 9/22/2019.
Presentation transcript:

C OMPUTER NETWORKING HOMEWORK 2

UDP VS. TCP UDP Unreliable Unordered delivery No congestion control, flow control, connection setup TCP Reliable In-order delivery Congestion control Flow control Connection setup

T ARGET Implement TCP by UDP Socket programming

A RCHITECTURE (1/2) Implement programs File transmitter 1 program for both sender and receiver or 1 program for sender and 1 program for receiver are all permitted Agent File transmitter Reliable transmission on UDP Congestion control Agent Control loss rate

A RCHITECTURE (2/2) Sender A Receiver C Data1 Ack1 Agent B

R ELIABLE T RANSMISSION (1/3) Implement the program that… Works as sender and receiver Transmit files by UDP Guarantee reliability Retransmission Time out Sequence number Acknowledge

R ELIABLE T RANSMISSION (2/3) SenderReceiver Data1 Ack1

R ELIABLE T RANSMISSION (3/3) SenderReceiver Data1 Ack1

R EQUIREMENTS (1/4) Implement reliability on UDP socket Both DATA and ACK must be reliable and clearly distinguished The file received is exactly the same as it is sent

R EQUIREMENTS (2/4) ACK for acknowledgement FIN for closing the file transmission PSH for data transmission

R EQUIREMENTS (3/4) Data packet size : <=1KB File size : more than 0.5MB Time out : < 5sec.

R EQUIREMENTS (4/4) Sender and receiver shows message below send, receive, resend, time out, sequence number, DATA, ACK and FIN etc. Sender Receiver

A GENT (1/2) Implement an agent that… Drop packets randomly Show loss rate Parse packets and forward to the correct destination

A GENT (2/2) SA : A ; DA : BDATA : A → B SA : B ; DA : CDATA : B → C SA : C ; DA : BACK : C → B SA : B ; DA : AACK : B → A Sender A Receiver C Agent B Data1 Ack1

R EQUIREMENTS (1/2) Complete the agent Show the accumulated loss rate dropped DATA pkt / total DATA pkt Drop DATA packets only Do not drop ACK packets

R EQUIREMENTS (2/2) Sender, receiver and agent shows message below send, receive, resend, time out, sequence number, DATA, ACK and FIN etc. for file transmitter get, forward, drop, DATA, ACK, sequence number, loss rate, etc. Sender A Receiver C Agent B

C ONGESTION CONTROL (1/4) Implement congestion control on the transmitter with… Congestion window The number of packet you transmit Buffer for receiver Handling buffer overflow Slow start Threshold Packet loss Retransmission

C ONGESTION CONTROL (2/4) Slow start Send single packet in the beginning When below the threshold, congestion window increase exponentially until packet loss i.e. 1 → 2 → 4 → 8 → … When above the threshold, congestion window increase linearly until packet loss i.e. 16 → 17 → 18 → … Default threshold : 16 Default receiver buffer size : 32

C ONGESTION CONTROL (3/4)

C ONGESTION CONTROL (4/4) Buffer overflow Drop the packet Write to the file if buffer is full as well The following example is 4-buffer with default threshold 2 for demonstration only

4-B UFFER E XAMPLE (1/6) Sender Receiver buffer Sender send DATA 1 Congestion window = 1 threshold = 2 Receiver send ACK 1 1 Data1 Ack1

4-B UFFER E XAMPLE (2/6) Sender Receiver buffer Sender send DATA 2 & 3 Congestion window = 2 threshold = 2 Receiver send ACK 2 & Data2 Ack2 Data3 Ack3

4-B UFFER E XAMPLE (3/6) Sender Receiver buffer Sender send DATA 4 & 5 & 6 Congestion window = 3 (linear) threshold = 2 Receiver send ACK Data4 Ack4 Data5 Data6

4-B UFFER E XAMPLE (4/6) Sender Receiver buffer Receiver buffer overflow Drop DATA 5 & 6 Flush Data5 Data6

4-B UFFER E XAMPLE (5/6) Sender Receiver buffer Sender resend DATA 5 Congestion window = 1 threshold = 1 Receiver send ACK 5 5 Data5 Ack5

4-B UFFER E XAMPLE (6/6) Sender Receiver buffer Sender resend DATA 6 & send DATA 7 Congestion window = 2 threshold = 1 Receiver send ACK 6 & Data6 Ack6 Data7 Ack7

R EQUIREMENTS (1/2) Complete the transmitter with congestion control Show the accumulated loss rate, window size and threshold Drop DATA packets only Do not drop ACK packets

R EQUIREMENTS (2/2) Sender, receiver and agent shows message below Add ignore, drop, flush, window size, threshold, etc. Sender A Receiver C Agent B …

F ORMAT R EQUIREMENTS (1/2) Your program should be... Read data from file (i.e. file I/O) Correctly handles error responses The message must follow the format in the previous slide!!

F ORMAT R EQUIREMENTS (2/2) Naming b01902xxx_hw2_trans.c ( b01902xxx_hw2_send.c, b01902xxx_hw2_recv.c) b01902xxx_hw2_agent.c Compression tar -zcvf b01902xxx_hw2.tar.gz b01902xxx_hw2/ tar -zcvf b01902xxx_hw2_v2.tar.gz b01902xxx_hw2/ (new version) Upload server FTP server : voip.csie.org account/password : cn2014/cn2014

G RADING P OLICIES Reliable transmission - (20%) Agent - (25%) Congestion control - (25%) Clarity of your code (comments!) - (5%) Demo - (15%) Report - (10%) Execution instruction What you do, and how you do it Challenging issues and solutions

R EMINDERS Do not cheat! You cheat, you fail! Do not copy source codes from the Internet Read the spec carefully!! Ask TA if you have any question, except for debugging

D EADLINE Homework due 2014/12/12 23:59: Start your work as early as possible For late submission - 10% per day

HAPPY CODING AGAIN ^o^