NWEN 243 Networked Applications Lecture 12: Layer 4 – Transport NWEN 243 © , Kris Bubendorfer.

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

Dr. Philip Cannata 1 Computer Networking. Dr. Philip Cannata 2.
1 TCP/IP Network and OSI Model. 2 What is a Protocol? n Allows entities (i.e. application programs) from different systems to communicate n Shared conventions.
Copyright 1999, S.D. Personick. All Rights Reserved. Telecommunications Networking II Lecture 32 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
Summer Workshop on Cyber Security Computer Networks Security (Part 1) Dr. Hamed Mohsenian-Rad University of California at Riverside and Texas Tech University.
Socket Programming.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS591 – Wireless & Network Security Lecture.
Networking Based on the powerpoint presentation of Computer Networking: A Top Down Approach Featuring the Internet, Third Edition, J.F. Kurose and K.W.
Lecture 3 Introduction 1-1 Chapter 1: roadmap 1.1 What is the Internet? 1.2 Network edge  end systems, access networks, links 1.3 Network core  circuit.
Networking Overview February 2, /2/2004 Assignments Due – Homework 0 Due – Reading and Warmup questions Work on Homework 1.
1 School of Computing Science Simon Fraser University CMPT 771/471: Internet Architecture and Protocols Socket Programming Instructor: Dr. Mohamed Hefeeda.
1-1 Internet Overview: roadmap 1.1 What is the Internet? 1.2 Network edge  end systems, access networks, links 1.3 Network core  circuit switching, packet.
Gursharan Singh Tatla Transport Layer 16-May
Throughput: Internet scenario
1 Week 2 Lecture 1 Layers (basics) Dr. Fei Hu. Review last lecture 2.
1 ELEN602 Lecture 2 Review of Last Lecture Layering.
1 Protocol “Layers” Networks are complex! r many “pieces”: m hosts m routers m links of various media m applications m protocols m hardware, software Question:
ECE 4400:427/527 - Computer Networks Spring 2015 Dr. Nghi Tran Department of Electrical & Computer Engineering Lecture 3: Network Architectures Dr. Nghi.
Introduction 1-1 “Real” Internet delays and routes  What do “real” Internet delay & loss look like?  Traceroute program: provides delay measurement from.
Copyright 2002, S.D. Personick. All Rights Reserved.1 Telecommunications Networking II Topic 20 Transmission Control Protocol (TCP) Ref: Tanenbaum pp:
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Fall 2005 By: H. Veisi Computer networks course Olum-fonoon Babol Chapter 6 The Transport Layer.
The Transport Layer application transport network data link physical application transport network data link physical application transport network data.
TCP/IP Network.
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
1 Computer Networks & The Internet Lecture 4 Imran Ahmed University of Management & Technology.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
Interfaces and Services Each layer provides a service to the layer above it. A service is a set of primitive operations. Under UNIX, primitives are implemented.
1 ECE453 - Introduction to Computer Networks Lecture 1: Introduction.
Reference model. Goal: 2 message exchange between application processes.
CS 3830 Day 4 Introduction 1-1. Announcements  No office hour 12pm-1pm today only  Quiz on Friday  Program 1 due on Friday (put in DropBox on S drive)
1: Introduction1 Protocol “Layers” Networks are complex! r many “pieces”: m hosts m routers m links of various media m applications m protocols m hardware,
Networking OSI (Open Systems Interconnection) model of computer networking, seven layers (the Application, Presentation, Session, Transport, Network, Data.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
“Real” Internet delays and routes  What do “real” Internet delay & loss look like?  Traceroute program: provides delay measurement from source to router.
Socket programming in C. Socket programming Socket API introduced in BSD4.1 UNIX, 1981 explicitly created, used, released by apps client/server paradigm.
Data Communications and Networks Chapter 6 – IP, UDP and TCP ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
Introduction and Overview of Network and Telecommunications.
CSEN 404 Introduction to Networks Amr El Mougy Lamia AlBadrawy.
A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their original slides that accompany the.
SOCKET PROGRAMMING Presented By : Divya Sharma.
Socket Programming original by Joonbok Lee KAIST heavily adapted by /Jens.
Computer Networks Dr. Adil Yousif CS Lecture 1.
Introduction to Networks
Chapter 3 Transport Layer
Introduction and Overview of Network and Telecommunications
Chapter 3 outline 3.1 Transport-layer services
Introduction to Networks
Administrative Things
Network Introduction.
OSI Protocol Stack Given the post man exemple.
Introduction and Overview of Network and Telecommunications (contd.)
06- Transport Layer Transport Layer.
Protocol “Layers” Question: Networks are complex! many “pieces”: hosts
CS 1652 Jack Lange University of Pittsburgh
ECE 4400:427/527 - Computer Networks Spring 2017
Introduction to Networks
NET323 D: Network Protocols
Chapter 1: roadmap 1.1 What is the Internet? 1.2 Network edge
NET323 D: Network Protocols
Process-to-Process Delivery:
Lecture 2: Overview of TCP/IP protocol
Protocol “Layers” Question: Networks are complex! many “pieces”: hosts
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
Chapter 3 Transport Layer
Transport Layer 9/22/2019.
Transport Layer Our goals:
Network programming Lecture 1 Prepared by: Dr. Osama Mokhtar.
Department of Computer Science Southern Illinois University Carbondale CS441 – Mobile & Wireless Computing Overview of Computer Networking Protocols.
Presentation transcript:

NWEN 243 Networked Applications Lecture 12: Layer 4 – Transport NWEN 243 © , Kris Bubendorfer

Layer 4 We have talked about layers 1-3 At Layer 2 we looked a little at the Ethernet Protocol. At layer 3 we looked at the IP protocol. Layer 4 (today’s lecture) is an end-to-end transport, namely the UDP and TCP protocols. Great, but first, what IS a protocol. NWEN 243 © , Kris Bubendorfer

Protocol Overview Defines acceptable behaviour: Agreed data format Handshake Message Response Occur at many levels Definition: A protocol defines the format and the order of messages exchanged between two or more communicating entities, as well as the actions taken on the transmission and/or receipt of a message or other event. NWEN 243 © , Kris Bubendorfer

Protocols - Phone Circa Theatre Do you have 2 seats for “A View from the Bridge”? yes In the front? yes How much for a Student? $38 each Here is my Visa Card no. Ok, your tickets can be picked up. Thank you. Goodbye. NWEN 243 © , Kris Bubendorfer

Protocols – Scalpers Unlimited Do you have 2 seats for “A View from the Bridge”? yes In the front? yes How much for a student? $150 each You must be Joking! It’s a competitive price No Thanks Goodbye. NWEN 243 © , Kris Bubendorfer

Protocols - HELO “vivamexico.ecs.vuw.ac.nz” 250 OK MAIL FROM: 250 OK RCPT TO: 250 OK DATA 354 Start mail input; end with. Blah, blah, blah NWEN 243 © , Kris Bubendorfer

The Transport Layer transport protocol applications technology An ‘hourglass’ protocol NWEN 243 © , Kris Bubendorfer

Layers = Abstraction Networks are complex with many “pieces”: ◦ hosts ◦ routers ◦ links of various media ◦ applications ◦ protocols ◦ hardware, software Managing complexity is what abstraction is for. NWEN 243 © , Kris Bubendorfer

Organisation of air travel: Service View Airtravel is a complex system. ◦ It involves ticketing agents, baggage handlers, gate personal, pilots, planes, air traffic control, routing, customs etc. ◦ One way to deal with this complexity is to break the process down into small steps. ◦ Analogy to communications, shipped from A to B. NWEN 243 © , Kris Bubendorfer

Organisation of air travel ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing ticket (complain) baggage (claim) gates (unload) runway landing airplane routing NWEN 243 © , Kris Bubendorfer

Organisation of air travel II Layers: each layer implements a service ◦ via its own internal-layer actions ◦ relies on services provided by layer below ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing ticket (complain) baggage (claim) gates (unload) runway landing airplane routing NWEN 243 © , Kris Bubendorfer

Layered air travel: services Counter-to-counter delivery of person & bags baggage-check-to-baggage-claim delivery people transfer: loading gate to arrival gate runway-to-runway delivery of plane airplane routing from source to destination NWEN 243 © , Kris Bubendorfer

Distributed layer functionality ticket (purchase) baggage (check) gates (load) runway takeoff airplane routing Departing airport ticket (complain) baggage (claim) gates (unload) runway landing airplane routing Arriving airport airplane routing Intermediate air traffic sites airplane routing NWEN 243 © , Kris Bubendorfer

Why layering? Dealing with complex systems: ◦ explicit structure allows identification, relationship of complex system’s pieces ◦ modularity eases maintenance, updating of system ◦ change of implementation of a layer is transparent to rest of system  e.g., change in gate procedure doesn’t affect rest of system NWEN 243 © , Kris Bubendorfer

TCP/IP Layer Model LayerFunction Host Layers 4. ApplicationNetworked Application 3. TransportHost-Host Media Layers 2. NetworkRouting & Addressing 1. Net AccessEthernet etc… NWEN 243 © , Kris Bubendorfer LayerFunction Host Layers 7. ApplicationNetworked Application 6. PresentationData representation and encryption. 5. SessionState 4. TransportHost-Host Media Layers 3. NetworkRouting & Addressing 2. Data LinkPoint to Point Protocol (e.g. PPP) 1. PhysicalMedia and Signal TCP/IP OSI

Layers: Logical Communication Each Layer distributed “entities” implement layer functions at each node entities perform actions, exchange messages with peers transport network application Media Access physical transport network application Media Access physical transport network application Media Access physical transport network application Media Access physical network Media Access physical NWEN 243 © , Kris Bubendorfer

Layers: Logical Communication E.g. transport take data from app add addressing, reliability check info to form “datagram” send datagram to peer wait for peer to ack receipt analogy: post office. your grandmother’s birthday card. transport network application Media Access physical transport network application Media Access physical transport network application Media Access physical transport network application Media Access physical network Media Access physical data transport data ack NWEN 243 © , Kris Bubendorfer

Layers: Physical Communication transport network application Media Access physical transport network application Media Access physical transport network application Media Access physical transport network application Media Access physical network Media Access physical data NWEN 243 © , Kris Bubendorfer

Transport layer port numbers How can ensure it is delivered to the right application on that machine? We need to be able to address the applications on a machine, just like we had to address the machines themselves. We use port numbers. NWEN 243 © , Kris Bubendorfer IP: Port: 3000

Layer 4 – the Transport Layer. The network layer performs machine to machine delivery of datagrams The transport layer performs application to application delivery. Ports are (16 bit) numbers (like house numbers) that form the address space of a protocol. ◦ i.e. you can have tcp/53 and udp/53. A socket is a software structure associated with a port. An application must ‘bind’ (associate) a socket to a port before it can be used. The Socket API is the interface for applications to gain access to the network. 42 Hitchhiker’s St is a different house from 42 Thanks for all the fish St. NWEN 243 © , Kris Bubendorfer

Socket API Client/server paradigm Two levels of service in the socket API: ◦ User Datagram Protocol (UDP)  Best effort protocol, transmits datagrams. ◦ Transmission Control Protocol (TCP)  reliable, byte stream-oriented, with capacity control, transmits segments. NWEN 243 © , Kris Bubendorfer

Sockets Socket: a door between application process and end-end-transport protocol (UCP or TCP) UDP service: unreliable connectionless transfer of datagrams from one process to another TCP service: reliable transfer of bytes (carried in segments) from one process to another over a connection. process Buffers, variables socket controlled by application developer controlled by operating system host or server process Buffers, variables socket controlled by application developer controlled by operating system host or server NWEN 243 © , Kris Bubendorfer Internet

Socket programming with UDP UDP no “connection” between client and server, each datagram is an independent item. no handshaking client explicitly attaches IP address and port of destination server must extract IP address, port of sender from received datagram UDP transmitted data may be received out of order, or lost Application view UDP provides unreliable transfer of groups of bytes (“datagrams”) between client and server From: To: NWEN 243 © , Kris Bubendorfer

UDP Socket Structure Client process Server process server socket client socket response request NWEN 243 © , Kris Bubendorfer

Socket programming with TCP Client must contact server server process must first be running server must have created socket (door) that welcomes client’s contact Client contacts server by: creating client-local TCP socket specifying IP address, port number of server process When client creates socket: client TCP establishes connection to server TCP When contacted by client, server TCP creates new socket for server process to communicate with client ◦ allows server to talk with multiple clients TCP provides reliable, in-order transfer of bytes (a “pipe”) between client and server Application viewpoint NWEN 243 © , Kris Bubendorfer

TCP Socket Structure Client process Client process Server process Server process “public” socket “connection” socket client socket 3-way handshake stream data NWEN 243 © , Kris Bubendorfer

TCP Steps Server (on hostId) Create public socket with port = x Wait for connection create connection socket Read request from connection socket Write reply to connection socket Client Create socket Connect to hostId, port x Send request on client socket Read reply from client socket Close client socket NWEN 243 © , Kris Bubendorfer

Sockets and Ports IP (network layer) receives all datagrams for host IP delivers to appropriate transport layer (protocol) Transport protocol delivers to socket (application) IP application

TCP Ports and Sockets - Detail Server listens on a socket for a connection Connect request causes new socket on same port Server uses new thread to service connection TCP listener thread server socket port socket worker

Fin. NWEN 243 © , Kris Bubendorfer