Sie sind auf Seite 1von 29

McGraw-Hill

Chapter 23
Process-to-Process Delivery:
UDP, TCP
Copyright The McGraw-Hill Companies, Inc. Permission required or reproduction or display.
McGraw-Hill
23-1 PROCESS-TO-PROCESS DELIVERY
23-1 PROCESS-TO-PROCESS DELIVERY
The transport layer is responsible for process-to-
The transport layer is responsible for process-to-
process deliverythe delivery of a packet, part of a
process deliverythe delivery of a packet, part of a
message, from one process to another. Two processes
message, from one process to another. Two processes
communicate in a client/server relationship,
communicate in a client/server relationship,
In Client!"er#er communication, our entities must $e deined%
&"ending 'ode
&(ocal Host IP
&(ocal Process Port num$er
&)ecei#ing 'ode
& )emote host IP
&)emote Process I* Port num$er
McGraw-Hill
Position of UDP in the TCP/IP protocol suite
McGraw-Hill
'esting o TP*+, Pac,ets, and -rames

Transport Protocol *ata +nit .TP*+/

Term used or transport entity to transport entity messages

TP*+s are contained in pac,ets e0changed $y networ, layer

Pac,ets are contained in rames e0changed $y data lin, layer


McGraw-Hill
Figure 23.1 Types of data deliveries
McGraw-Hill
Transport layer duties

Packetizing

"ender side% $rea,s application messages into segments, passes them to networ,
layer

Transport layer at the recei#ing host deli#er data to the recei#ing process

Connection control

Connection-oriented

Connectionless

Addressing

Port num$ers to identiy which networ, application

Reliability

-low control

1rror Control

transport
-end transport
McGraw-Hill
The Internet Transport Layer

The Internet supports two transport


layer protocols:

The Transport Control Protocol (TCP) for


reliable service

The Unreliable (User) Datagram Protocol


(UDP)
McGraw-Hill
Processes communicating across networ,

Process is an instance o a program in e0ecution.

Processes on two hosts communicate with each other $y sending and


receiving messages

The process recei#es messages rom, and sends messages into the
networ, through its socket

2 soc,et is the interace $etween the application layer and the


transport layer within a host.

!ockets are the programming interace used to $uild networ,


applications o#er the internet.

Programmers can select which transport layer protocol .+*P or TCP/


to $e used $y the application and select ew transport-layer parameters
.ma0imum $uer si3e, Ma0imum segment si3e, starting sequence
num$er o segment/.
McGraw-Hill
Port numbers
Transport layer at the receiving host delivers data to
the socket
There should be a unique identifer for each socket.
Socket identifer is called socket address
Socket address = ! address " !ort nu#ber
McGraw-Hill
Figure 23.2 Port numbers
McGraw-Hill
Figure 23.3 IP addresses versus port numbers
Process-to-Process delivery needs IP
address and Port number
McGraw-Hill
Figure 22." #A$A ranges
Port numbers are 16-bit integers between 0 -
65535

%ell&kno'n% 2ssigned and controlled $y #nternet Assigned $umbers


Aut(ority #A$A or e0ample% FTP 2)*21* T+,$+T 23* !-TP 2.* /TTP
0)
McGraw-Hill
Table 23.1 ell-known ports used with !"P
McGraw-Hill
Table 23.2 ell-known ports used by T#P
McGraw-Hill
Figure 23.1 +rror control
hy we need error control at the
trans!ort layer"
McGraw-Hill
Figure 22.2 -ultiple3ing and demultiple3ing
!ender Receiver
-ultiple3ing% .at t(e sending node/ The process o encapsulating data
messages rom dierent applications soc,ets with the header
inormation and pass the segments to the net'ork layer
4e-ultiple3ing% .at t(e receiving node/ The process o deli#ering the
recei#ed data segment to the correct application

$%a#ple&

Suppose that the following is running on the sa#e


co#puter&

'ownloading a web page while transferring data through


(T!

Two telnet sessions are also running

Transport layer receives T!')s fro# network layer for all


#our !rocesses
McGraw-Hill
*+-* )ser 'atagra# !rotocol ,)'!-

Connectionless

$o (ands(aking $etween +*P sender, recei#er

1ach +*P segment handled independently o others

2 server application that uses +*P ser#es only 5$+ re6uest at a time. 2ll other requests are
stored in a 6ueue waiting or ser#ice.

7nreliable protocol (as no lo' and error control

2 +*P segment can $e lost, arrive out o order, duplicated, or corrupted

C(ecksum ield c(ecks error in t(e entire 74P segment. #t is 5ptional

+*P doe not do anyt(ing to recover rom an error it simply discard the segment
2pplication accepts ull responsi$ility or errors

It uses port numbers to multiple0!demultiple0 data rom!to the application layer.

2d#antages% "imple, minimum over(ead, no connection delay

!ervices provided by 74P8

Process-to-Process deli#ery

1rror chec,ing .howe#er, i there is an error +*P does '4T do anything to reco#er rom
error. #t 'ill 9ust discard the message
McGraw-Hill
Figure 23.12 $ueues in !"P
McGraw-Hill
)'! .pplications

)sed for applications that can


tolerate s#all a#ount of packet
loss&

Multi#edia applications/

nternet telephony/

real-ti#e-video conferencing

'o#ain 0a#e Syste# #essages

.udio

1outing !rotocols
McGraw-Hill
Figure 23.: !ser datagram format
$eader si%e & ' bytes
Mini#u# )'! !rocess data si2e 3 bytes
Ma%i#u# )'! !rocess data si2e=
455+5 6 *3 ,network layer headers- - 7 ,)'! headres-=
6550( bytes
McGraw-Hill
UDP length
= IP length IP headers length
%ote
McGraw-Hill
56-6 Transmission Control Protocol
.TCP/

Trans#ission 8ontrol !rotocol


properties&

8onnection-oriented
,establish#ent " ter#ination-

1eliable

(ull-duple%
McGraw-Hill
Connection-4riented

Connection oriented means that a #irtual connection is esta$lished


$eore any data is transerred.

Connection ensures that the recei#ing process is a#aila$le and


ready beore the data is sent

T(ree&'ay (ands(aking connection esta$lishment procedure


$ecause TCP is ull-duple0 $oth side must initiali3e communication
and get appro#al rom the other side $eore any data transer,

7irtual connection since TCP protocol will ma,e sure that segments
are gi#en to the recei#er application in the same order as they were
sent $y the sender e#en i they tra#el through dierent physical paths

2 ser#er application that uses TCP can handle many client requests at
the same time each has its o'n connection.
McGraw-Hill
Connection establis(ment and termination
Connection establis(ment
Connection release
)ombine
d into
one ste!
McGraw-Hill
Figure 23.13 !tream delivery
TCP esta$lishes a #irtual connection
*)P will deliver segments to the a!!lications in
order and without error+ lost+ or du!licates
McGraw-Hill
(ull 'uple%

'ata seg#ents can 9ow in both


directions at the sa#e ti#e.

$ach T8! connection has its own


sending and receiving bu:ers.
McGraw-Hill
(low control and 1eliability

Flo' control .process-to-process/% TCP ma,es sure that the sender


does not cause the recei#er $uer to o#erlow

8y deining the amount o data that can $e sent $eore recei#ing an


ac,nowledgement rom the recei#er ;sliding < 'indo' protocols/

+rror control .process-to-process/% entire message arri#es at the


recei#ing transport layer 'it(out error* loss* duplication and in t(e
same order t(ey 'ere sent

1rror detection is done using chec,sum and correction $y retransmission

Implemented $y a sliding 'indo' AR=

+very transmission o data is ackno'ledged $y the recei#er.

2c,nowledgements are cumulative.

I the sender does not recei#e 2C9 within a speciied amount o time, the
sender retransmits the data.

Accepts out o order but does $ot send negative ackno'ledgements,

i a segment is not ac,nowledged $eore time-out, it is considered to $e


either corrupted or lost and the sender will retransmit t(e segment only
'(en it times&out
McGraw-Hill
T8! .pplications

(ollowing applications re;uire


reliable data transfer through T8!&

<<< using HTT!

$lectronic #ail using SMT!

Telnet

(ile transfer using (T!


McGraw-Hill
Figure 23.12 T#P segment format
,inimum header length is
-0 bytes and the ma.imum
is 60 bytes when there are
o!tions

Das könnte Ihnen auch gefallen