0% found this document useful (0 votes)
12 views22 pages

Unit 4 Computer Networks

The transport layer is responsible for providing process-to-process communication between applications across different hosts, utilizing protocols like TCP and UDP. It includes services such as addressing through port numbers, encapsulation and decapsulation of messages, and multiplexing techniques like Time Division Multiplexing (TDM) and Frequency Division Multiplexing (FDM) for efficient data transmission. These services ensure reliable communication and efficient bandwidth utilization in network systems.

Uploaded by

Madan Bommagani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views22 pages

Unit 4 Computer Networks

The transport layer is responsible for providing process-to-process communication between applications across different hosts, utilizing protocols like TCP and UDP. It includes services such as addressing through port numbers, encapsulation and decapsulation of messages, and multiplexing techniques like Time Division Multiplexing (TDM) and Frequency Division Multiplexing (FDM) for efficient data transmission. These services ensure reliable communication and efficient bandwidth utilization in network systems.

Uploaded by

Madan Bommagani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

TRANSPORT LAYER :

Services of transport layer M . •


1
Congestion contro1' timer
. ' rnau tiple>ung. Transmission Control Protocol (TCP)
Datagram Protocol (UDP) nagernent, Quality of services (QOS) and User

4.1 TRANSPORT LAYER


services of transport layer ..
,,1.1
(t;IDefine traQ!Port4yer. Explain the services of transport layer.
ftP:
(Imp .)
~~ . .
:f
Th• "1"15porl layer '~ l~ted between the plication layer and the network layer. It provides a
-to-pr~cess communication between ~ p aBPJicaii2.Qj~s, one at tllelqfal host and the other at

ID• ~tion layers, which can ~


~ost. Communication is provided IISin~ical connection, which means that the two
located in diff"'l![t parts o tlie globe, assume that there is an imaginaJ]I
:ijinnection through which they can send and re?'ive messages.
Sky Research Alice
Alice. Applicati!>"
0 Tran5porl L ~ - - - r - - - - ,
• • N~tw~rlc
• _ •_ Data-hn'k
.. Physical
·····-...... .
.......-
T~~er .......... _.. . . ............
RI

To ocher
IS~ ............... M

ISP
To oeber ...........
ISPs

l.qe-Dd
- . . . . .M . .M . Point-11>-polot WAN

- LANswitch
'lill WANswitc:h

Bob
Scienufic Books
Fig.: Logical connection at the transport layer
------!l'lll-1D~r.;J;Ji1____________
II YEAR -111 SE&.a
MCA •YlEs1e~
. ~
The transport layer is located between the ne~ork layer and the application layer. Th
layer is responsible for providing services to the application layer; it receives services from ; trallsPott
0
layer In this section, we discuss the seivices that can be provided by the lransport layer. e etwork

(i) Process-to-Process Communication


The first duty of a transport-layer protocol is to provide process-to-~rocess communi-cati
process is an application-layer entity (running program) that uses Hie s~rvices of the transport ~n. A.
Before we discuss how process-to-process communication can be accomplished, we need to unde ayer_
the difference between host-to--host communication and process-t~--process communication. rstand

(ii) Addressing: Port Numbers ...,,


Although there are a few ways to achieve process-to-process communication, the most comm .
h the client-server di m. A .£!:.OCess on the local host.z...s_alled a client needs · on IS
ed a server.
ay SUP. ort both uwltiuser and

. o pr~v
Dynamic ports· The rts . ..,..,;a
Th · po rangmg from ·
49,152 to 65 ' 535 are neither
ey can be used as temnnr;:iin, . controtW nor rPDistered
iv) ---.)f or pnvate port numbers . 1'->
( Socket Addresses . '
A transport-layer protocol in th . .
end, to make a con . e TCP SUlte needs both t~ IP dd
addr~ The die t nekct1on. The.combill{;tiQtL()f an lP..JVidr e a ress and the_.E2!!_number, at each
defi th n soc et address define th . .._. ~ and a port numoer
is callorl a sock
e mes e server process UIDQuely. s e cl1~t P.,rncess uniquely just as ffie dfiver sock~ddress
( .

IPOOd~~~ lfll Pon number

200 23 _56
Socket addrc~~ [___ _ '>..JI
_8 _ __;;n:::..

Fig.: Socket address

• Ra/tu/ P11/Jlicot/011s

r
COM PUfER NETWORKS
~
Fucapsulation and De£apsulatlon
(v)
C1 ,t 11d t'I rrn?ssdgc ft~r to another the transpprt-layer protocol enca£sulates a~d
o f)~c;
dec<'~lc1~ s ~l~sc;~g, s,fiq i-:_ocapsulation happens at the s~ile. When a process has a message >
. d 1t passes the messa~e to the transport layer along with a pair of ,;ocket addresses and somP. other
~~;ces of information, which depend on the tr~r.t.lnyer protocol. The transport layer receives the
data and adds the transpoi t iaycr header. The pack~ajj_he tr~nsport la)(er in the ~ et are cal~_wer
dataarruJ1S, segru,ents, or t1ckets, dep~in__g on what traQsport-layer protocol we use. In general discussion,
~
~re fe-r to transport laver payloads as packets.
De~Jilation happens at the rec iver site. When the message arr~Uhe_destination transport
]ayer.tJ,enea~ b nrc "'ped and the transport layer delivers the message to the process running at the
pphc.ation laver. Th~ 11der socket address is passed to the process in case it needs to respond to +he
b1t?SSage received
Clif'nt Server,
r
Application Process 0 Application
l:iyer layer

l~sport Transport
iayer layer
Logical channel

a. Encapsulation b. Decapsulation

Fig.: En·cap$uJatioh ~nd decapsulation

I 4.2 MULTIPLEXING I
What : ... --·t~+~rn.,,..,Jng? Explain its methods.

: t4Wl\~ S:~ - ov€77 °'- ~~ ~ t~fJ~. {Imp.)


eaning
Channel multiplexing is. the process of s littin or sharing the capacit¥-pf a high speed channeV
lecommunic_ation link to [onn multiple low c~pacity ow s ':" els. Each such sub-channel
iTThen be used ~ m~Ie e~ nodes as q_edicated .links. ultiplexing can usually be don£i,-in aifferent
omains like t~e, fre~y and s~cej_and even combi~ations of these).

i----ll
1 Link ~ r----::,
:e t--,e.
-=----i
C----1
N Channels w .---o
C
. ::,

z
r----

For computer communication, though multiplexing techniques like TDM, FDM were initially used
ainly in ba~kbone links connecting multiple data exchanges, later they h;; percolated widely into the
CC~ast miJe link$ too, including inside home networks.
dvantages
1f 110 multiplexing is used between the users a1 t~ r e n t sites that are distance apart, then
eparate t.Ommunication lipes would be required .

Pahul Publicotlons
-~ - -. - - - -- -- - - - - - - - - - - -- - - - - - -- .... -~-~,
Ol'fll!lft¾$

MCA II YEAR III SEM


~
Thisis not only costly but also become difficult to manage. If multiplexin~ is used th en, only one 11
is'required. This leads to the reduction in the line cost and also it would be easi~r to keep track of one line
d 'dth ne

_;..---- ...e--

-
than several lines. Multiplexing efficient for utilization of ban wi ·

_ _ . . l - - - - - -- - .
Separate Channels/Links between the devices
-ill •

-
~en_djng_L_Qca_lions

.;

~Cftis o,nl~ one


t,~~ of i . . ; ; ~...:

to jt-
s· .
r - ,lots.
penodica11

.
Each time slot inside a fra.me carries data belonging
-----
· In TDM, the basic reeeating unit is a f~e. A TOM frame consists of a fixed number of time slols..
to a specific end node/connection. Thus multiple ~
logical sub-channels/links are created inside a single c~n__nel. It is also possible to give multie!,e sl~ within
a frame to the same user, thereby having the provision of having different capacity sub-channels within
~~~ -
Assuming that there are "n" end users, each requiring a link with a capacity of X Kbps, then to
successfully mqltiplex these each end users on a channel, the channel's capacity needs to be atleast equal
to n times X Kbps.
The Figure given below illustrates a sample TOM scheme with 4 users being setved in a round robin
fashion in the time domain.

-R-alt_u_l_P._u_hl_ic_a_tl-on_s_ _ _ _ _ _ _ _ _ _ -'GDI------- ----------


COMPUTER NETWORKS

Channel 1 • Channel 2 Channel 4

• •

Time

An example TOM frame with 4 time +slots serving 4 different users


In the example given in the figure, the TOM main channel servers a total of four users and ~ence

- .
's ,User 1) data is always carried -----.,.-
tes four sub-channels. Each user's data is carriad in a specific slot inside each frame. For e.g. Channel-
ii:t the first slot of each frame.
The basi~ principle of any TQM.,based protocol remains the same as described above, though
~ \ \ . there
multiple variants, based on . ·
►-


--
The traf}smission speed
Number of frames generated
. per second
. ,

► The frame sµuctur~ ~tc.
--
The number of time slots within each frame

~e,i:y!ces
..,
- -
IDM is typically u:sed in W~ digital transmission links, in both trunk and access networks. ISDN
O!gital Network) is an example of a protocol using TOM at the_,access network, ta
ect home users to their neares ISP, using the local loop (telephone link). In ISDN, there are a total of
b-ch~nnels, with two. of them iu;own· as B-Channels (B$arer Channels),_ ea~h with a capacity of
ps being used to carry data and the third kno~n as 0-Chanriel with a capacity of 16Kbps being used
signalling information.
Standard Tl/El serial links are classical examples of TOM based protocols and are used as trunk
between data exchanges. While ·Tl supports an aggregate rate of 1.54 Mbps
with support for 24
-channels, each with a capacity of 64Kbps, El supports an aggregate mte of 2.08
Mbps with support
a
32 sub-channels, e~ch '-1/i!h capacity of 64Kbps. TOM links with higher capacity include T2, T3 and
~ Optical links. -
T~jyj~k)n.Duplex (TDD) is a form of TOM, where within the same TOM
frame, some slots are
for uplink direction (end nodes to netw9rk) and som.e slots are used for downlink direction (network
nd
nodes), therebv_enabling full duplex communication using the same TOM link.

i ____________...,:;..__~ 149 ~-----------R-,--,h:-11-:-/-:P:-u-:-_b::li-ca-:,,:-.o-ns


MCA II YEAR Ill SEMes
~
2. frequency Division Multiplexing (FDM)
h" h Racity link is divided into d"ff
In FDM I th e Spectrum (frequency range) Of a l9 ~ m
::-.J dill fu I erent n
overlaEJ=1in9 inteivalslcame~. Dafa ot aifferent end nodes are men muu~ ateh fu ing eseddifferen c.s _on.
• d"ff t region m e requency oma· Be
so that the resul~t signal of each end node occupies a I eren t t cause interference b ~n tweei;
each adjacent carrier, a small guard band is Ie!t unused, so as n~ 9- e een closely
separated carriers. "
1 tr0 magnetic signals corresJ)onding to each
In FDM, a~ an~ instant of time, we w~uld have e_ec lli"'e d iannel would only have e~om nOde,i
sub-chanhel, unlilm m TDM, where at any instant ?f _um:~wn in the diagram given below. agnetlc
signal belonging to one end node/sub-channel. This ts s .

~~.~

Traditional FM
data belonging to eac
diagram given below
Cllanne

j
a. Channel 1 Channel2 Channell
i

100

Channel3
Frequency ( KHz)
j p
310 3200
Frequency (Hz)
.b.
c::'-~
Ru/tu/ P11hlicutio11s -§]~----------_..,...-
COMPUTER NETWORKS

In computer communication, the concept of basic FQ~nd variants of FDM, are widely used both
. LAN and WAN environments. DSL and cable modem links are typical exampl~ of physical layer
ll'l to'cc5ls uslng FDM for achieving high data rates. In DSL, which also uses the standard telephone last

;e
P~e Jocal loop line, multiple sub- carriP.rs, each with a band width of 4KHz. are used to carry users data.
base b and region from O to 4KHZ is left for basic POTS voice calls. Above this, some J1.1mber of sub-
rners are allotted for upstream traffic and a higher number of sub-carriers are alloted for downstream
: roe. Similarly, cable modem has a separate frequency band for upstream traffic and a range of sub-
rriers for downstream traffic.
~ '
An example diagram showing the sub-c~rrier spectrum allocation for POTS, DSL upstream and
downstream directions are given in the diagram below :

l POTS UPSTREAM
(
DOWNSTREAM
)
~ - -- - - ADSU+- - - - - ~

1.14MHz 1.1 MHz

FDM being used in ADSL, with different frequency sub-carriers for POTS, ADSL upstream and
SL downstream.
In DSL, to achieve high data rates, a line coding technique like QAM is used on top of each sub-
·er. Thus both FDM and line coding techniques are combined at the physical layer to achieve high
dband data rates.
FDM is also used in some variants of Fast Ethernet (100 Mbps) and Gigabit Ethernet (1000 Mbps)
protocols, where multiple carriers are used !o achieve the overall data rate supported by the underlying
sical layer.

Wavelength Division Multiplexing (WDM) and DWDM (Dense-WDM) used in optical Networks, are
based on principles similar to FDM, except that their carriers are based on different wavelengths
instead of different frequencies
Frequency Division Duplexing (FDD) is a form of FDM, where some set of frequencies/carriers are
used for carrying uplink direction traffic and some other set of frequencies are used for carrying
downlink traffic, thereby enabling full duplex communicatio n using FDM.
Spread Spectrum technigues are variants of FOM, where the data ls carried or spread over a wide
range of frequency spectrum. In normal FDM, a single carrier is used to cany data corresponding to
an end node. But in Spread spectrum techniques, multiple carriers are used to carry data
corresponding to an end node, with each carrier carrying a small piece of data. F.tfSS (frequency
Hopping Spread Spectrum) , QSS (Direct Sequence Spread Spectrum) and OFDM (Orthogonal
Frequency Division Multiplexing) are different types of spread spectrum techn~es.

Rahul Pub/lcat/011s
~ ~ - ~ - - - - - - - - - -- - - - - - - - - - - - - - - ~ -
~CA ~
II_Y_EA_R.:......:.::ll~ISEMe
· . . t nt to instant, whereas in DSS, data is .
► In FH~, the frequency of the earner varies from_ 1ns a niers, as shown hi the.diagram ive spit1 into
• 9 n bet~.
Smaller units and simultaneously carried by multiple ca .
. . mer
In frequency hopping, ~:~hich Is
:=nocXi:~~ ~! !f~er and receiver
0

p..,
F1 f2 Fl F4 F6 A F1 Fl
' .

. tll'IM
.. . .
_ ~~·1~~~~~3j~<l
__:,_:_:_:..:..:.=....-;-::-~· . . ,. J_w51l~~

Sa-Camer I

over a wider spectrum.

OrthogqnalFteg11ency Division Multiplexing (OFDM) is used for both~ and wirel~ network\
.----
Space Dlvl•l~rt ·Multiplexing (SDM) l,
/ .
· In SOM, the.same set of frequencie~ or same set qf TDM ~lgnats...m;: used in ~o different places that
are~phically wide ·~Ni;n1,pace, so that one does ~at intetf~re w~~ t ~ r . _l.'lliulir communi~tiol\
where the same set of carrier frequenc.ies are reused (frequency reuse) in celis that' ar.e n~t close to on&
another ~ a classi~ example of SOM. Another example of SDM ls the
FM radio b g ~ where tht
· same set of ~er frequencies ~re used in different cities that are ae~aphically~part. These are exampl,t
of techniques where SOM and FDM are_cemblned. ·
C OMPUTER NETWORKS
UNIT--~l~V------------------- -~~~:;:_:.:.::.:..--
.,,-
Cofll
bl natlon of ~-----
FDM, Tf?...M and SOM
- . .
GSM (Global Sy~em for Mobile Communication) protocol co_mbines both TDM and FDM, to
ch1·eve full duplex wireless communication between the mobile handsets and thebase stattoiis':-whfle
a set of freauencies are used as base carriers from mobile handsets to base station, another set of non-
oneerlapping
~ .
frequenaes are used -....~
as t>ase carriers from base stations to mobile handsets, thereb Y ma ki ng
ov of FDM principles. Within each carrier, GSM uses TOM, to carry voice and data belonging to multiple
~bile users simultaneously, each in different time slots. Additionally the same set of carrier frequencies
: d TOM schemes are reused b~yond a certain minimum distance, thereby making use of SOM. Thus
GSM is an example protocol that uses FDM, TDM and SOM

I 4.3 TRANSMISSION CoNTROL PROTOCOL I


~-J eflne Transmlss~on Control Protocol. State the various se_rvlces of TCP.
/1,14, : (Imp.)

Transmission Control Protocol (TCP) is a connection-oriented, reliable protocol. TCP explicitly defines
n~ecti-9n establishment, d~a transfer, and C.Qnffection tear-down pha';es to provid~ a connection-oriented
rvice. TC-P uses a combination of Gl3N and SR protocols to provide reliability. To achieve this goal, I CP
ses checksum (for error detection), retransmission of lost or corrupted packets, cumulative and selective
cknowledgments, and timers. In this section, we first disc.:iss the services provided by TCP; we then
iscuss the TCP features in more detail: TCP is the m~st corpmon traosp_ort-layer protocol in the Internet.

Process-to-Pfoeess Communication
As with UDP, TCP provides process-to~process communication using port numbers.
Stream Delivery Service
TCP, unlike UDP, is a stream-oriented protocol. Jn UDP, a process senc;is messages with predefined
boundaries to lJDP for delivery."1:115P adds its own .header to each of these messages and delivers it to IP
for transmission. Each message from the process is called a user datagram, and becomes, eventually, one
IP datagram. Neither IP nor UDP reco~ize~ any relationship between the datagrams.
TCP, on the other hand, allow.s the sending process to d~liver data as a stream of bytes and allows
the recei~g process to obtain data as a stream of bytes. TCP creates an envir~nment in which the two
processes seem to be connected by an imaginary "tube" that carries their bytes aaoss the Internet.
Sending R~clvln1
process proceu

I. :"Wi',bSitttl-
Flg.: Stream dollvery
Sending and Receiving Buffers
Because the sending and the receiving processes may not necessarily write or read c(ata at the same
ra~, TCP needs buffers fo1 storage. There are two buffers, the sending 6uff er anct the receiving buffer,

- - - - - - - - - - - - - - - - -- -- J @ t - - - - - - - - - - - - --""'.R
~a-:h-117'
/ -;:P::-:-
ub:-;l-lc:-:'
;:-. <1--:,
. tlo~,u

J
MCA II YEAR Ill SEMESTe
~
re alc;o neces Jry for flow and error
1.. ' fm each direction We will sue ldkr that th c buffers at use a cir ul r rrc1J1 of 1 byte kc tcon1rct
. d b TCP. One way to ,mpIement u buff
~ hanisms use y f er bis tes
o each~
, h b ' a irms
normally t e uffer, c1re hu d a
O 20
sh wn in fig simplic1ty, we have shown two bufft rs t't Tue also show the buffers as the sarn: t'~d{
r housands of bytes d<?pending on the implemc>nta on. Site
cl1 is not always .lw c se.
1

Receiving
process
iCP
-Next
TC'P t,yto to
r read

Fig.: Sending and re~eivlng buffers

nts
u et 1g han tes th.a disparity bet:wei:::n the µe .J of th e P~n..9 dnd ~"1rtin~
ec; ncd Ont? more step-before we can send ddta. The network layer, as a sen,i-:e prnvider fa';
_ send dara n pa ki:-ts, not as a stream of Gytes At the transport layer, TCP c numbe
aethermto a pac~~le..d ~egment. TCP dc.lds a heacler t0 each segment lfor control purposes)
,u.s Z'l 2 ce~enf to the nefworf< layer for transmiS5iori Th seqrnents a.re P"'\ ~ t i m io 1
:r-a :rn .. transmitted. This entir~ opPration is transparent to he e e1vmg pr')ct"ss. Later we wi:i se~
-n ~ ts may tiP received out of order, ~t or corrupted, clI1d ffc;Pnt AU of these are handled by the
e·ver with the receiving application process unaware of TCP's activiti~.

Receiving
process

Fig.: ,:cp s egments


Note that segments are not . ll ·
. necessan 1Ya t11e s me size. In the figure for simphcity v. ~ ~ c,.1e
segmec9 t carrvmg j byte8 and the 0 th t
tll<>usands, of bytes. er can~mg 5 bytes. In reality, segments car I y hund ed-,, 1f no

fv) Full-Duplex Communication


ICP otters full-duplex service, where data can flow in both directions at the same time. Each TCP
dpoint then has its own sending and · · b ff - · ·
rece1~mg u er, and se~ents move m both directions

__ ___.._..______--'~1-------------------
--
uNIT • IV

(vi) Multiplexing and DemultJplcxlng


COMPUTER NETWORICS

ever,
ibe sender and dem !ti lexing at the receiver. I_-Iowsses.
Uk~ UDJLICE. perfo_rms mµItipl.exing at re · f proce
to be establis e
since TCP 15 a connection-onented protocol, a con.,nection needs
(vii) Conn ectio n-Or iente d Serv ice
ss at site A wants to send to and
TCP, _u_nlike U[)P, !!.a corinection oriented protocol. When a proce
phases occur:
receive data from another process at site 8, the following three
1. The two TCP's establish a logical connection between them.
2. Data are exchanged in both directions.
3. The connection is tenninated.
The TCP segment is encapsulated in
Note that this is a logical connection, not a physical connection.
ted, and then resent. Each may be routed
an IP datagram and can be sent out of order, or lost or corrup
al connection. TCP creates a stream-
over a different path to rea&._h the destination. There is no physic
ivering the bytes iri order to the other
oriented environment in which it accepts the responsibility otdel
.site.
(viii) Relia ble Serv ice
'
mechanism to check ~ e and
TCP is a rel~ ~po rt protocol. It use_s an acknowledgment
section on error control.
sound arrival of data. We will discuss this feature further in the
r ~<l..xt
~ff)
C~ Co ntr ol
f • j) S t) \.0-;:
~ Cof)J~ Oftlm}re
u)
Desc ribe in detai l TCP Cong estio n Control.
.~. .
TCP uses different policies to handle the congestion in the netwo
rk. ~ \' d~
C~ngestlon Window
size of the send window is controlled
When we discussed flow control in TCP, we mentioned that the
in each segment tra~lfug in the o_pposite
by the receiver using the value of rwnd, which is advertised received
lowed with the«---
direction. The use of this strategy guarantees that the receive window is never overf
. that the intermediate buffer s, b e ,in the
bytes (no end congestion). This, however, does not mean
from more than onLsender. No matter
routers, do not become congested. A router may receive data
d with data, which results in dropping
h~ar ge the buffers of a router may be, it may be overwhelme
is no con_g~Qn at the other end. but
some segments sent by a specific TCP sender In other words, there ~

about congestion in the middle because


there may be congestion in the middle. TCP needs to worry
segment .loss .means resending th~ same
many segments lost may seriously affect the error control. More
5egm~nf$ again, resulting in worsening the congestion, and fii;ially the collaP
S.i. of the communication.
congestion in the router is in the IP
TCP is an end-to-end protocol that uses the service of IP. The
territory and should be taken care of by IP.
t aggressively send segments to the
TCP cannot ignore the congestion in the network; it canno
as we mentioned before. TCP cannot
network. The result of such aggressiveness would hurt the TCP itself,
be ve!Y conservative, either, sending a small number of segm
ents in each time interval,. l)ecause th is
means not utilizing the available band-width of the network. TCP
needs to define policies that accelerate
th e data transmission when there is no congestion and decel; ate the transmission when congestion is
detected.
II YEAR III SEMESTE1i
MCA _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ___,...--~-..::.:~
· . p uses another variable called a congesuo
To control the number of segments to transmit, _TC ·tuation in the network (as we will exp! _n
window CVJnd whose size is eontrolled by the congestiond sft' the size of the send window in TCP. :n
shortly).' The cwnd
' variable and_the rwn_d vana. bl e together e me
. the second d th esti . 'ne
15 relate to e cong on at the end.
first is related to the congestion mthe middle (network), two
The actual size of the window is the minimum of th ese · d d)
.
Actual window size == mmim . um (rwn ' cwn

2. · Congestion Detection d hanged we need to describe hO\IJ


. f d hould be set an c 'k Th TCP d a
Before discussing how the value o cwn s estion in the net-wor . e . . sen er Uses the
TCP sender can detect the possible existence
stion in the ne twork· time-out and. rece1vmg three duplicate
of cong
occurrence of two events as signs of conge .
ACK.5. ·
_,.._Th...,.U}miuh~~lltJl¾~p ~~der .s:!s2.e.
\e~etlts efo e the tim~~ut
. ...
~

the ,~ 15 due- t

is the sign
n the case .
re~ dtlplicate'AC}Ss,
ivec( The network is either sligh

earlier version of TCP, called Ta


but the later version of TCP,

, ~gesfion ls that the


e lack of regular,

.. '. .. . .

4. Slow Start: Exponential Increase


The slow-start algorithm is based on the idea that the size of the congestion wind.ow (cwnd) ,starts
with one maximum segment size (MSS), but it increases one MSS each time an acknowledgment arrives.
'As we discussed before, the MSS is a value negotiated during the connection establishment, using an
option of the same name.

The name of this alg<?ritl:m is misleading; the algorithm starts slowly, but grows exponentially. To
show the idea, let us look at Figure. We assume that rwnd is much larger than cwnd, so that the sender
window size always equals cwnd. We also assume that each segment is of the same size and carries MSS
bytes. For simplicity, we also ignore the delayed-ACK policy and assume that each segment ls acknowledged
individually.

The sender starts with cwnd = 1. This means that the sender can send only one -segment. After the
fust ACK arrives, the acknowledged segment is purged from the window, which means there is now one

-.-.,,-,,-,.::..~-,,-,,-llc_o_tl-011-.,--~--------J@\...--~------------
RK~S
:.:.O=..:::
uNIT . 1v~ _ _ _ _ _ _ __:__ _ _ _ _ _ _ _ _ _~c~o~M~P~U~TE~R~N:,::E:.:,:TW
~ th
tysegment ;lot in the wi nd0w, The size of the congestion window is also increased by 1 because the
e:al of the acknowledgme~t is a good sign that there is no congestion in the network The size of e
a. doW is now 2. After send10g two segments and receiving two individual acknowledgments for them,
w~ · dow now becomes 4, and so on. In other words.
the size of the congesti on wm ·

~Cli.cnt s,,,,, 8
~ .◄••· [ r
: - - - - - - - - - _ ':
, -
- -
Segment
- - -

Rrt : : - ACK
I _:;i

= ◄---RP---
4
2

Til~
l [
! --------

: • . :::::::::::::--
'

1¥ ~ '1 : ~ [ ; !·
' '
8
• tt6Ri:&cgp .,e I I· I; I
◄••. •', ~ · ,:
cwnd t · T
Time Time
. .
Fig.: .Slow start, exponential increase
the size of the congestion window in this algorithm is a function of the nurn~er of ACKs arrived.and can be
detennined as follows. · · · ,·
If an ACK arrives, cwnd = cwnd + 1:
If we look at-the size of the cwnd in terms of round-trip times (RTis), we find that the growth rate
is exponential in tenns of .each round trip time, which is a very aggressive approach:
Start ➔ cwnd = 1 ➔ 2°
1
After 1 RTI ➔ cwnd = cwnd +1 =1 += 1 = 2 ➔ 2
cwnd = cwnd + 2 =2 + 2 = 4 ➔ 2
2
After 2 RTf .➔
➔ cwnd = cwnd + 4 =4 + 4 = 8 ➔ 2
3
After 3 RTI
A slow start cannot continue indefinitely. There must be a threshold to stop this phase. The sender
keeps track of a variable named ssthresh (slow-start threstold). When the size of the window in bytes
reaches this thre;5hold, slow start stops and the next phase starts. ·
•~ the slow-start algorithm, the size of the congatloo
window Increases exponentially until It reachea a thraholcl
We need, however, to mention that the slow-start strategy is slower- in the case of delayed
acknowledgments. Remember, for each ACK, the cwnd is increased by only 1. Hence, if two ·segments
are acknowledged cumulatively, the size of the cwnd increases by only 1, not 2. The growth is still exponential,
but it is not a power of 2. With one ~CK for every two segments, it is a power of 1.5.
5. Congestion Avoidance: Additive Increase
If we continue with the slow-start algorithm, the size of the congestion window increases exponentially.
To a~oid congestion before it happens, we must slow down this exponential growth. TCP defines another
algonthm called congestic;m avoidance, which increases the cwnd addith1ely instead of exponentially. When
~e size of the congestion window reaches the slow-start threshold in the where cwnd == i. the slow- case
start phase stops and the additive phase begins. In this algorithm, each ti~e the whole "window" of
segments ls acknowledged, the size of the congestion window ls increased by one.

~--------------@f-----------:R:-=-ah:u- :;l~P:ub;:-;ll;:ca::,,;:o=ns
MCA II YEAR Ill SEMESTER

Server.
I
I
: _ Segment
: -ACK

RIT

1+3 :
liZil-l&JilalB-<··. T
cwnd

. .. :

The send
ur ACKs arrive. the ....... .
ne e>.ira empty segrn,ent slot in ~ e stze of the c
fhe-size of window is now 5 After senc:hn ~e segments and r
fuE size of the con~estion window mes 6, and so on. I
~dow in this algo~thm is also a fun the numbetof ACK.c:
as follows: ·
I ·· · , cwnd ~ cwn
I thep
TR .
a I e • I,.. I e

r Ii

After 2 R1T ➔ cvcnd =i +2


After3 R1T ➔ cwnd = i + 3
In the congestion-avoidance algorithm, the size of the congeatton window
Increases additively until congestion ls detected
Fast Recovery The fast-recovery algorithm is optional in TCP. The old version of 'ICP did not use it,
but the new versions try to use it. It starts when three duplicate ACKs arrive, ·which is interpreted as light
congestion in the network. Like congestion avoidance, this algorithm is also an additive increase, but it
increases the size of the congestion window when a duplicate ACK arrives (after the three duplicate ACK-9
that trigger the use of this algorithm) . We can say

If a duplicate ACK arrives, cwnd = cwnd + (1 / ~wnd)

-----------------1~1
Rahu/ Publications ----------------
UNIT . IV"- ---- ' - - - - - - - - - - - - - - - - - - - -COMPUT ER NETWORKS
;.--
JICY Transition
. . .
po We discussed three congestion policies in TCP. Now the questions when each of these policies 15
d and when TCP moves from one policy to another. To answer these question s, we need to refer to
ose rsions of TCP: Taho TCP, Reno TCP, and New Reno TCP.
three ve
faho TCP . . .
The early TCP, known as Taho TCP. used only two different algorithms in their congesti on policy.
start and congestio n avoidance. We use fig. to show the FSM for this version of '{CP. However, we
slo: to mention that we have deleted some small trivial actions, such as incremen ting and resetting th
e
nee ber of duplicate ACKs, to make the FSM less crowded and simpler.
nurn
;-3 •2 Timer Manage ment
Discuss about TCP timer.

To perform their operatio ns smoothly , most TCP impleme ntations use at least four timers:
smission, persistence, keepalive, and TIME-WAIT. __,_ ,
-1._ _
Retrans mission Timer --:) u..J~ J ~ dOf"t
· '(e__c..~v;-4
.. ~r:o..:Jt~
~ddt ~ dJr0e..D t o._~ OJ')

To retransmit lost segments, TCP employs one retransmission timer (for the whole connecti on period)
at handles the retransmission time-out (RTO), the ~ting time for an acknowl edgment of a segment
.
e can define the following rules for the retransmission timer:

When TCP sends the segment in front of ~e ~ queue, _!Lsta~ tj"le tjm_er.
When the timer expires, TCP resends the first segment in front of the queue, and restarts the tiroex:
When a segment or segments are cumulatively acknowledged, the segment or segment s are purged
from the queue.
If the queue is empty, TCP stops the timer; otherwise, TCP restarts the timer.
Round-Trip Time (RTI)
To calculate the retransmission time-out (RTO), we first ·need to calculate the round- trip time
(RlT). However, calculatir.g RTT in TCP is an involved process.
Measured RTf: We need to find how long it takes to send a segment and receive an acknowl edgment
for it. This is the measure d RTT. We need to remembe r that the segment s and their acknowl edgment s
do not have a one-to-o ne relationship; several segments may be acknowl edged together. The
measured round-trip time for a segment is the time required for the segment to reach the destinati on
and be acknowledged, although the ·acknowled gment may include other segment s. Note that in
TCP only one RTI measure ment can be in progress 'at any time. This means that if an RTT
measurement is started, no other measurem ent starts until the value of this RTI is finalized. We use
the notation RTTM to stand for measured RTT.
In TCP, there can be only one R1T measure ment In progres s at any time.
~moo~e d RTT: The measured RTI, RTTw is likely to change for each round trip. The fluctuation
~ so high in today's Internet that a single measure ment alone cannot be used for retransmission
:::~out purposes. Most implementations use a smoothe d RTI, called RTis. which is a weighted
age of RTTM and the previous RTT5 , as shown below:

- -- - - - - - - - - - - - --l@DJ--~\----------R-a-:-h-ul-;-;;Pu-.:-b;:-;l:;:ic::a,:;io:n::s
MCA II YEAR Ill SEMesyl!
~
Initially ➔ Novalue
After first measurement ➔ RTI5 == RTIM
After each measurement ➔ RTIs = (1 _ a.) RTfs + a. x RTIM
The Value of a is implementation-dependent, but it is normally set to 1/8. In o~her words, the new
RTIs is calculated as 7/8 of the old RTIS and 1/8 of the current R1TM' '1

► th
RIT Deviation: Most implementations do not just use RTf5; they also calculate e RIT deviation
called RTI , based on the RTI and RTiw using the following formulas. (The value of P is als~
0 5
implementation-dependent, but is usually set to 1/4.)
Initially ➔ No value
After first measurement ➔ RTIO = R1iJ2
After each measurement ➔ RTr0 =. (1 MRTI'o
Retransmls&'lon Time-out (RTO) The value of
"1nd ~ts deviation. Most im lem~nta
Origmal Initial
After any measuremen t RTO = R
ln -0th er words1 take the running smooth .
smoothed ~verage .value of RJfO {noWlally a '5malrvalue).

Penlstence Tuner · '-~ ~ :'1~


To deal with a zero-window-size adv~rtiseme~ TCP needs
ces a window size of ~ se~q~g 1CP stops trapsmitti
ACK segment announcing a noriiero window size. This A
K se~ents are not aclmowleµged.nor ,re~srnitted in 1C
TCP mksih · dope its jo:b and waits for the sendi
1 @ or .a ~ent'confaining only an ac
ledgi:n waits~t ilie bthet TCP to sen
· t co · wait fo,r each oth
ea TC uses a persistence· timer for
. ~~ith a;wind.9w siz~ of zero, it starts a
:::.!~:.• I~~::~i:~~:c:e~~::i,:~e::! ~;;ment calle9 a pro e: 1s segment contains only 1 byte
ignored in calculating th b' seguence number is never acknowledged· it is even
e sequence num ·er for the rest of the dat Th be '
to resend the acknowledgment. ~- e pro causes the receiving TCP
3. Keepalive Timer ~~t~ irf ~N')dfo_o l~ ~tt Q.fiv-e cr ~ -
A keepalive timer is used in some im l O ~f) l:~\ tiJ l~~ ~r:> ~ ~ ~ ~t
TCPs. Suppose that a client opens a TCP p em~ntahons to prevent a long idle connection between two .,.
Perhaps the client has crashed. In this con~ecbon to ~ server, translers some data, and becomes silent.
. . case, e conuechon remains open forever.
To remedy thts situation, most im leme . .
server hears from a client it resets th. pti ntations eqmp a server with a keepalive timer. Each time the
firom the client after 2 hours b
' it send is mer The fime-out ts · usually 2 hours. If the server does not hear
which is 75 seconds apart, it' assume: ~ pro e s~gm~nt. If there is no response after 10 probes, each of
. . at the chent is down and terminates the connection.

Rahul Puhl/cations
,e;<!. ~ec~- tti ~ R- trlli:,i ~1s. ~'13 r b ~ ½ 1J$ °I d<itc; .

.,,f. IV__t$. . COMPUTER NETWORKS


~ (

fl
~~-~
,11}\IT nmer
TIME-WAIT (2MSL) timer is used during
-
subset of telephony QoS is grade of service (GoS)
requirements, which ~om prises aspects of a
~e termination. The maximum segment connection relating to capacity and co~age of a . ·
~~
.
c0n~. (MSL) is the amount of time any segment network, for example guarante ed maximum
1ueti:st in a network before being disco/ded. The blocking probability and outage probability.
~n 1ernentation needs to choose a v~lue for MSL. o In the field of computer networking and
:rnrnon values are 30 seconds, 1 mmute, or even other packe!,:switched telecomm unication
. tes . The 2MSL timer is used when .TCP networks, the traffic engineering term refers to
Z rninu
0
rms an active close and sends the final ACK resource reservation cont~ol mechanisms rather
perf nnection must' stay open for 2 MSL amount
'f}leCO
than the achieved service quality. Quality of servi½e
of tirne to allow TCP to resend the final ACK in case is the ability to provide different p1ority to differ.ent
the ACK is lost. This requires that the RTO timer at applicptions, users, or data flows, or to guarantee a
the other end times ; ,an~;ew FIN and ACK certain level of performance to a data flow.'
segments are resent. ' \J ~ (!!f.::('et l':f.t3i e i~ex~. ~~~uir ed bit rate, delay, jitter,
packet dropping probability and/or bit error rate
[ 4.4 QUALIFY OF SERVICES
may be guaranteed. Quality of service guarantees
()6:J)efin e QoS: Explain the specific .are importa~t if the n,.?twork capacity is insuffi~ent,
P purpose of QoS. ..==) .1?c,._c,d. . ,. • especially for real-time streaming multi~ed ia
~""lC,t· .
~
'

--
<1',ef,~
- ? -,....
ffi~.!:)~ l.~(I ~)
mp. ~pplicatio ns such as voice over IP, online games and
?,.:) ~eJa j . IP-T\l, since these often require f ~ t rate and .
Meaning ,Y s nl()-f ,-= v~cd'Of) "'10 flfe delay sensitive, and .in netwc;,rks where the
Quality of service (QoS) is the ove?a t capacity is a limited resource, for example in cellular
. . . O t ~--)ft) 11 1~
perfonnance of a telenhony or computer network, data communication. ' ....1....,.1,,. .. \~SQ..rt:J"
~-~ ~
~~ ~VaCF ~~ ~ tA.. Hrt>t' ~~--~ oJ '
particularly the performance seen by the user$ o A network or protocol thal supports g_~
t1e network. To qua~titatively ~u-;;-qu ;!ity of
may agree on a traffic con~ct with the application
~ice, several related aspects of the network
software and r~erve ~pacity in the rw;work nodes,
service are often considered, such as error rates,
for example during a session establishment phase:
b.!ndwidth, throughput,'. tt,.ans.mission delay, .
During the session it may monitor the achieved level
avai)ability, jitter, etc. Qualify.of service js particularly
of performance, for example th~ <lea rate and
iniportant for the traosport of traffic with ~pedal
d!lay, and dyn~ical ly control scheduling priorities
re~ements. In particular, much technology has
in the network nodes. It may release the ~erved
been developed to allow computer networks to
cal?acity during.a teM down phase.
become as useful as telephone networks for ~u~Ho
co~ersations, as well as supportin g new A best-effort network or service does not
applications with even st;ricter service demands. suppo~ quality of service. An alternative to complex
In the field of telephony, quality of service ~S control mechanisms is to provide b,igtl quality
was defined by the ITU in 1994.. Quality of service communication over a best-effort network by over-
· requirements on all the aspects of a provisioning the capacity so that it is sufficient for
comPnses
~nnection,_ such as service response time, loss, the ~xpected peak traffic load. The resulting absence
signal t0 .
_ - -noise ratio, crosstalk, echo, interrupts, of network congestion eliminates the need for QoS
frequenc
- Y response, loudness levels, and so on. A mechanisms.

Ra~ul Publications
MCA

QoS is sometimes used as a quality measure, rate {the maximum throughput). that can b
with many alternative definitio;s, rather than provided to a certain data stream rnay be t e
. d' oo
referring to the ability to rese1ve resources. Quality low for real-time mu Itime ta services if all data
streams _get the same scheduling Pricmt
of service sometimes refers to the leyel of guali!Y of
Dropped packets The routers rnight fail ;
service, i.e. the guaranteed service quality. [3] High ·
deliver {drop) some packets i their data load~
QoS is often confused with a high level of a(§__corrupted, or the packets arrive when the
p~rformance or achieved service quality, for router bufferis__..ere p)ready full. The receivin
example highJ2!!_raje, low latency and law bit error
probability.
application may ask for this information
be retransmitted, possibly causing severe
t:
delays in the overall transmission.
An alternative and disputable definition of
QoS, used especially in application layer services 2. Errors
f"'"'~ te'ephon and streaming v1deb, is
a.- Sometimes packets are ro-~......._..t
requ1t"ements on a 1ebic that reflects or predicts e1Torb caused by noise
fuE:: sUbJecti\, ely e.xpelienced quality. In this context, espec1a y s com.ruunications
bos is the acceptable cumul,g!ilte eff€ct on long copper wires. The receiver has to det
~bscribm· satisfaction. of all imperfections ~fecting t~ and, just a~ if the packet wac; c'ru >p
fue service. Other terms with similar meamng are may ask for this information to
fue quality of experience (QoE) subjective business retransmitted. Latency It might take a lo
concept. the required "user perq;ivad P:!!o~ance". _time for each packet to reach its de;,tindtic
\41 the required "degree of satisfactio~ of the user" because it gets hefd up in long qu ues, ur
or the targeted "number of hapey customers". takes a less direct route to avoid congestio
Examples of measures and measure_ment methods · This is different from throughput, as the del
are mean opinion score (MOS), perceptual speech can build up over time even if the throughp

~-- guality measure {PSQM) and perceptual evaluation


11ideo quality {PEVQ). See also.subjective video
is almost no
latency can ren
cases, exces ·
· ch a~
or online
3. Jitter

ln packet•switchednetworks, quality of service Packets each


d . -~~~~
is affected by various facto~1 which can be divided pack
into "human" and "technical" factors. Human factors on e queues of
include stabili~ of service, availability of service, the routers along t~e path between source
delays, user information. Technical factors include: and destination and this position can varu
reliability' s~ab:t:~ • ff · unpredictably. This variation in delay is known
.w.y, e ectiveness, maintainability
as jitt~nd can sedQµsly affect the quality of
grade of service, etc. Man~gs can happen t~
streami~g audio and/or video.
----=
packets as they travel from origi1!., to destin t·
lti . th t 11
re,su ng m e o owing problems as seen from the
a ion, 4. Out-of-order delivery
point of view of the s ~ r and r ~ :
When a coUecti~n of related packets is routed
1. Low throughput through a network, different ~ckets may take

Due to varying load from dispara te users


sharing the same network resources, the bit
----
different routes, each resulting in a different
delay. The result is that the packets arrive in .
a different order than they W_!!e~ent. This

Rahul PJ1/Jlicat/ons ®i-----------------


T - - - - - - - - - - - - - - - - - ~ C ~ OMPUTER NETWORKS
~l'v - -

problem requires special additional protocols


advantage of however much or little bandwidth is
responsible for rearranging out-of-order
available. Bulk file transfer applications that rely on
ackets to an isochronou~ state once they
TCP are generally elastic.
~each their destination. This is especially
important for video and VoIP streams where Application Layer
quality is dramatically affected by both latency ~t the top of the TCP/IP protocol architecture
and lack of sequence. is the Applicatl:.,n Layer. This layer includes all
proces~es that use the Transport Layer protocols to
APPiications
deliver data. There are many applications protocols.
Adefined qualit of servi.;e may be desired Most provide us~r services, and new services are
~r equired for certain types of network traffic ' for always being added to this layer.
example:
► The m ~dely known an~ plemented
Streaming media specifically applications protocols are: Telnet

Internet protocol television (IPlV)
► The NetworUerminal Protocol, which
Audio over Ethernet provides remote login over the network. IT_P
Audio over IP ► The File Transfer Protocol, which is used for
interactive file transfer. SMTP
lP telephony also known as Voice over IP
(VoIP) ► The Simple M·ail Transfer Protocol, which
delivers electronic mail. f-jJ:lP
Videoconferencing
The Hypertext Itansf_er Protocol, which
Tele-presence
delivers Web pages over the network. While HTTP,
- - ~=--~--- -
Storage applications such as iSCSI and FCoE
Circuit Emulation Service
- --
FTP, SMTP, and teJ.p et are_the masi widely
implemented TCP/IP applications,
.
.
you. will work with
many others as both a \!!.er and a sy~tem
Safety-critical applications ~uch as remote administrator. Some other cornn:ionly used TCP/IP
surgery where ava~lability issues can be applications are: Domain Name Service (Dffil-
hazardous
Open Shortest Path First (OSPF)
Network operations support systems either for
Routing is central to the way TCP/IP works.
the network itself, or for customers' business
OSPF is used by network devices to exchange
critical needs

Online games where real-time lag can be a -


routing information. Routing is also a major topic
of this book. Network File§VStem (NFS)
factor
This protocol allows files to be shared by
Industrial control systems protocols such as various hosts on the network some protocols, such
Ethernet/IP which are used for real-time as telnet all.Q FTP, can only b~ used if the user has
control of machinery some knowledge of the network. Other protocols,
These types of service are called inelastic, like OSPF, run without th; user even knowina!llat
ing that they require a certain minimum level they exist. As system administrator, y; are aware
• the
bandwidth and a certain maximum latency to of all these applications and all th~ protocoJ5 m
ction. By contrast, dastic applications can take other TCP/IP layers.
I~ 4.5 USER DATAGRAM PROTOCOL (UDP) I low-latency and loss tolerating connect·
ionsb
applications on the Internet. Both UDp ~,
~
~ ' ( ' Explain UDP and lts Attributes. run on top of the Internet Profoco}~cl l~
/4e4,: (Imp.) sometimes referred to as UDP/IP or ~c~ ~n~
~ ! r-np t
prqtocols send short packets of dat ·
I

¾
The User Datagram Protocol (UDP) is one of
datagram.
.. a, ca1I~
the core members of the Internet protocol suite.
The protocol was designed by David P. Reed in 1980 UDP provides two services not ProVid
and fonnally defined in RFC 768. the JP layer. It provides port number erj ~J
. . s to h
distingU1sh d1fferent user requests and Opt· e~
UDP uses a simple connectionle:s ' IOnaij
checksum capability to verify that the data atri~,a
· · um of protocol
transmission model w1'th a mm1m
intact. v~
mechanism. It has no handshaking dialogues, and
thus exposes any unreliability of the underlyi~g TCP has emerg~d as the d9mi
I
network
1
~m· There 1s
projocbl to the user· 5 pr---~~- used for the bulk of Internet con
. 0 ~d ri·ng ' or duplicate
p_e guaran1~;."~ deI1ver~ services for b
..,....~~--=--•;4,f~·-••~-·~-:..:
protection. UDP_ provid~ £hecksums for data packets, che
integrity, and port numbers for addressing different reassemblin
functions at the source and destination of the these additi
datagram. ·tion
With

UDP, computer applic~fions canIr-<'send•

messages, in this case referred to as ~~ to


other hosts on an Internet Protocol (IP) network
as ..gaming,
without prior communications to set up special
can suffer
transmission channels or data paths. UDP is suitable
perceived
for purposes where error ~becking -~d correction
is either not necessary ~r is perfouned in the
application, avoiding the overhead of such
processing at the network interface· level. Time- o e use m app ca ons
sensitive applications often use UDP because require lossless data transmission when the
dropping packets is preferable to waiting for delayed
applicatio~ configured to manage the process of
packets, which may not be an option in a real-time
retransmitting lost packets and correctly arranging
system.[1] If error correction facilities are needed
r~ceived packets. This approach can help to improve
at the network interface level, an application may
the data transfer rate of la~ files compared wilh
use the Transmission Control Protocol (TCP) or
TCP.
Str~am Control Transmission Protocol (SCTP).

UDP (User Datagram Protocol) is an Attributes


·t
1
alternative communicationsprotocol to Transmission A number of UDP's attributes make
Contr__ol ProtocoI .(1CP) used primarily for establishing especially suited fo'r certain applications.

----------------1~
R"ltul Publications
l-------------- ------


COMPUTER NETWORKS

It is transaction-oriented, suitable for simple ► Source port number: This field.Jgentifies


query-response protocols such as the Domain the sender's port when meaningful and
Narne System or the Network Time Protocol. should be assumed to be the port to regly to
if needed. If not used, then it should be zero.
It provides datagram, suitable for modeling
If the source host is the client, the port number
other protocols such as in IP tunneling or
is likely ~~ be an ephemeral port number. Jf
Remote Procedure Call and the Network File
the source host is the server, the port number
System. is likely to be a well-known port number.[2]
It is simple, suitaule for bootstrapping or other
► Destination port number: This field
~
purposes without a full protocol stack, such
identifies the receiver's port and is required.
as the DHCP and Trivial File Transfer c---- - .- ==-
Similar to source port number, if the cli~nt is
Protocol. the destination host then the port.., number
It is stateless, suitable for very large numbers will likely be an ephemeral port number and
of clients, such as in streaming media if the destination host is the server then the
applications for example IP1V port_number will likely be a well-known port
nl\.mber.

The lack of retransmission delays makes i~
suitable for recli-time applications such as
Voice over IP, online games1 and many
► ~ of the UDP header and UDP data. The
bytes -
Length: A field that specifies the length in

minimum_length is 8 bytes because that is


protocols built on top of the Real Time
- -
Str~iRg Prntocol.
- the length of the header. The field size sets a
~ theoretical limit of 65,535 bytes (8 byte
Works well in unidirecti9nal communication, header + 65,527 bytes of data) for a UDP
suitable for broadcast information such as in datagram. The practical limit for the data
many kinds of service discovery and shared length which is imposed by the underlying
information such as broadcast time or 1Pv4 protocol is 65,507 bytes (65,535 " 8
' --
Routing Information Protocol I
byte UDP header " 20 byte IP header) .

UDP provides application multiplexing (via ► In 1Pv6 Jumbo grams it is possible to have
port numbers) and integrity verification (via UDP packets of size greai£.r_ than 65,535
checksum) of the header and payload.[4] If bytes.[5] RFC 2675 specifies that the length
..
transmission reliability is desired, it must be field is set to zero if the length of the UDP
implemented in the user's application. header plus UDP data is greater than 65,535.

The UDP header consists of 4 fields, each of


hich is 2 bytes (16 bits).[1] The use of the fields
Checksum" and "Source port" is optional in 1Pv4

-
Checksum: The checksum field is used for
error-checking of the head~r ancJ...daj_a~ If no
checksum is generated by the transmitter, the
Pink background in table). In 1Pv6 only the source field uses the value .all-zeros.[6] This field is
rt is optional (see below) . not optional for 1Pv6. [7)

- - - - - - - - - - - - - -----l~r-----:--- -----~Raliul Public11tiom


MCA II YEAR Ill SEMe
~
Reliable byte stream (TCP)
~ relia~le byte stream is a common service paradigm in computer networking; it refers to •
stream m which the bytes which emerge from the communicajion channel at the recipient are exa ½te
. ctly the
same, and in exactly the same order' as they were when the sender inserted them into the ch ~~-
th
The classk example of a reliable byte siream communication protocol iS e Transmfssi6n Con
ocol, one of the major building blocks of the Internet
A reliable byte stream is not the only reliable service paradig~ whic~ computer netw
[ munication protocols provide, however; other protocols (e.g. SCTP) provide a tehable message str
.e. the dala is divided up into distinct units, which are provided to the consumer of the data as •

ob1ects
Connection-oriented (TCP)
~ Flow control: keep sender from ovenunnlng receiver

~ Congestion control: keep sender from overrunning network.

~ ;:> ~ d~~ ~u.~ce


~
f)'D~ '1 c . ~ iii\&) ,!1J.J =--~
':C"\ ~) )~ ~~ ~ y; ~
"'t ~--tod M-W!JO

i> lt ~l~ se.rrls -t~ deft\ l-Ofr ~):I{ r~ 1A.1ira


~ ·
::::) ~ \ w ~ c_~~~. ~ts. \U~ ~ e.Th,Qy'
~) Uf1(~~ dectioo,
:::c-) t-10 ~~a
57.\~ ~ ~;> te_~~.;- ~ -k ~b ,~ r{ !;fr
:::) ,Jo ~oo ~l, ,-6 \t ~6~ ~~{"·
€;>llD1> "',s _i b_r'a.

\~ bTil ·

Rahul Puh/lcalions

You might also like