Presentation is loading. Please wait.

Presentation is loading. Please wait.

ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26.

Similar presentations


Presentation on theme: "ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26."— Presentation transcript:

1 ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26

2 ICOM 6115©Manuel Rodriguez-Martinez Lecture Objectives Introduction to Transport Layer –Layer 4 –User Datagram Protocol (UDP) –Transmission Control Protocol (TCP)

3 ICOM 6115©Manuel Rodriguez-Martinez Transport Layer Provides reliable, cost-effective way to move data between two applications –independent of type of layer 3 Application level API often interact with this module Sockets are built on top of transport layer –TCP Sockets –UDP Sockets

4 ICOM 6115©Manuel Rodriguez-Martinez Layer 3, Layer 4 and Layer 5 Stack

5 ICOM 6115©Manuel Rodriguez-Martinez Transport services Connectionless –Blocks of data sent over datagrams Targeted for a specific process on a given machine Connection-oriented –Reliable stream of bytes sent between two processes –Adds reliability to layer 3 Transport entity –Module that uses the network layer to move data (inside OS of hosts)

6 ICOM 6115©Manuel Rodriguez-Martinez Typical Operations LISTEN (usually server side) –Wait for a connection to occur CONNECT (usually client side) –Request a connection to be established SEND –Move some amount of data between processes RECEIVE –Accepts some amount of data DISCONNECT (bidirectional) –Terminate the connection

7 ICOM 6115©Manuel Rodriguez-Martinez Encapsulation at layer 4 Data is packaged into TPDU –TPDU – Transport Protocol Data Unit

8 ICOM 6115©Manuel Rodriguez-Martinez Typical State Transition Diagram

9 ICOM 6115©Manuel Rodriguez-Martinez Addressing Transport layer identifies process by: – Idea –Layer 3 Address identifies host on which process is running Network Service Access Point (NSAP) IP address –Port uniquely identifies a process on that host Transport Services Access Point (TSAP) Applications use to port to index data structure where data is placed –Send and receive operations

10 ICOM 6115©Manuel Rodriguez-Martinez Example of NSAPs and TSAPs

11 ICOM 6115©Manuel Rodriguez-Martinez Connection daemon

12 ICOM 6115©Manuel Rodriguez-Martinez Connection daemon Connection daemon is used to spawn a new process to service a client request Often used if we do not want to have a server running all the time on background –Ex. inetd can spawns telnet processes OS must support way to pass variable –Pass context of process –UNIX Fork() operation –Windows Threads

13 ICOM 6115©Manuel Rodriguez-Martinez Demultiplexing data Layer 4 Layer 3 Process Message Queues Port

14 ICOM 6115©Manuel Rodriguez-Martinez User Datagram Protocol (UDP) Provides a mechanism to send datagrams between processes –Blocks of data are sent Just adds port information on top of IP packet –Can arrive delayed, out of order, or get lost Unreliable services –Need to add ACKs if you want more Some applications that use it –DNS (Domain Name Services) –NFS (Network File System)

15 ICOM 6115©Manuel Rodriguez-Martinez UDP Header

16 ICOM 6115©Manuel Rodriguez-Martinez Transmission Control Protocol (TCP) Provides a reliable byte stream between processes Data is guaranteed to –arrive safely –Be organized in the proper order and read in order TCP streams provide the abstraction of a byte stream –Like a file

17 ICOM 6115©Manuel Rodriguez-Martinez TCP Byte Stream

18 ICOM 6115©Manuel Rodriguez-Martinez Buffering Data in TCP Data is buffered until enough is present to be sent or read Alternatively, the buffer can be flushed to force data out

19 ICOM 6115©Manuel Rodriguez-Martinez TCP Header

20 ICOM 6115©Manuel Rodriguez-Martinez TCP Three Way Handshake Use to establish a connection Client sends SYN message with a seq number x Server replies with –SYN indicating its own sequence numbers y –ACK indicating it expects data with seq x + 1 Client replies with ACK indicating it expects data with seq y + 1 Sequence numbers address bytes!

21 ICOM 6115©Manuel Rodriguez-Martinez Timeline diagram

22 ICOM 6115©Manuel Rodriguez-Martinez Some Issues Need to way for 3-way handshake before sending data –How long is this? This is bad for short live connection that send little data –HTPP request with small number of images


Download ppt "ICOM 6115©Manuel Rodriguez-Martinez ICOM 6115 – Computer Networks and the WWW Manuel Rodriguez-Martinez, Ph.D. Lecture 26."

Similar presentations


Ads by Google