Top Banner
1 Transport Layer End-to-end protocol Ensures that data units are delivered: error-free in sequence with no loses or duplications Enhances the QOS provided by the Network Layer Comments on Network RESET: NRESET caused by: internal congestion hardware problems software bugs Establishes a new connection Resynchronizes and continues
48

1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

Dec 30, 2015

Download

Documents

Agatha Lambert
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

1

Transport Layer

• End-to-end protocol• Ensures that data units are delivered:

– error-free– in sequence – with no loses or duplications

• Enhances the QOS provided by the Network Layer Comments on Network RESET:NRESET caused by:– internal congestion– hardware problems – software bugs

• Establishes a new connection• Resynchronizes and continues

Page 2: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

2

Transport Layer (cont.)

Application(or Session) Layer

TSAP

Transport Entity

Services provided tothe session layer

Network layer servicesused by transport layer

NSAP

Network Layer

A

5

4

3

1-2

Interface

Transport Entity

Network Layer

B

TPDU

Transportprotocol

Application(or Session) Layer

Page 3: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

3

Transport Layer (cont.)

QOS parameters are specified by the Transport users when a connection is requested.

Transport Service Primitives: – Provided for both:

• Connection-oriented service • Connectionless service

Page 4: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

4

Transport Layer Quality of Service Parameters

Connection establishment delay Connection establishment failure probability Throughput Transit delay Residual error ratio Transfer failure probability Connection release delay Connection release failure probability Protection Priority Resilience

Page 5: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

5

Transport Layer (cont.)

PhysicalCommunication

channel

IMP

(a) Environment of the data link layer

IMP Host

Subnet

(b) Environment of the transport layer

Page 6: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

6

Types of serviceoffered by the network layer

A Flawless, error-free service withno N-RESETS

B Perfect packet delivery, but withN-RESETS

C Unreliable service with lost andduplicated packets and possiblyN-RESETS

Networktype Description

Page 7: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

7

TSAP, NSAP, and Connections

Page 8: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

8

TSAP, NSAP, andConnections (cont.)

How a user process in Host A establishes a connectionwith a time-of-day server

1. Process server listens on well-known TSAP

2. User connects to Well-known TSAP

3. Process server creates time-of-day server & tells it where to listen

4. Time-of-dayserver

5. Process server tells user where to listen and closes this connection.

6. User connects to the time-of-day server

Page 9: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

9

Seven States in Transport Entity

Each connection maintained by the transport entity is always in one of seven states, as follows:

1. Idle - Connection not established yet.2. Passive Establishment Pending - CONNECT has

been executed and CALL REQUEST sent.3. Active Establishment Pending - A CALL

REQUEST has arrived; LISTEN has not been done.4. Established - The connection has been established.5. Passive Disconnect Pending - The user is waiting

for permission to transmit a packet.6. Active Disconnect Pending - A RECEIVE has

been done.7. Idle - A DISCONNECT has been done locally.

Page 10: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

10

Connection Management Scheme

Idle

Established

Idle

ActiveEstablishment

Pending

ActiveDisconnect

Pending

PassiveEstablishment

Pending

PassiveDisconnect

Pending

Connect primitive executed

Connection request TPDU received

Disconnect primitiveexecuted

Disconnection request TPDU received

Connection request TPDU received

Connect primitive executed

Disconnection request TPDU received

Disconnect primitiveexecuted

Transition labeled in italics are caused by packet arrivalsThe solid lines show the client’s state sequence.The dashed lines show the server’s state sequence.

Page 11: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

11

Berkeley Primitives implemented as a set of system CALLs, and allow application programs to access communication protocols via SOCKET concept.

Note: Socket == OSI TSAP

Networking in UNIX(Berkeley Sockets)

Page 12: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

12

The Principal Transport Service Calls in Berkeley UNIX

Socket Create a TSAP of a given typeBind Associate an ASCII name to a previously created socketListen Create a queue to store incoming connection requestsAccept Remove a connection request from the

queue or wait for oneConnect Initiate a connection with a remote socketShutdown ShutdownSend Send a message through a given socketRecv Receive a message on a given socketSelect Check a set of sockets to see if any can be read or written

Page 13: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

13

• Sockets (Sockets Interface by Berkeley)

• System V UNIX (Sockets Interface by AT&T)

• WINSOCK (Windows Sockets Interface by Microsoft)

Implementation of an API

Page 14: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

14

Implementation of an API (cont.)

Application1 Application2 Applicationn.......

DLL containing socket interface procedures

DLL containing TCP/IP software

Operating System Functions

ApplicationPrograms

Socket API

TCP/IPfunctions

I/O functions

The organization of the socket API and TCP/IP code in a DynamicLinked Library under Windows 95. One copy of a DLL is loadedinto memory when needed; all applications share the copy

Page 15: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

15

Implementation of an API (cont.)

Application1 Application2 Applicationn.......

DLL containing socket interface procedures

Operating Systems

ApplicationPrograms

Socket API

TCP/IPfunctions &I/O functions

The organization of the socket API and TCP/IP code underWindows NT. Although code for TCP/IP is part of the operatingsystem, procedures for the socket API are part of a DLL

Page 16: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

16

• TCP (connection-oriented): Designated to provide a reliable end-to-end byte stream over an unreliable internetwork.

• UDP (connectionless) - Just IP with a short header added.

• TCP - Designed to dynamically adapt to properties of the internetwork and to be robust in the face of many kind of failures.

Internet Transport Protocols

Page 17: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

17

• Each machine supporting TCP has a TCP transport entity (e.g., user process or part of the kernel that manages TCP streams and interfaces to the IP layer).

• A TCP entity accepts user data streams from local processes, breaks them up into pieces not exceeding 64K bytes and sends each piece as a separate IP datagram.

• When IP datagrams containing TCP data arrive at a machine, they are given to the TCP entity, which reconstructs the original byte streams

Internet Transport Protocols (cont.)

Page 18: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

18

• TCP service is obtained by having both the sender and receiver create end pts, called sockets.

• Each socket has a socket number (address), consisting of the IP address of the host and a 16-bit number local to that host, called a port (TCP name for a TSAP)

• To obtain TCP service, a connection must be explicitly established between a socket on the sending machine and the receiving machine.

The TCP Service Model

Page 19: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

19

• All TCP connections are full duplex and point-to-point

• TCP does not support multicasting or broadcasting• Push Flag - tells TCP not to delay the transmission• Urgent Data - (e.g., Interactive user hits the DEL

or CTRL-C key) The sending application puts some CTL information in the data stream and gives it to TCP, along with the urgent flag.

The TCP Service Model (cont.)

Page 20: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

20

• The sending and receiving TCP entities exchange data in the form of segments

• Basic protocol - sliding window; when the sender transmits a segment, it also starts a timer, When the segment arrives at the destination, the receiving TCP entity sends back a segment (with data if any exists, otherwise without data) bearing an ACK.

The TCP Protocol (overview)

Page 21: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

21

The TCP TPDU Structure

Source Port Destination Port

Sequence Number

Piggyback AcknowledgementFIN

SYN

RST

EOM

ACK

URG

TCPHeaderLength Window

Urgent PointerChecksum

Options (0 or more 32 bit words)

Data

TCPHeader

Page 22: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

TCP Congestion Control•Congestion – Severe delay caused by an overload of datagrams at one or more router.

•Internet TCP algorithms assume that timeouts are caused by congestion.

•To avoid congestion, the TCP standard now recommends using two techniques

•Slow – start

•Multiplicative decrease

•Note: TCP must remember the size of the receiver’s window. A second limit, congestion window, must be maintained.

Allowed_window = min (receiver_advertisement,congestion_window)

Page 23: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

Transmissionrate adjustment

Transmissionnetwork

Small-capacityreceiver

Internalcongestion

Large-capacityreceiver

(a) (b)

(a) A fast network feeding a low-capacity receiver. (b) A slow network feeding a high-capacity receiver.

Page 24: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

0

4

8

12

16

20

24

28

32

36

40

44

0 2 4 6 8 10 12 14 16 18 20 22 24

Timeout

Threshold

1/2

Con

gest

ion

win

dow

(ki

loby

tes)

Transmission number

Slow Start

An example of the Internet congestion algorithm

Page 25: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

TCP assumes that most datagram loss comes from congestion and uses the following strategy:

•MULTIPLICATIVE DECREASE CONGESTION AVOIDANCE

Upon loss of segment, reduce the congestion window by half (down to a minimum of at least one segment). For those segments that remain in the allowed window, backoff the retransmission timer exponentially.

(comment) If congestion is likely, TCP reduces the volume of traffic exponentially and the rate of retransmission exponentially.

Estimation of Congestion Window Size

Page 26: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

TCP Recovery When Congestion Ends

SLOW-START (ADDITIVE) RECOVERY:

•Whenever starting traffic on a new connection or increasing traffic after a period of congestion, start the congestion window at the size of a single segment and increase the congestion window by one segment each time an Ack arrives.

(comment) Slow start avoids swamping the internet with additional traffic immediately after congestion clears or when new connections suddenly start.

Page 27: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

Congestion Avoidance Phase

To avoid increasing the window size too quickly, TCP adds one additional restriction:

•Once the congestion window reaches one half of its original size before congestion, TCP enters a congestion avoidance phase and slow down the rate of increment.

•During congestion avoidance, it increases congestion window by 1 only if all segments and the window have been acknowledged.

Page 28: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

28

Hierarchy Versus Layering: TCP/IP--the task of communications is broken up

into modules or entities that may communicate with peer entities in another system. One entity within a system provides services to other entities and, in turn uses the services of other entities. Good software design practice dictates that these entities be arranged hierarchically.

The TCP/IP Protocol Suite

Page 29: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

29

Based on the view of a communication that involves three agents:

• Process • Hosts • Networks Note: Processes (fundamental entities that

communicate), execute on hosts, which often support multiple simultaneous processes. Communication between processes take place across the networks to which the hosts are attached.

TCP/IP Architecture

Page 30: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

30

Protocols are Organized into 4 Layers: • Network access layer • Internet layer: IP (MIL-STD-1977) • Host-host layer: TCP (MIL-STD-1978) • Process/application layer:

FTP (MIL-STD-1980); SMTP (MIL-STD-1981); TELNET (MIL-STD-1982)

TCP/IP Architecture (cont.)

Page 31: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

31

Network access layer:Contains those protocols that provide access

to a communication network. Protocols at this layer are between a communication node and an attached host. A function of all these protocols is to route data between host attached to the same network. Other services may include: flow control, error control and various QoS features.

TCP/IP Architecture (cont.)

Page 32: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

32

Internet layer:Consists of procedures required to allow

data to traverse multiple networks between hosts. Thus, it provides a routing function, and usually implemented within hosts and gateways.

TCP/IP Architecture (cont.)

Page 33: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

33

Host-to-host layer:Contains protocol entities with the ability to

deliver data between two processes on different host computers. A protocol entity at this level may or may not provide a logical connection between higher-level entities. Other possible services include error and flow control and the ability to deal with control signals not associated with a logical data connection.

TCP/IP Architecture (cont.)

Page 34: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

34

Process/Application Layer:Contains protocols for resource sharing

(e.g., computer-to-computer) and remote access (e.g., terminal-to-computer).

TCP/IP Architecture (cont.)

Page 35: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

35

• E-mail • File Transfer • Remote Login

Application-level Internet Services

Page 36: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

36

TCP/IP Internet Domain Names

• The mechanism that implements a machine name hierarchy for TCP/IP internets is called the Domain Name System. This system uses a hierarchical naming system known as domain names.

• Hierarchical machines are assigned according to the structure of the organizations obtained authority for parts of the namespace, not necessarily according to the structure of the physical network interconnections.

Page 37: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

37

Mapping Domain Names to Addresses

• The Domain mechanism for mapping names to addresses consists of independent, cooperative system called name server. A name server is a server program that supplies name-to-address translation to IP addresses.

• Often, name server software executes on a dedicated processor, and the machine itself is called the name server.

Page 38: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

38

Domain Address Resolution

• When a domain server receives a query, it checks to see if the name lies in the sub-domain for which it is an authority. If so, it translates the name to an address according to its database, and appends an answer to the query before sending it back to the client.

• If the name server cannot resolve the name completely, it contacts a domain server that can resolve the name & returns the answer to the client.

Page 39: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

39

The Top-Level Internet Domains and Their Meanings

COMEDUGOVMILNETORGARPAINT

country code

Commercial organizationsEducational InstitutionsGovernment InstitutionsMilitary groupsMajor network support centersOrganizations other than those aboveTemporary ARPANET domain (obsolete)International organizationsEach country (geographic scheme)

Although labels are shown in upper case, domain name system comparisonsare insensitive to case, EDU is equivalent to edu

Domain Name Meaning

Page 40: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

40

Domain Name Servers in a Tree

RootServer

server for.com

server fordec.com

server for.edu

server formsu.edu

server for.gov

server fornsf.gov

server for.us

server forva.us

.......

The conceptual arrangement of domain name servers in a tree that corresponds to the naming hierarchy. In theory, each server knows the addresses of all lower-level servers for all sub-domains within the domain it handles

Page 41: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

41

Hierarchical organizationof the DNS

arpa com edu gov mil net ae us zw.... ....

msu

cps

va

reston

cnri

UnitedArab

Emirates

Zimbabwe

cps.msu.edu

cnri.reston.va.us

in-addr

140

252

13

33 33.13.252.140.in-addr.arpa

generic domains country domains

Top LevelDomains

2nd LevelDomains

unnamed root

Page 42: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

42

Caching: The key to Efficiency

• The cost of looking up nonlocal names can be extremely high if resolvers send each query to the root server. So, Internet name server can use name caching to optimize the costs.

• Each server maintains a cache of recently used names as well as record of where the mapping information for that name was obtained. Note: cache entries are timed stamped, and deleted after a specified time period.

• When a client asks the server to resolve a name, the server first check to see if it has authority to resolve it by the standard procedure. If not, the server checks the cache to see if the name has been resolved recently.

Page 43: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

43

Internet Electronic Mail, with a relay system at both ends.

user at a terminal

useragent

queue of mailto be sent

local MTA local MTA local MTA

relay MTAqueue of

mail

oneorgani-zation

across theInternet

Sending Host

Page 44: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

44

Internet Electronic Mail, with a relay system at both ends (cont.)

user at a terminal

useragent

usermailboxes

local MTA local MTA local MTA

relay MTAqueue of

mail

oneorgani-zation

across theInternet

Receiving Host

Page 45: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

Simple Mail Transfer Protocol (SMPT)NOTE: Five SMPT commands are used to send the mail: HELO, MAIL, RCPT, DATA and QUIT

S: 220 Beta.GOV Simple Mail Transfer Service ReadyC: HELO Alpha.EDUS: 250 Beta.GOVC: MAIL FROM:<[email protected]>S: 250 OKC: RCPT TO:<[email protected]>S: 250 OKC: RCPT TO: <[email protected]>S: 550 No such user hereC: RCPT TO:<[email protected]>S: 250 OKC: DATAS: 354 Start mail input; end with <CR><LF>.<CR><LF>C: ... sends body of mail message ...C: ... continues for as many lines as message containsC: <CR><LF>.<CR><LF>S: 250 OKC: QUITS: 221 Beta.GOV Service closing transmission channel

Page 46: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

Layering of TCP/IP-based protocols

NFSRPC

HTTP FTP TELNET DNS SNMP

transportlayer

networklayer

data linklayer

TCP UDP

IP

Page 47: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

47

• Connectionless packet delivery service• Reliable stream transport service • Network technology independence • Universal Interconnection • End-to-end ACKs • Application Protocols Standards

Network-level Internet Services

Page 48: 1 Transport Layer End-to-end protocol Ensures that data units are delivered: –error-free –in sequence –with no loses or duplications Enhances the QOS provided.

48

Layer OSITCP/IP

Protocol Suite SNA

7

1

2

3

4

5

6

Application

Presentation

Physical

Data Link

Network

Transport

Session

Process/Application

Host-Host

NetworkAccess

Internet

Transaction Services

PresentationServices

Data Flow Control

Transmission Control

Path Control

Data Link Control

Physical Control

Approximate correspondences between the various networks