You are on page 1of 23

1508 Understanding TCP Model Internals and Interface

Understanding TCP Model Internals and Interface


Contents
Understanding TCP Model Internals and Interface...............................................................................1 Contents.............................................................................................................................................1 Lab 1: TCP Flavor Comparison.............................................................................................................3 Bac gro!nd........................................................................................................................................3 "b#ective............................................................................................................................................3 $et%or Model..................................................................................................................................& $et%or 'escription..........................................................................................................................& Main Config!ration (teps..................................................................................................................& Instr!ctions.........................................................................................................................................) *+amine $et%or Config!ration...................................................................................................) Config!re TCP Ta,oe on -osts. /!n t,e (im!lation. and Collect /es!lts...................................0 Config!re TCP /eno on -osts. /!n t,e (im!lation. and Collect /es!lts....................................1 Config!re TCP $e% /eno on -osts. /!n t,e (im!lation. and Collect /es!lts............................2 Config!re TCP (3C4 on -osts. /!n t,e (im!lation. and Collect /es!lts..................................5 /es!lts Comparison.........................................................................................................................16 Lab 7: Modif8ing (lo%9(tart Mec,anism to Improve Performance...................................................11 Bac gro!nd......................................................................................................................................11 "b#ective..........................................................................................................................................17 $et%or Model................................................................................................................................17 $et%or 'escription........................................................................................................................17 Main Config!ration (teps................................................................................................................17 Instr!ctions.......................................................................................................................................13 /!n /eference (cenario...............................................................................................................13 Implementation (teps...................................................................................................................13 Implement :/estart ;indo%<......................................................................................................1& Implementation (teps...................................................................................................................1& Lab 3: Interfacing %it, TCP................................................................................................................12 Bac gro!nd......................................................................................................................................12

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ * o+ !,

1508 Understanding TCP Model Internals and Interface

"b#ective..........................................................................................................................................12 =enerator and $ode Models............................................................................................................12 =enerator Model 'escription..........................................................................................................12 Main Config!ration (teps................................................................................................................15 Instr!ctions.......................................................................................................................................76 Interfacing a C!stom Traffic (o!rce over TCP..........................................................................76 (!mmar8..........................................................................................................................................73

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ ! o+ !,

1508 Understanding TCP Model Internals and Interface

Lab 1: TCP Flavor Comparison


Background
TCP detects a pac et loss %,en: /etransmission timer e+pires. or n9t, d!plicate ac no%ledgement is received for t,e connection

TCP flavors differ in ,o% t,e8 react to pac et loss. ;,ile all TCP implementations reset t,e congestion %indo% after retransmission timeo!t e+piration to one ma+im!m segment si>e ?M((@. t,e8 ma8 proceed differentl8 after d!plicate 3C4s are received. T,e missing segment is al%a8s resent immediatel8. b!t transmission of ne% or !nac no%ledged data depends on t,e selected flavor. ;e %ill compare t,e follo%ing flavors: Ta,oe A fast retransmit follo%ed b8 slo% start /eno A fast retransmit follo%ed b8 fast recover8 $e% /eno A similar to /eno. b!t does not ,alve congestion %indo% m!ltiple times d!ring recover8 process (elective ac no%ledgement ?(3C4@ A selective retransmission based on received selective ac no%ledgements

b!ective
;e %ill st!d8 TCP be,avior after t,ree segments are dropped from t,e same %indo% of data. T,e follo%ing grap, s,o%s t,e seB!ence n!mbers of sent and dropped segments.

'ropped segments

For eac, of t,e modeled TCP flavors. %e %ill e+amine:

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ , o+ !,

1508 Understanding TCP Model Internals and Interface

(egment retransmission process ?t,e order in %,ic, segments are retransmitted@ T,e reason %,8 segments get retransmitted A fast recover8 vs. e+piration of timeo!t timer Congestion %indo% after drops 3pplication response time

;e %ill compare:

"et#ork Model

"et#ork $escription
T,e %or station do%nloads a 36.6669b8te file from t,e server. T,e pac et anal8>er is !sed to drop selected segments and collect statistics.

Main Configuration %teps


1. *+amine net%or config!ration. 7. Config!re TCP Ta,oe on ,osts. r!n t,e sim!lation. and collect res!lts. 3. Config!re TCP /eno on ,osts. r!n t,e sim!lation. and collect res!lts. &. Config!re TCP $e% /eno on ,osts. r!n t,e sim!lation. and collect res!lts. ). Config!re TCP (3C4 on ,osts. r!n t,e sim!lation. and collect res!lts. 0. /es!lt comparison across scenarios.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ # o+ !,

1508 Understanding TCP Model Internals and Interface

Instructions
Examine Network Configuration 1. (tart "P$*T Modeler. 7. "pen pro#ect 1)62Clab1. (cenario Ta,oe opens. T,is scenario ,as been f!ll8 config!red for 8o!. 3. *+amine TCP config!ration. (ender and receiver ,ave been config!red identicall8. "pen :TCP Parameters< attrib!te on one of t,em and c,ec t,e follo%ing: a. /eceive B!ffer is set to 0).)3) b8tes. (ince t,is val!e is greater t,an t,e si>e of transmitted file. t,e si>e of t,e TCP receive b!ffer %ill never prevent data from being sent. b. Ma+im!m 3C4 'ela8 is 6.661 sec. T,is %ill ca!se 3C4s to be sent almost immediatel8 after receiving a segment.

&. *+amine pac et anal8>er config!ration. T,e TCP Pac et 3nal8>er node can be !sed to selectivel8 drop segments and to introd!ce additional net%or dela8 to t,e segment. (egments to be dropped are identified b8 t,eir order ?e.g.. first segment. second. D@ In t,is lab. t,ree segments ?73. 71. and 72@ are dropped b8 t,e anal8>erCsvrC% stn node.

). Ta e note of selected TCP statistics. ;e %ill collect: 3pplication response time (i>e of TCP congestion %indo% on server (eB!ence n!mber of dropped and for%arded segments on t,e traffic anal8>er

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ - o+ !,

1508 Understanding TCP Model Internals and Interface

Configure TCP Tahoe on Hosts, Run the Simulation, and Collect Results 1. TCP Ta,oe s!pports fast retransmission and resets t,e congestion %indo% to one M(( after segment retransmission. C,ec t,at Fast /etransmission is enabled and Fast /ecover8 is disabled. Eo!r TCP settings on t,e %or station and server are s,o%n belo%.

7. /!n t,e sim!lation. t,en load statistics into t,e provided templates. 3. Eo! s,o!ld see t,e follo%ing res!lts:

/etransmitted segments

Sequence Numbers and ACK Numbers (egments are identified b8 t,eir segment seB!ence n!mbers ?e.g. segment 1. 7. D@ In t,e follo%ing te+t. t,e term :3C4 for segment F< means t,at segment F ,as been received s!ccessf!ll8 and t,e ne+t e+pected segment is segment F G 1. Results Analysis T,e server retransmits segment 73 after it ,as received a t,ird d!plicate 3C4 and set its congestion %indo% to one M((. 3fter t,e client receives t,e retransmitted segment. it also processes t,e previo!sl8 received segments 7&. 7). and 70 and sends an 3C4 for segment 70. T,is allo%s t,e receiver to increase its congestion %indo% to 7 and resend segments 71 and 72. T,e 3C4 for segment 71 increases t,e serverHs congestion %indo% to 3 and segments 75 and 36 can be sent. T,e 3C4 for segment 71 ac no%ledges segments !p to &). T,e sender t,en contin!es sending !nsent data. $otice t,at segments 75 and 36 %ere !nnecessaril8 retransmitted and TCP Ta,oe recovers from t,e pac et lost %it,o!t retransmission timeo!t e+piration.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ . o+ !,

1508 Understanding TCP Model Internals and Interface

Configure TCP Reno on Hosts, Run the Simulation, and Collect Results 1. '!plicate t,e Ta,oe scenario and name it /eno. 7. *nable :Fast /ecover8< on t,e %or station and server b8 setting it to :/eno<. Ma e s!re t,at 8o!r TCP settings on t,e %or station and server are as s,o%n belo%.

3. /!n t,e sim!lation. create templates from t,e e+isting grap,s. and load res!lts into t,em. Eo! s,o!ld see t,e follo%ing res!lts:

Results Analysis T,e si>e of t,e congestion %indo% #!st before fast retransmission %as 17.372 b8tes. T,e congestion %indo% after fast retransmission is reset to 17.372 I 7 G 3 J M(( K 010& G 3 J )30 K 1117 T,e sender t,en contin!es receiving more d!plicate 3C4s and increases its congestion %indo% b8 one M(( for eac, 3C4. T,e 3C4 for retransmitted segment 73 ta es t,e server o!t of fast recover8 and t,e congestion %indo% is set to ,alf of t,e pre9fast retransmission val!e. T,e sender t,en receives 3 d!plicate 3C4s for segment 71 and resends segment 72 !sing t,e fast retransmission algorit,m. -o%ever. beca!se t,e server does not receive more 3C4s. its congestion %indo% co!ld not increase f!rt,er. To be able to send more data. it ,as to %ait for t,e retransmission timer to e+pire. T,is increases application response time considerabl8.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ / o+ !,

1508 Understanding TCP Model Internals and Interface

Configure TCP New Reno on Hosts, Run the Simulation, and Collect Results 1. '!plicate t,e /eno scenario and name it :$e%C/eno< 7. *nable $e% /eno fast recover8 on bot, ,osts b8 c,anging :Fast /ecover8< to :$e% /eno<. Ma e s!re t,at 8o!r TCP settings on t,e client and t,e server are as s,o%n belo%.

3. /!n t,e sim!lation. create templates from e+isting grap,s and load res!lts into t,em. Eo! s,o!ld see t,e follo%ing res!lts:

Results Analysis T,e si>e of t,e congestion %indo% #!st before fast retransmission %as 17.372 b8tes. 3fter fast retransmission. t,e congestion %indo% is reset to 17.732 G 3 J M(( K 17.732 G 3 J )30 K 1171 T,e process t,en contin!es receiving more d!plicate 3C4s and increases its congestion %indo% b8 one M(( for eac, received 3C4. Unli e in /eno. t,e 3C4 for t,e retransmitted segment 73 does not ta e $e% /eno o!t of t,e recover8 process. $e% /eno %ill eep increasing its congestion %indo% for eac, received 3C4 !ntil t,e 3C4 for t,e last segment sent before retransmission is received ?%,ic, is segment &)@. -o%ever. b8 t,at time all segments ,ave been sent and t,e congestion %indo% never drops again. Increasing t,e congestion %indo% %ill also allo% t,e process to resend segments 71 and 72. 'rops in t,e congestion %indo% d!ring t,e recover8 process are d!e to partial 3C4s ?3C4s ac no%ledging ne% data@. Partial 3C4s decrease t,e congestion %indo% b8 t,e amo!nt of 3C4ed data.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ 0 o+ !,

1508 Understanding TCP Model Internals and Interface

Configure TCP SACK on Hosts, Run the Simulation, and Collect Results 1. '!plicate t,e $e% /eno scenario and name it :(3C4<. 7. (et Fast /ecover8 bac to :/eno< and enable :(elective 3c no%ledgements<. Ma e s!re t,at 8o!r TCP settings on t,e %or station and server are as s,o%n belo%.

3. /!n t,e sim!lation. create templates from e+isting grap,s. and load res!lts into t,em. Eo! s,o!ld see t,e follo%ing res!lts:

Results Analysis (imilar to t,e flavors %e ,ave alread8 e+amined. (3C4 retransmits segment 73 !sing t,e fast retransmit algorit,m. -o%ever. it !ses a different approac, to determine %,en and %,ic, pac ets are sent o!t d!ring fast recover8. It calc!lates t,e amo!nt of in9flig,t data based on selective ac no%ledgements t,at it ,as received. 'ata can be sent onl8 if t,e amo!nt of o!tstanding data is lo%er t,an t,e si>e of t,e congestion %indo%. Beca!se it ,as information abo!t %,ic, segments %ere received. it is able to resend onl8 missing segments and t,en contin!e %it, transmission of !nsent data.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ 1 o+ !,

1508 Understanding TCP Model Internals and Interface

&esults Comparison
;e ,ave seen ,o% pac ets are retransmitted and t,e congestion %indo% is calc!lated depending on a selected flavor. T,e follo%ing grap, s,o%s FTP do%nload time for selected flavors. To vie% t,e grap,. compare res!lts across t,e scenarios for :Client FTP9L'o%nload /esponse Time< on t,e %or station.

Reno

Tahoe

New Reno SACK

;e can observe t,at (3C4 and $e% /eno ,ave t,e best response time. %,ile /eno ,as t,e %orst response time for t,is case. Moreover. /eno is even :slo%er< t,an Ta,oe. T,is ma8 be s!rprising. beca!se /eno %as designed as an improvement over Ta,oe. -o%ever. t,is is beca!se /eno is optimi>ed for net%or s %it, a small pac et discard ratio. %,ereas %e presented a case in %,ic, m!ltiple pac ets %ere dropped from t,e same %indo% of data. For a comparison. %e ,ave also e+ec!ted sim!lations in %,ic, onl8 one segment is dropped ?segment 73@. In t,is case. /eno s,o!ld perform better t,an Ta,oe. T,at t,is is indeed t,e case can be seen from t,e grap, belo%.

'"$

F L(B 1

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *" o+ !,

1508 Understanding TCP Model Internals and Interface

Lab 2: Modifyin Slow!Start Mechanism to "m#ro$e %erformance


Background
;,en application data transfer is follo%ed b8 an idle period larger t,an t,e si>e of t,e retransmission timeo!t. TCP resets its congestion %indo% to one M((. T,is be,avior is ill!strated in t,e grap, belo%.

Idle Period > Last RTO

/esetting t,e congestion %indo% to one M(( mig,t be too conservative for net%or s %it, lo% pac et loss. /FC 7&)1 defines an alternative approac, for setting t,e congestion %indo%:

MNac22O recommends t,at a TCP !se slo% start to restart transmission after a relativel8 long idle period. (lo% start serves to restart t,e 3C4 cloc . #!st as it does at t,e beginning of a transfer. T,is mec,anism ,as been %idel8 deplo8ed in t,e follo%ing manner. ;,en TCP ,as not received a segment for more t,an one retransmission timeo!t. c%nd is red!ced to t,e val!e of t,e restart %indo% ?/;@ before retransmission begins.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ ** o+ !,

1508 Understanding TCP Model Internals and Interface

b!ective
;e %ill modif8 TCP performance for persistent application sessions b8 modif8ing t,e congestion %indo% after idle periods. To do t,at. %e %ill implement t,e :/estart ;indo%< algorit,m as defined in /FC 7&)1. ;e %ill t,en compare t,e TCP congestion %indo% and application response time for t%o scenarios: (cenario 1. T,is is t,e baseline scenario. Congestion %indo% is reset to one M((. (cenario 7. :/estart ;indo%< is set to & J M((.

"et#ork Model

"et#ork $escription
T,e client node is transferring five 19MB files from a server as part of a data transfer operation. T,ere is an idle d!ration of ) seconds bet%een t,e file transfers. 3 c!stom application is !sed to generate t,e data.

Main Configuration %teps


1. /!n t,e reference scenario and collect application response time and congestion %indo% si>e. 7. 3dd a ne% attrib!te :/estart ;indo%< and compare res!lts %it, t,e baseline scenario.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *! o+ !,

1508 Understanding TCP Model Internals and Interface

Instructions
&un &eference %cenario m!lementation Ste!s 1. /!n "P$*T Modeler. "pen pro#ect 1)62Clab7. (cenario :defa!ltCnet%or < %ill s,o% !p as t,e first scenario. Pro#ect :1)62Clab7Cref< is also provided in case 8o! simpl8 %ant to follo% along %it,o!t act!all8 performing t,is lab. 7. /!n t,e sim!lation. 3. Load res!lts. 3 template panel e+ists for :3pplication /esponse Time ?sec@< and :TCP Congestion ;indo% ?b8tes@< for t,e TCP connection. Load t,e data into templates. Results Analysis $otice t,at. after idle periods. TCP resets its congestion %indo% to one M(( and contin!es %it, slo% start.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *, o+ !,

1508 Understanding TCP Model Internals and Interface

Implement )&estart *indo#+ In t,e previo!s scenario. slo%9start started at t,e same val!ePone M((Pfor eac, connection. ;e are s!re t,e pipe is empt8. and can t,erefore be more aggressive. ;e %ill define a ne% TCP attrib!te called :/estart ;indo%<. ;e %ill follo% t,e steps belo% to add a ne% TCP attrib!te. 1. 'efine t,e attrib!te on t,e interface of TCP manager process. 7. 3dd a ne% field to t,e TcpTCConnCParameters data str!ct!re. 3. /ead in t,e attrib!te from t,e manager process. &. Modif8 TCP be,avior to !se t,e ne% attrib!te. m!lementation Ste!s 1. 3dd :/estart ;indo%< as a config!rable attrib!te. a. "pen t,e :tcpCmanagerCv3< process model. b. From t,e :Interfaces< men! c,oose :Model 3ttrib!tes<. c. (elect :TCP Parameters< and clic :*dit 3ttrib!tes<. d. (croll to t,e end and define a ne% attrib!te :/estart ;indo%<. e. 'eclare it as an integer and select :*dit Properties<.

f. Clic t,e :Load P!blic< b!tton and c,oose :restartC%indo%<. T,is %ill load an alread8 defined attrib!te. If prompted to select range. set it as s,o%n on t,e pict!re belo%. g. (elect :Private< to enable local editing and clic :"4<. ,. T,e complete attrib!te definition is s,o%n belo%. $ote t,at t,e ne% attrib!te is promoted to t,e node level a!tomaticall8. Eo! do not need to modif8 %or station and server node models. T,is is beca!se t,e attrib!te %as added to a compo!nd attrib!te alread8 defined on a node.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *# o+ !,

1508 Understanding TCP Model Internals and Interface

i. Move t,is ne%l8 defined attrib!te !sing t,e :Move Up< b!tton and place it #!st belo% t,e :(lo%9(tart Initial Co!nt< attrib!te. #. Clic t,e &K b!tton to save t,e c,anges. 7. 3dd a ne% field to TCP parameters data str!ct!re T,e :tcpCv3< ,eader file defines a data str!ct!re :T%pT2Co&&2P)r)3$ $r(< !sed to conve8 config!red attrib!te parameters from t,e manager to t,e connection processes. Eo! %ill add a ne% field to t,is data str!ct!re. a. C,oose 'ile ( &#en. select :-eader File CICGG. .,<. and select :tcpCv3<. b. 3dd t,e variable :restartC%indo%< of t8pe integer to t,e TcpTCConnCParameters data str!ct!re. as follo%s: int restartC%indo%Q 3. (ave c,anges and close t,e file.

&. /ead t,e config!red attrib!te val!e Eo! %ill no% modif8 t,e TCP code so t,at t,is ne% attrib!te is parsed and available to connection processes. T,e f!nction t,at reads all config!red attrib!tes is tcp_mgr_tcp_params_parse(). Eo! %ill add code to t,is f!nction. so t,at t,e ne% attrib!te is read in.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *- o+ !,

1508 Understanding TCP Model Internals and Interface

a. "pen t,e f!nction bloc . =o to line 36) and add t,e follo%ing code to obtain t,e assigned val!e.
if ,op-ima-ob!-attr-get ,tcp-parameter-ob!id. )&estart *indo#+. /tcp-parameter-ptr01restart-#indo#2 33 PC-C MPC $'-F(ILU&'2 tcp-mgr-error ,)Unable to get &estart *indo# attribute+24

b. (ave c,anges to t,e f!nction bloc and t,e :tcpCmanagerCv3< process model. c. Compile t,e process model. If t,e model does not compile. 8o! can tr8 !sing t,e :tcpCmanagerCv3Cref< process model. (ave it as :tcpCmanagerCv3< and recompile. ). Modif8 TCP be,avior in t,e connection process a. "pen tcpCconnCv3.pr.m. b. C,ange t,e assignment of congestion %indo% ?c%nd@. so t,at instead of it being set as t,e initial %indo% si>e. it is set as t,e val!e contained in t,e attrib!te %e created in :tcpCmanagerCv3<. T,e tcp_restart_window_size_set() f!nction ret!rns a val!e based on t,e attrib!te %e created in t,e TCP manager process. T,is f!nction ,as alread8 been %ritten for 8o!. Uncomment it. so t,at it %ill be !sed. =o to end of t,e tcpCconnCv3.pr.m f!nction bloc and remove :Rif 6< and :Rendif< from before and after tcp_restart_window_size_set(). T,is %ill !ncomment t,e f!nction. 3lso. remove t,e :Rif 6< and :Rendif< from t,e ,eader bloc . c. /eplace t,e t%o instances of :c%nd K initialC%indo%Csi>e< on lines 336& and 315& %it, t,e follo%ing code:

&. Compile process model

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *. o+ !,

1508 Understanding TCP Model Internals and Interface

;e are done %it, o!r c,anges to tcp connection process. Instead of restarting t,e %indo%. it s,o!ld no% !se t,e ne% algorit,m. ). /estart %indo% config!ration ;e %ill no% config!re t,e TCP process on t,e %or station to restart %it, t,e congestion %indo% set to & M((. a. "pen scenario :modifiedCrestartC%indo%<. b. /ig,t9clic on t,e :%or station< node and c,oose )dit Attributes. Clic and select :*ditD< for t,e :TCP Parameters< attrib!te. Clic on t,e val!e for :/estart ;indo%< and set it to :& J Initial ;indo%<. Clic :"4< to save t,e c,anges. c. Ma e t,e same c,anges to t,e :server< node.

0. /!n t,e sim!lation. 1. Load data into t,e provided templates. Results Analysis Eo! s,o!ld see t,e follo%ing res!lts:

In agreement %it, t,e design. congestion gro%s at a m!c, faster rate %it, :/estart ;indo%< set to fo!r times t,e initial %indo%. 3pplication response time decreased %,en t,e restart %indo% %as set ,ig,er t,an one M((. '"$ F L(B 5

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ */ o+ !,

1508 Understanding TCP Model Internals and Interface

Lab 6: Interfacing #it7 TCP


Background
"P$*T provides an 3PI pac age t,at can be !sed to interface 8o!r c!stom application model over TCP. T,e pac age contains f!nctions t,at can be !sed to interact %it, TCP.

b!ective
;e ass!me t,at a c!stom application model ,as been created. T,e goal of t,is lab is to modif8 it so t,at it can be !sed over t,e standard TCP model. Moreover. t,e model s,o!ld operate directl8 over TCP as seen on t,e client node model belo%.

8enerator and "ode Models

8enerator Model $escription


T,e generator %ill generate data %it, a config!rable interarrival time and pac et si>e. T,e application s,o!ld start and end data transmission at a config!rable time. T,e follo%ing pict!re s,o%s t,e application model attrib!tes.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *0 o+ !,

1508 Understanding TCP Model Internals and Interface

T,e process model consists of fo!r states: Init state. Used to initiali>e t,e model and to read t,e config!red attrib!tes and store t,em. "pen state. T,e application process %ill transfer into t,is state at t,e config!red :(tart Time<. 3t t,at time. t,e application %ill reB!est TCP to open a ne% TCP connection to t,e server. 'ata state. 3pplication sends and receives data. (egments are generated %it, config!rable pac et si>es and pac et interarrival times. 'ata are sent to and received from TCP. /elease state. Connection is terminated. T,e process transfers into t,is state at t,e config!red :*nd Time<. 3pplication s,o!ld t,en reB!est TCP to terminate t,e connection.

Main Configuration %teps


1. 'efine attrib!tes reB!ired for connection set!p in t,e TCP client process. 7. /egister %it, t,e TCP 3PI. 3. Initiate TCP connection set!p process. &. -andle indications generated b8 t,e TCP process. ). (end data s!c, t,at TCP can associate it %it, a connection. 0. Close t,e connection.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ *1 o+ !,

1508 Understanding TCP Model Internals and Interface

Instructions
nterfacing a Custom Traffic Source o"er TCP 1. T,e IP addresses and ports of t,e so!rce and destination identif8 a TCP connection. TCP connection is defined b8 so!rce and destination IP addresses and ports. In order for TCP to establis, a connection. it needs to ,ave t,is information available. IP destination address and local and remote ports are config!rable from t,e application. a. "pen t,e application process model tcpClabCgen. c,oose "nterfaces ( Model "nterfaces. and notice t,e config!rable parameters related to TCP session.

7. TCP client initiali>ation 2. To be able to establis, a connection. t,e application needs to register %it, TCP 3PI first. tcp_app_register() is !sed for t,is p!rpose. a. "pen t,e enter e+ec!tives of t,e I$IT state and notice ,o% t,is is performed.

3. TCP client connection set!p 5. T,e application can start sending data to TCP onl8 after TCP establis,es a connection. Connection establis,ment reB!est is sent !sing "P*$ reB!est as seen belo%.

a. "pen t,e enter e+ec!tives of t,e "P*$ state and notice t,at t,e application !ses t,e application ,andle obtained from t,e registration process ?step 7 above@.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ !" o+ !,

1508 Understanding TCP Model Internals and Interface

T,e TCP process t,en creates a ne% connection and sends t,e (E$ message.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ !* o+ !,

1508 Understanding TCP Model Internals and Interface

&. Connection establis,ment indication T,is indication is received after t,e TCP connection is f!ll8 establis,ed. It ca!ses t,e application process to transfer to t,e '3T3 state.

). 'ata transfer 16. "!tgoing data 3fter t,e application pac et is created. it is sent to TCP !sing tcp_data_send(). Incoming data For TCP to send data to t,e application process. it first needs to receive a /*C*IS* command from t,e application. T,is is done !sing tcp_receive_command_send().

0. Closing TCP connection "nce t,e data transfer ,as been completed. t,e application %ill transfer to /*L*3(* state. It s,o!ld t,en send a CL"(* command to TCP to terminate t,e connection. tcp_connection_close() is !sed to do t,at.

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ !! o+ !,

1508 Understanding TCP Model Internals and Interface

7. (im!lation e+ec!tion Eo! can no% create a simple net%or model to c,ec t,at t,e data is sent and received b8 t,e ne% application. (!c, a model ,as alread8 been created for 8o!. "pen t,e 1)62Clab3 pro#ect and inspect t,e %or station and server settings and node models.

Eo! can t,en r!n t,e sim!lation. collecting lin t,ro!g,p!t statistics. and c,ec t,at t,e data is indeed e+c,anged bet%een t,e t%o ,osts.

%ummar9

1. Use of 3PIs significantl8 red!ces t,e n!mber of lo%9level details reB!ired to interface to t,e TCP la8er. 7. T,e e+ample :tcpClabCgen< model can be !sed as a template to create c!stom application la8er interfaces.

'"$

F L(B 6

CONFIDENTIAL INFORMATION: DO NOT DISCLOSE, FORWARD, DISTRIBUTE, SHARE, OR MAKE COPIES OF THIS DOCUMENT IN WHOLE OR IN PART. Copyrigh !""# OPNET T$%h&o'ogi$(, I&%.

P)g$ !, o+ !,

You might also like