CS/EE 145A Reliable Transmission over Unreliable Channel Netlab.caltech.edu/course.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
CCNA – Network Fundamentals
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
Intermediate TCP/IP TCP Operation.
Chapter 7 Intro to Routing & Switching.  Upon completion of this chapter, you should be able to:  Explain the need for the transport layer.  Identify.
10. UDP/TCP WWW page: Text book: Mastering Networks (Chapter 10) Network IP protocol is routes the data.
CPSC 441: Intro, UDP1 Transport Layer Instructor: Carey Williamson Office: ICT Class Location:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Transport Layer TCP and UDP IS250 Spring 2010
Gursharan Singh Tatla Transport Layer 16-May
Ensuring the Reliability of Data Delivery © 2004 Cisco Systems, Inc. All rights reserved. Understanding How UDP and TCP Work INTRO v2.0—6-1.
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Network Services Networking for Home and Small Businesses – Chapter.
Jaringan Komputer Dasar OSI Transport Layer Aurelio Rahmadian.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
Mukesh N. Tekwani Elphinstone College Mumbai
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Multi-part Messages in KMIP John Leiseboer, QuintessenceLabs.
Transport Layer and UDP Tahir Azim Ref:
Transport Layer OSI Model. The transport layer is responsible for the segmentation and the delivery of a message from one process to another.
3: Transport Layer 3a-1 8: Principles of Reliable Data Transfer Last Modified: 10/15/2015 7:04:07 PM Slides adapted from: J.F Kurose and K.W. Ross,
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
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.
CS 145A Implementation Issues Netlab.caltech.edu/course.
Multimedia and Networks. Protocols (rules) Rules governing the exchange of data over networks Conceptually organized into stacked layers – Application-oriented.
Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Networking Basics CCNA 1 Chapter 11.
Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 17 This presentation © 2004, MacAvon Media Productions Multimedia and Networks.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
Transport Protocols.
CS 145A Protocols Netlab.caltech.edu/course. Misc. Extension Extension Textbooks Textbooks.
CS/EE 145A Reliable Transmission over Unreliable Channel II Netlab.caltech.edu/course.
1 Version 3.1 Module 10 Intermediate TCP/IP (Layer 4)
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 User Datagram Protocol. 2 Transport Protocols Provide logical communication between application processes running on different hosts Run on end hosts.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CS 145A Reliable Communication Netlab.caltech.edu/course.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
2: Transport Layer 11 Transport Layer 1. 2: Transport Layer 12 Part 2: Transport Layer Chapter goals: r understand principles behind transport layer services:
Ch 3. Transport Layer Myungchul Kim
Ch 3. Transport Layer Myungchul Kim
UDP: User Datagram Protocol. What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host – treats a computer as an.
BASICS Gabriella Paolini (GARR) 27/05/11 - ICCU Roma 1 How INTERNET works !
Introduction to Networks
The Transport Layer Implementation Services Functions Protocols
Transport Layer Slides are originally from instructor: Carey Williamson at University of Calgary Very minor modification are made Notes derived from “Computer.
Chapter 3 outline 3.1 Transport-layer services
A quick intro to networking
Chapter 14 User Datagram Program (UDP)
Understand the OSI Model Part 2
Networking for Home and Small Businesses – Chapter 6
CS 1652 Jack Lange University of Pittsburgh
Introduction to Networks
Networking for Home and Small Businesses – Chapter 6
Transport Layer Our goals:
Topic 5: Communication and the Internet
Multimedia and Networks
Process-to-Process Delivery:
CPEG514 Advanced Computer Networkst
1 TRANSMISSION CONTROL PROTOCOL / INTERNET PROTOCOL (TCP/IP) K. PALANIVEL Systems Analyst, Computer Centre Pondicherry University, Puducherry –
Networking for Home and Small Businesses – Chapter 6
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Presentation transcript:

CS/EE 145A Reliable Transmission over Unreliable Channel Netlab.caltech.edu/course

Lab 1 Q&A: What happens if the udp client cannot receive my message? What happens if the udp client cannot receive my message? Shall I receive and print the message on the client side? Shall I receive and print the message on the client side? I did some extra work … I did some extra work … How do you grade my work? How do you grade my work?

Lab 1 Clients: Clients:

Lab 1 Server (Basic Functions): Server (Basic Functions):

Lab 1 Server (Advanced Function 1, Multi-connection): Server (Advanced Function 1, Multi-connection):

Lab 1 Server (Advanced Function 2, 3-connections): Server (Advanced Function 2, 3-connections):

Lab 1: Multiplexing Multiple Processes:  One process for each active TCP connection, one UDP process and one Listening process  How to tell the main process when the child processes finish the TCP connection?  SIGCHILD (with a handler in the main function)

Lab 1: Multiplexing Multiple Threads:  Similar to Multiple Processes  pthread_create

Lab 1: Multiplexing Single Process:  Check status of all ports with a single “ select ” function  Timeout of the “ select ” ?

Topics of this thread How does TCP/IP work? (roughly) How does TCP/IP work? (roughly) Design and implementation of protocols Design and implementation of protocols Application (HTTP, FTP, SSH, SMTP … ) Transportation (TCP) Networking (IP) MAC Physical Lab 1 Lab 2, 3, 4

Reliable Transmission over Unreliable Channel (I) TCP: Reliable Transmission Guarantee: The packets sent will be received with the same order. IP: Unreliable Transmission Best Efforts: Packets can be dropped, can be reordered, can be duplicated, can be …

Reliable Transmission over Unreliable Channel (I) TCP: Reliable Transmission Guarantee: The packets sent will be received with the same order. IP: Unreliable Transmission Best Efforts: Packets can be dropped, can be reordered, can be duplicated, can be … Stream

Reliable Transmission over Unreliable Channel (I) TCP: Reliable Transmission Guarantee: The packets sent will be received with the same order. IP: Unreliable Transmission Best Efforts: Packets can be dropped, can be reordered, can be duplicated, can be … Stream P1, P2, … ???

Reliable Transmission over Unreliable Channel: Goals We want the file to be transmitted without any error. We want the file to be transmitted without any error. We cannot make any assumption on the channel (The packet may be dropped, re-ordered, duplicated … in the middle). We cannot make any assumption on the channel (The packet may be dropped, re-ordered, duplicated … in the middle). We don’t want to waste time. We don’t want to waste time. We don’t want to waste bandwidth. We don’t want to waste bandwidth.

Reliable Transmission over Unreliable Channel: Difficulties How to split a file into packets? How to split a file into packets? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to recover from packets reordering? How to recover from packets reordering? How to recover from loss? How to recover from loss? How to use the bandwidth efficiently? How to use the bandwidth efficiently? How to share the bandwidth fairly? How to share the bandwidth fairly? …

Lab 2 How to split a file into packets? How to split a file into packets? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to recover from packets reordering? How to recover from packets reordering? How to recover from loss? How to recover from loss? How to use the bandwidth efficiently? How to use the bandwidth efficiently? How to share the bandwidth fairly? How to share the bandwidth fairly? …

Lab 3 How to split a file into packets? How to split a file into packets? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to recover from packets reordering? How to recover from packets reordering? How to recover from loss? How to recover from loss? How to use the bandwidth efficiently? How to use the bandwidth efficiently? How to share the bandwidth fairly? How to share the bandwidth fairly? …

Lab 4 How to split a file into packets? How to split a file into packets? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to detect errors (packet corruption, packet loss, duplication, reordering … )? How to recover from packets reordering? How to recover from packets reordering? How to recover from loss? How to recover from loss? How to use the bandwidth efficiently? How to use the bandwidth efficiently? How to share the bandwidth fairly? How to share the bandwidth fairly? …

Split a file File Sender Receiver What ’ s inside a packet?

Inside a packet Data Data Header Header  Help to reassembly  Help to detect errors

One Example: TCP Header Source: Detect Packet Corruption Packet Identification

Sequence Number (Packet ID) File Sender Receiver

In case of packet loss … File Sender Receiver Why? Please Retransmit: packet 3

In case of packets reordering … File Sender Receiver Why?

8 Packet duplication File Sender Receiver 2 Why?

Sequence Number (Packet ID) With the packet ID, the receiver side can recover from packet reordering and packet duplication. With the packet ID, the receiver side can recover from packet reordering and packet duplication. The receiver can detect packet loss. But it has to call sender for retransmission. The receiver can detect packet loss. But it has to call sender for retransmission.

CS/EE 145A Lab 2 Packet Netlab.caltech.edu/course

Tasks for Lab 2 ( Not a network programming! ) Assume there is no “ packet corruption ” : Design a packet format that can be used to transmit data reliably, over unreliable channels Design a packet format that can be used to transmit data reliably, over unreliable channels Implement conversion from a file to packets, at sender side. Implement conversion from a file to packets, at sender side. Implement error detection and file reassembly, at receiver side. Implement error detection and file reassembly, at receiver side.

Sequence Number (Packet ID) File Sender Receiver

Sender sender sender Read the file specified by (The file contains English characters and numbers only) Read the file specified by (The file contains English characters and numbers only) Convert this file into packets, each packet has at most bytes, including header. Convert this file into packets, each packet has at most bytes, including header. Save each packet to one file, with a file name as “ P txt ”, “ P txt ”, … Save each packet to one file, with a file name as “ P txt ”, “ P txt ”, …

Receiver receiver receiver Read the files for packets ( “ P txt ”, “ P txt ” ) Read the files for packets ( “ P txt ”, “ P txt ” ) WARNING: The filenames are always from 1 to. But packets may not have the same filenames assigned by the sender, due to “ packet loss ”, “ packet reordering ” or “ packet duplication ”. WARNING: The filenames are always from 1 to. But packets may not have the same filenames assigned by the sender, due to “ packet loss ”, “ packet reordering ” or “ packet duplication ”. Convert the packets into a file, specified by. Use one character “ # ” to indicate each lost packet. Convert the packets into a file, specified by. Use one character “ # ” to indicate each lost packet.

Example File: “ abcdefg ” Packet Size=10 bytes Header size = 7 bytes Payload = 3 bytes Sender: Output 3 files: P txt: + “ abc ” P txt: + “ def ” P txt: + “ g ”

Example After “ reordering ” (by a program written by TA): P txt: + “ abc ” P txt: + “ g ” P txt: + “ def ” Receiver: Output a file: “ abcdefg ”

Example After “ packet loss ” (by a program written by TA): P txt: + “ g ” P txt: + “ def ” Receiver: Output a file: “ #defg ”

Tips For the unknown commands, use “ man ” / “ info ”. For the unknown commands, use “ man ” / “ info ”. Be careful of the data structures Be careful of the data structures Testing: design some small examples to test your program Testing: design some small examples to test your program Start Earlier! Start Earlier!

Submission (due Nov 7 th 23:59:59) Task: sender.c; receiver.c; readme.txt Mailto: Documents:  How to use the programs: compile, run …  Design, testing cases, the problems you met  Any other comments

Grading Correctness (70%) Correctness (70%) Documentation and comments (20%) Documentation and comments (20%) Program style (10%) Program style (10%) TA Hours Tue: 20:00 ~22:00 JRG 170 Tue: 20:00 ~22:00 JRG 170 Thu: 20:00 ~22:00 JRG 170 Thu: 20:00 ~22:00 JRG 170