Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring 20061 CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.

Slides:



Advertisements
Similar presentations
Introduction 1 Lecture 13 Transport Layer (Transmission Control Protocol) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer.
Advertisements

CCNA – Network Fundamentals
Chapter 7: Transport Layer
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
TELE 402 Lecture 11: Advanced UDP… 1 by Dr Z. Huang Overview Last Lecture –Nonblocking I/O and ioctl operations –Source: Chapter 16 & 17 of Stevens’ book.
Out-of-Band Data© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science.
CS3505 The Internet and Info Hiway transport layer protocols : TCP/UDP.
Chapter 7 – Transport Layer Protocols
Elementary TCP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
1 Chapter 6 Datagram Delivery by UDP Just as the Internet Protocol uses the services of subnetworks, transport protocols build upon the services of IP.
TCP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
Reliable Networking Systems The goals: Implement a reliable network application of a file sharing network. Implement a reliable network application of.
Computer Network Architecture and Programming
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Application Layer PART VI.
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
1 CCNA 2 v3.1 Module Intermediate TCP/IP CCNA 2 Module 10.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
UDP© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
Process-to-Process Delivery:
The Transport Layer.
Elementary UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
1 Semester 2 Module 10 Intermediate TCP/IP Yuda college of business James Chen
1 Chapter Overview TCP/IP DoD model. 2 Network Layer Protocols Responsible for end-to-end communications on an internetwork Contrast with data-link layer.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 7: Transport Layer Introduction to Networking.
TCP/IP: Basics1 User Datagram Protocol (UDP) Another protocol at transport layer is UDP. It is Connectionless protocol i.e. no need to establish & terminate.
IP and Errors IP Best Effort Datagrams can be: –Lost –Delayed –Duplicated –Delivered out of order –Corrupted.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
Transport Layer Layer #4 (OSI-RM). Transport Layer Main function of OSI Transport layer: Accept data from the Application layer and prepare it for addressing.
1 Version 3.0 Module 11 TCP Application and Transport.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 3 Transport Layer.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 OSI Transport Layer Network Fundamentals – Chapter 4.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
11 TRANSPORT LAYER PROTOCOLS Chapter 6 TCP and UDP SPX and NCP.
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
Multicasting Part I© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer.
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
Computer Networks23-1 PART 5 Transport Layer. Computer Networks23-2 Position of Transport Layer Responsible for the delivery of a message from one process.
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
McGraw-Hill©2003 The McGraw-Hill Companies, Inc. Chapter 3 Transport Layer.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
© 2002, Cisco Systems, Inc. All rights reserved..
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
1 K. Salah Application Layer Module K. Salah Network layer duties.
Process-to-Process Delivery:
Chapter 7: Transport Layer
UDP Socket Programming
Introduction To Application Layer
Chapter 11 User Datagram Protocol
Chapter 9: Transport Layer
Instructor Materials Chapter 9: Transport Layer
Introduction to Networks
PART 5 Transport Layer Computer Networks.
Magda El Zarki Professor, ICS UC, Irvine
Working at a Small-to-Medium Business or ISP – Chapter 7
Working at a Small-to-Medium Business or ISP – Chapter 7
Chapter 14 User Datagram Protocol (UDP)
Working at a Small-to-Medium Business or ISP – Chapter 7
CSC Advanced Unix Programming, Fall 2015
TCP and UDP Layer 3 of the TCP/IP protocol stack. Transport layer
CPEG514 Advanced Computer Networkst
PART V Transport Layer.
PART 5 Transport Layer.
Process-to-process delivery UDP TCP SCTP
Presentation transcript:

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department Virginia Tech Advanced UDP Sockets

© Dr. Ayman Abdel-Hamid, CS4254 Spring Outline Advanced UDP Sockets (Chapter 22)  UDP or TCP? (section 22.4)  Adding Reliability to a UDP Application (section 22.5)  Concurrent UDP Servers (section 22.7)

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring UDP or TCP ? UDP must be used for broadcast or multicast  Error control?  Reliable multicast protocols UDP can be used for simple request-reply applications  Acknowledgments, timeouts, and retransmission?  Flow control? TCP for bulk data transfer  An exception is TFTP (Trivial File Transfer Protocol)

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring Adding Reliability to a UDP Application 1/2 Need to add 2 features Sequence numbers so client can verify that a reply is for the appropriate request  Client adds a sequence number to each request and server echo number back to client in reply Timeout and retransmissions to handle datagrams that are discarded  Send a request and wait for N seconds  If no response, retransmit and wait another N seconds  Repeat for a number of times and then application gives up  A linear retransmission timer

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring Adding Reliability to a UDP Application 2/2 Timeout and retransmissions to handle datagrams that are discarded  RTT can vary from LAN to WAN  RTT between a client and server can change rapidly  Need a timeout and retransmission algorithm, that takes into account actual RTT

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring Concurrent UDP Servers 1/4 Most UDP servers are iterative  Wait for client request, read request, process request, send back reply  How about if processing of client request takes along time  need for concurrency Simple to fork with TCP every client connection is unique TCP socket pair is unique for every connection What about UDP?

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring Concurrent UDP Servers 2/4 Two different types of UDP servers  Simple UDP server Server reads client request Fork a child to handle the request Request and socket address structure containing the client’s protocol address passed to child in its memory image from fork Child sends reply directly to client

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring Concurrent UDP Servers 3/4 Two different types of UDP servers  More involved UDP server Exchanges multiple datagrams with the client Client only knows the server’s well-known port number Client sends first datagram of its request to well- known port number How can the server distinguish between subsequent datagrams from that client and new requests?

Advanced UDP Sockets© Dr. Ayman Abdel-Hamid, CS4254 Spring Concurrent UDP Servers 4/4 Two different types of UDP servers  More involved UDP server How can the server distinguish between subsequent datagrams from that client and new requests?  Server creates a new socket for each client  Binds an ephemeral port to that socket  Use that socket for all its replies  Client must look at port number of the server’s first reply and send subsequent datagrams for this request to that port