<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0"><id>tag:blogger.com,1999:blog-8826608353769320919</id><updated>2021-10-27T03:24:12.002+05:30</updated><category term="Network Simulator 2" /><category term="NS2" /><category term="Linux" /><category term="RealTimeSystems" /><category term="C" /><category term="Embedded Systems" /><category term="EmbeddedSystems" /><category term="NS3" /><category term="Linux Kernel Programming" /><category term="Network Simulator 3" /><category term="Ubuntu" /><category term="NS2 Tutorial" /><category term="NS2 Lecture Series" /><category term="IOT" /><category term="Fedora" /><category term="wireless" /><category term="ADA" /><category term="PHP" /><category term="Tracegraph" /><category term="Internet of Things" /><category term="Omnet" /><category term="VANET" /><category term="VHDL" /><category term="Contiki" /><category term="Sensor Networks" /><category term="8051" /><category term="MySQL" /><category term="Omnet++" /><category term="AODV" /><category term="Linux Commands" /><category term="Moodle" /><category term="Wired network" /><category term="Data Structures" /><category term="Javascript" /><category term="Windows 10" /><category term="xgraph" /><category term="AWK" /><category term="Analytics" /><category term="C++" /><category term="Digital Electronics" /><category term="NS2 Errors" /><category term="R" /><category term="Software Engineering" /><category term="TCL" /><category term="nsnamcom" /><category term="IoT Tutorials" /><category term="Mac OS" /><category term="Research" /><category term="Windows 7" /><category term="Windows 8" /><category term="Windows7" /><category term="CentOS" /><category term="Energy" /><category term="Linux Mint" /><category term="Presentation" /><category term="RTOS" /><category term="Videos" /><category term="Android" /><category term="Apache" /><category term="CMS" /><category term="Cloud" /><category term="Electrical Engineering" /><category term="Kali Linux" /><category term="MANETs" /><category term="Network Analyser" /><category term="Node JS" /><category term="Open Source" /><category term="Optical Networks" /><category term="Perl" /><category term="Protocol" /><category term="Python" /><category term="SDN" /><category term="Shell" /><category term="Special" /><category term="Stone Letters" /><category term="Testing" /><category term="Wireshark" /><category term="Youtube" /><category term="elearning" /><category term="gnuplot" /><category term="wordpress" /><title type="text">Engineering Clinic</title><subtitle type="html">Its all about Network Simulations, Internet of Things, Sensor Networks, Programming, etc</subtitle><link rel="alternate" type="text/html" href="http://www.nsnam.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default?start-index=26&amp;max-results=25&amp;redirect=false" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>422</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/NetworkSimulators" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="networksimulators" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-sa/3.0/" /><logo>http://creativecommons.org/images/public/somerights20.gif</logo><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">NetworkSimulators</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">https://feedburner.google.com</feedburner:feedburnerHostname><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-1057961009016234928</id><published>2021-10-26T14:44:00.007+05:30</published><updated>2021-10-26T14:51:32.666+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Lecture Series" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Tutorial" /><title type="text">Wired Networks in NS2 - NS2 Tutorial 5</title><content type="html">&lt;h1 style="line-height: 150%; margin-bottom: 0.0001pt; text-align: left;"&gt;&lt;b style="text-align: right;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: x-large;"&gt;Wired Networks&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;In this post:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; font-size: 12pt; line-height: 150%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Introduction to Wired networks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-bottom: 0cm; mso-add-space: auto; mso-list: l1 level1 lfo1; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; font-size: 12pt; line-height: 150%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Tcl scripts for various wired networks&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Wired networks are easier to setup as they need a physical link between the nodes and hence they form a network by having a duplex or simplex link. Also we have seen an example of a two node network in Chapter 1 that informs how to connect two nodes in a network with a duplex link.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;This chapter tells about the various wired network supported in ns2 and examples to showcase these networks.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;This wired example sets the shape for the nodes and also sets labels for the node. Each node can be differentiated using labels like client, server. Etc. There are 3 shapes supported by ns2, they are hexagon, square and circle. Once the shape is fixed, the shapes can't be changed during the simulation.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$node shape hexagon&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Also the nodes can be colored using the coloring values, there are so many colors supported by ns and some of them are blue, red, green, orange, magenta, etc.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$node color name&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;the following examples depicts three nodes that are either colored,shaped and labelled. The following network does not have any traffic generation or simulation. Its just informs the attributes of the node.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Sometimes the node can be marked with a color and shape with a name. The syntax is &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$node add-mark name color shape &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 478.8pt;" valign="top" width="958"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Listing 4.1 – To set the attributes of the node   like shape, color, label, marking.&lt;/span&gt;&lt;/b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Create global variables &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ns [new Simulator] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#setting nam trace &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set namf [open wired1.nam w] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns namtrace-all $namf &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#open the trace file &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tracef [open wired1.tr w] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns trace-all $tracef &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set proto rlm &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#setting the color values &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 1 blue &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 2 yellow &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 3 red &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#---------- creating client- router- end server node----------------# &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n0 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n1 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n2 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#establish the link between the nodes &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n0 $n1 2Mb 100ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n1 $n2 200Kb 100ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Label the nodes &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$n0 label Client1" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$n1 label Server" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$n2 label Client2" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#setting the color for nodes &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$n0 color blue &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$n1 color red &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$n2 add-mark pradeep green square &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Shaping the nodes for differentiation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$n1 shape hexagon &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$n2 shape square &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#finish procedure &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc finish {} { &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;global ns tracef namf &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns flush-trace &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;close $tracef &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;close $namf &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;puts "Opening nam..." &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;exec nam wired1.nam &amp;amp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;exit 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Calling finish procedure &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 2.0 "finish" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The above listing just shows two clients and a server and there was no traffic and it is just to create a topology and Fig 4.1 shows this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-Hazl82Cn0k8/YXfF_OMvjRI/AAAAAAACd5U/AIj6ccLVBn4loXSTVBrhwRS1AB4ZJvNIgCNcBGAsYHQ/s1296/41.jpg" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="A simple Wired network with three nodes" border="0" data-original-height="485" data-original-width="1296" height="240" src="https://1.bp.blogspot.com/-Hazl82Cn0k8/YXfF_OMvjRI/AAAAAAACd5U/AIj6ccLVBn4loXSTVBrhwRS1AB4ZJvNIgCNcBGAsYHQ/w640-h240/41.jpg" title="A simple Wired network with three nodes" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 24px;"&gt;A simple Wired network with three nodes&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;h2 style="line-height: 150%; margin-bottom: 0.0001pt; text-align: left;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: large;"&gt;Tcp Source and the Sink Agent&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;This example shows the simple Tcp with FTP Traffic. Since in wired networks, Tcp is a connection oriented transport protocol which needs an acknowledgment for every packet it sents. The following network shows that. There are 4 nodes, and two nodes are exchanging packets between them and an intermediate node is forwarding the packet to the destination node. The performance characteristics of this network is analysed in the next section.&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The C++ source code relevant to Tcp is available in the ~ns-2.35/tcp/tcp.cc. Also it involves various parameters during the simulation like congestion window, duplicate acknowledgement, and sequence no, etc.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Also this network used a FTP (File Transfer Protocol) for the traffic.&lt;/span&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 478.8pt;" valign="top" width="958"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Listing 4.2 – Tcl Script to show the TCP with FTP   Traffic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Set the simulator &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ns [new Simulator] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Opening the network animation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set namf [open wired2.nam w] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns namtrace-all $namf&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#open the file for tracing &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tracef [open wired2.tr w] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns trace-all $tracef&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#creation of wired nodes &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n0 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n1 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n2 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n3 [$ns node]&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#establish the links between the nodes with bandwidth and delay &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n0 $n1 2MB 1ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n1 $n2 2.5MB 1ms RED &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n2 $n3 2MB 1.5ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n3 $n1 12MB 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#creating the Tcp source and sink agents &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tcp [new Agent/TCP] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set sink [new Agent/TCPSink] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#attach the agents to the corresponding nodes &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n0 $tcp &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n2 $sink &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#create the FTP Traffic &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftp [new Application/FTP] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp attach-agent $tcp &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns connect $tcp $sink &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#start the traffic &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 1.0 "$ftp start" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#end the simulation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 3.0 "finish" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc finish {} { &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; global ns namf tracef &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ns flush-trace &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; close $namf &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; close $tracef &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec nam wired2.nam &amp;amp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns run&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-E9nYOvILUtk/YXfGPqR8MFI/AAAAAAACd5c/0JtZqLbtSTEKc0NaGSmmEeb8baTgoVLqwCNcBGAsYHQ/s696/42.jpg" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="A Wired network with Four nodes with FTP Traffic" border="0" data-original-height="462" data-original-width="696" height="424" src="https://1.bp.blogspot.com/-E9nYOvILUtk/YXfGPqR8MFI/AAAAAAACd5c/0JtZqLbtSTEKc0NaGSmmEeb8baTgoVLqwCNcBGAsYHQ/w640-h424/42.jpg" title="A Wired network with Four nodes with FTP Traffic" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;b style="font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 24px;"&gt;A Wired network with Four nodes with FTP Traffic&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The Listing 4.2 shows a simple wired network with four nodes that just involves in a FTP Traffic. &amp;nbsp;The Fig 4.2 shows this.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--more--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Wired network with various traffic&lt;/span&gt;&lt;/b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;NS supports various traffic that may be employed in Tcl scripts to test. Some examples are &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;CBR Traffic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;FTP Traffic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Exponential Traffic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Telnet Traffic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;SMTP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;These traffic can be simulated in TCP or UDP Agents.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The following Listing depicts these traffics. For example, SMTP (Simple Mail Transfer protocol) traffic is more like exponential traffic and this can be simulated using Application/Traffic/Exponential.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 478.8pt;" valign="top" width="958"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Listing 4.3 – Tcl Script to show various traffics   in the network&lt;/span&gt;&lt;/b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;There are totally 10 wired nodes that shares duplex links between them.   Four of the links are enabled with ftp, cbr,smtp and telnet traffic. The   following listing shows the simulation with the snapshot of the animation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Set the global variable&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ns [new Simulator]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#create the file for animation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set namf [open wired3.nam w]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns namtrace-all $namf&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#create the file for tracing&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tracef [open wired3.tr w]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns trace-all $tracef&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#creation of nodes using for loop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;for {set i 0} {$i &amp;lt; 10} {incr i} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set node($i) [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#establishing the duplex links between the nodes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(0) $node(1) 2mb 1ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(2) $node(3) 1mb 10ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(1) $node(6) 3mb 10ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(4) $node(3) 2mb 50ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(8) $node(1) 3mb 25ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(6) $node(4) 1mb 30ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(7) $node(5) 2mb 15ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(8) $node(4) 20mb 4ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(2) $node(5) 2mb 100ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(0) $node(9) 12mb 10ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(0) $node(3) 20mb 14ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $node(9) $node(7) 20mb 4ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#define the procedure for smtp traffic with two nodes as parameters&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc traffic_smtp {n0 n1} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;global ns&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set smtpsource [new Agent/UDP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set smtpsink [new Agent/UDP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n0 $smtpsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n1 $smtpsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns connect $smtpsource $smtpsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set smtp_traffic [new Application/Traffic/Exponential]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$smtp_traffic attach-agent $smtpsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$smtp_traffic set burst_time_ 50ms&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$smtp_traffic set idle_time_ 50ms&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$smtp_traffic set rate_ 100k&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$smtp_traffic set packetSize_ 100&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.1 "$smtp_traffic start"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 1.0 "$smtp_traffic stop"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#call the procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;traffic_smtp $node(0) $node(1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#define the procedure for CBR traffic with two nodes as parameters&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc traffic_cbr {n2 n3} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;global ns&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set cbrsource [new Agent/UDP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set cbrsink [new Agent/Null]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n2 $cbrsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n3 $cbrsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns connect $cbrsource $cbrsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set cbr_traffic [new Application/Traffic/CBR]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$cbr_traffic attach-agent $cbrsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$cbr_traffic set interval_ 50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$cbr_traffic set packetSize_ 50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 1.0 "$cbr_traffic start"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 2.0 "$cbr_traffic stop"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#call the CBR Traffic procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;traffic_cbr $node(2) $node(3)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#define the procedure for FTP traffic with two nodes as parameters&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc traffic_ftp {n1 n6} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;global ns&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftpsource [new Agent/TCP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftpsink [new Agent/TCPSink]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n1 $ftpsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n6 $ftpsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns connect $ftpsource $ftpsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftp_traffic [new Application/FTP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp_traffic attach-agent $ftpsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp_traffic set interval_ 50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp_traffic set packetSize_ 50&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 2.0 "$ftp_traffic start"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 3.0 "$ftp_traffic stop"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#call the ftp traffic procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;traffic_ftp $node(1) $node(6)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#define the procedure for Telnet traffic with two nodes as parameters&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc traffic_telnet {n8 n1} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;global ns&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set telnetsource [new Agent/TCP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set telnetsink [new Agent/TCPSink]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n8 $telnetsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns attach-agent $n1 $telnetsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns connect $telnetsource $telnetsink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set telnet_traffic [new Application/Telnet]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$telnet_traffic attach-agent $telnetsource&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$telnet_traffic set interval_ 0.005&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 3.0 "$telnet_traffic start"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 4.0 "$telnet_traffic stop"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#call the telnet traffic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;traffic_telnet $node(8) $node(1)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Trace annotation during the animation. Theese string will be displayed   in the NAM window&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.1 "$ns trace-annotate \"Time: 0.1 SMTP Traffic from   Node 0 to Node 1 ..\""&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 1.0 "$ns trace-annotate \"Time: 1.0 CBR Traffic from   Node 2 to Node 3 ..\""&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 2.0 "$ns trace-annotate \"Time: 2.0 FTP Traffic from   Node 1 to Node 6..\""&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 3.0 "$ns trace-annotate \"Time: 3.0 Telnet Traffic from   Node 8 to Node 1..\""&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#call the procedure finish&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 5.0 "finish"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#creation of finish procedure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc finish {} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; global ns namf tracef&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $ns flush-trace&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; close $namf&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; close $tracef&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--more--&gt;&lt;p&gt;&lt;/p&gt; &lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-TDDoJ8bD1Hw/YXfGZbUyNFI/AAAAAAACd5g/ryds6nE-y1kjjpgMwfX3z_Jb6U3kPW1yQCNcBGAsYHQ/s1352/52.jpg" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Wired network with CBR, SMTP, Telnet and FTP Traffic" border="0" data-original-height="706" data-original-width="1352" height="334" src="https://1.bp.blogspot.com/-TDDoJ8bD1Hw/YXfGZbUyNFI/AAAAAAACd5g/ryds6nE-y1kjjpgMwfX3z_Jb6U3kPW1yQCNcBGAsYHQ/w640-h334/52.jpg" title="Wired network with CBR, SMTP, Telnet and FTP Traffic" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 24px;"&gt;Wired network with CBR, SMTP, Telnet and FTP Traffic&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The Listing 4.3 shows some new things in ns, they are&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Different applications like &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 54.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 54pt; mso-layout-grid-align: none; mso-list: l0 level2 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;◦&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;FTP Traffic - Application/FTP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 54.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 54pt; mso-layout-grid-align: none; mso-list: l0 level2 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;◦&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;CBR Traffic - Application/Traffic/CBR&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 54.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 54pt; mso-layout-grid-align: none; mso-list: l0 level2 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;◦&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;SMTP Traffic - Application/Traffic/Exponential&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 54.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 54pt; mso-layout-grid-align: none; mso-list: l0 level2 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;◦&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Telnet Traffic - Application/Telnet&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;This script uses the trace-annotate command that uses to display string during the animation as shown in Fig 4.3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;This script also uses procedure with parameters. Four procedures were used with two parameters as the node names.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; margin: 0cm 0cm 0cm 36pt; mso-layout-grid-align: none; mso-list: l0 level1 lfo2; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: OpenSymbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: OpenSymbol; mso-bidi-language: HI; mso-fareast-font-family: OpenSymbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;•&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Also node creation is done using For loop and the nodes are named as array values. Ex. node0, node1, etc.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Printing the properties of Tcp Reno Agent&lt;/span&gt;&lt;/b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The following listing prints the congestion window of the TcpReno agent and plots it using xgraph. Xgraph is third party software that comes with the ns allinone package. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 6pt; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;Congestion window size is a major factor in predicting the performance of a TCP Network. NS2 handles the Congestion window using a variable &lt;b&gt;&lt;i&gt;cwnd_&lt;/i&gt;&lt;/b&gt; and it can be printed to a graph and as well printed as values at various intervals of time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 7.5pt; mso-layout-grid-align: none; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;The following Tcl script will let you understand the working of the network (TCP Reno Protocol) and also helps you in plotting the characteristics of Congestion window value.&lt;br /&gt;&lt;!--[if !supportLineBreakNewLine]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 478.8pt;" valign="top" width="958"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;Listing 4.4 – Tcl Script to print the Congestion Window   of&amp;nbsp; TcpReno Agent.&lt;/span&gt;&lt;/b&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;#create simulator&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set ns [new   Simulator]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;#to create nodes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set n0 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set n1 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set n2 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set n3 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set n4 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set n5 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# to create the link   between the nodes with bandwidth, delay and queue&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns duplex-link $n0   $n2&amp;nbsp;&amp;nbsp; 2Mb&amp;nbsp; 10ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns duplex-link $n1   $n2&amp;nbsp;&amp;nbsp; 2Mb&amp;nbsp; 10ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns duplex-link $n2   $n3 0.3Mb 200ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns duplex-link $n3   $n4 0.5Mb&amp;nbsp; 40ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns duplex-link $n3   $n5 0.5Mb&amp;nbsp; 30ms DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# Sending node is 0   with agent as Reno Agent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set tcp1 [new   Agent/TCP/Reno]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns attach-agent $n0   $tcp1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# receiving (sink)   node is n4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set sink1 [new   Agent/TCPSink]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns attach-agent $n4   $sink1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# establish the   traffic between the source and sink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns connect $tcp1   $sink1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# Setup a FTP traffic   generator on "tcp1″&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set ftp1 [new   Application/FTP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ftp1 attach-agent   $tcp1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ftp1 set type_   FTP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# start/stop the   traffic&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns at 0.1&amp;nbsp; "$ftp1 start"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns at 40.0   "$ftp1 stop"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# Set simulation end   time&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns at 50.0   "finish"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# procedure to plot   the congestion window&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;proc plotWindow   {tcpSource outfile} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&amp;nbsp; global ns&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&amp;nbsp; set now [$ns now]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&amp;nbsp; set cwnd [$tcpSource set cwnd_]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# the data is recorded   in a file called congestion.xg (this can be plotted # using xgraph or   gnuplot. this example uses xgraph to plot the cwnd_&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&amp;nbsp; puts&amp;nbsp;   $outfile&amp;nbsp; "$now $cwnd"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&amp;nbsp; $ns at [expr $now+0.1] "plotWindow   $tcpSource&amp;nbsp; $outfile"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;set outfile [open&amp;nbsp; "congestion.xg"&amp;nbsp; w]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns&amp;nbsp; at&amp;nbsp;   0.0&amp;nbsp; "plotWindow $tcp1&amp;nbsp; $outfile"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;proc finish {} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec xgraph congestion.xg -geometry   300×300 &amp;amp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;# Run simulation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;$ns run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: widow-orphan no-line-numbers; text-autospace: none;"&gt;&lt;span color="windowtext" lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-theme-font: minor-fareast;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--more--&gt;&lt;p&gt;&lt;/p&gt; &lt;p align="center" class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-align: center; text-autospace: none;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-39HnfjD39Jk/YXfGjqHCs2I/AAAAAAACd5o/0RRjVHg9nfo6-2B2R0pitstmx5nUkcXogCNcBGAsYHQ/s624/44.jpg" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Congestion window of a Tcp Reno Agent" border="0" data-original-height="624" data-original-width="602" height="640" src="https://1.bp.blogspot.com/-39HnfjD39Jk/YXfGjqHCs2I/AAAAAAACd5o/0RRjVHg9nfo6-2B2R0pitstmx5nUkcXogCNcBGAsYHQ/w618-h640/44.jpg" title="Congestion window of a Tcp Reno Agent" width="618" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 24px;"&gt;Congestion window of a Tcp Reno Agent&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The listing 4.4 has the facility of printing the congestion window in a graph and Fig 4.4 shows this. As in Fig 4.4, the congestion window is initially at a value of 1 and increases periodically over a period of time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: 1pt solid windowtext; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt; width: 478.8pt;" valign="top" width="958"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;Listing 4.5 – Wired network &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;# enable the multicast routing protocol in ns2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ns [ new Simulator -multicast on] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;# Creating network animation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set namf [open wired3.nam w] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns namtrace-all $namf&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Open the trace file &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tracef [open wired3.tr w] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns trace-all $tracef&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#define the multicast routing protocol&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set proto rlm &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#------------COLOR DESCRIPTION---------------# &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 1 dodgerblue &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 2 red &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 3 cyan &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 4 green &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 5 yellow &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 6 black &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 7 magenta &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 8 gold &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns color 9 red &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;# --------- CREATING SENDER - RECEIVER - ROUTER   NODES-----------# &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n1 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n2 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n3 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set n4 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set m1 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set m2 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set m3 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set m4 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set Router1 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set Router2 [$ns node] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set Router3 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n1 $Router1 1Mb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n2 $Router1 500Kb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n3 $Router1 750Kb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $n4 $Router2 1Mb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $m1 $Router1 1Mb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $m2 $Router1 1Mb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $m3 $Router1 1Mb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $m4 $Router3 1Mb 10ms DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $Router2 $Router1 1Mb 10ms   DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $Router2 $Router3 1Mb 10ms   DropTail &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link $Router1 $Router3 1Mb 10ms   DropTail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;# queue size, beyond this size, the packets will   be dropped&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns queue-limit $Router1 $Router2 20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns queue-limit $Router1 $Router3 20 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns queue-limit $Router2 $Router1 20 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns queue-limit $Router3 $Router1 25&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;# label the nodes as per their nature of work&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$n1 label Client1" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$n2 label Client2" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$n3 label Client3" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$n4 label Client4" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$m1 label Client5"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$m2 label Client6" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$m3 label Client7" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$m4 label Client8" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$Router1 label Router1" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$Router2 label Router2" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.0 "$Router3 label Router3" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;# defining the shapes for the nodes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$Router1 shape square &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$Router2 shape square &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$Router3 shape square &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#setting the colors for the links&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link-op $Router1 $Router2 color cyan &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link-op $Router1 $Router3 color cyan &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns duplex-link-op $Router2 $Router3 color cyan&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;# establishing the connection and the agents&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#includes maximum congestion window, the   packetSize and flow id&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tcp1 [$ns create-connection TCP $n1 TCPSink   $m4 1]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp1 set class_ 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp1 set maxcwnd_ 16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp1 set packetsize_ 4000 &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp1 set fid_ 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftp1 [$tcp1 attach-app FTP]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp1 set interval_ .005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.2 "$ftp1 start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 4.0 "$ftp1 stop"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tcp2 [$ns create-connection TCP $n2 TCPSink   $m3 1]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp2 set class_ 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp2 set maxcwnd_ 16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp2 set packetsize_ 4000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp2 set fid_ 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftp2 [$tcp2 attach-app FTP]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp2 set interval_ .005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 0.7 "$ftp2 start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 4.0 "$ftp2 stop"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tcp3 [$ns create-connection TCP $n3 TCPSink   $m2 1]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp3 set class_ 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp3 set maxcwnd_ 16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp3 set packetsize_ 4000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp3 set fid_ 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftp3 [$tcp3 attach-app FTP]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp3 set interval_ .005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 1.2 "$ftp3 start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 4.0 "$ftp3 stop"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set tcp4 [$ns create-connection TCP $n4 TCPSink   $m1 1]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp4 set class_ 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp4 set maxcwnd_ 16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp4 set packetsize_ 4000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$tcp4 set fid_ 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set ftp4 [$tcp4 attach-app FTP]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ftp1 set interval_ .005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 2.5 "$ftp4 start"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 4.0 "$ftp4 stop"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#define the finish procedure.&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;proc finish {} {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;global ns namf tracef nf1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set NSHOME   "/home/pradeepkumar/ns-allinone-2.35"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;#change path&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set SETFID   "$NSHOME/ns-2.35/bin/set_flow_id"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;set RAW2XG_SCTP   "$NSHOME/ns-2.35/bin/raw2xg-sctp"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns flush-trace&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;close $namf&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;exec perl $SETFID -s rands2.tr | \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;perl $RAW2XG_SCTP -A -q &amp;gt; Rands2.rands&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;exec xgraph -bb -tk -nl -m -x time -y packets   Rands2.rands &amp;amp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns flush-trace&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;close $tracef&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;exit 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;#Calling finish procedure &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns at 20.0 "finish" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;b&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Courier New&amp;quot;; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;$ns run&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The Listing 4.5 uses the following:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l1 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: Symbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: Symbol; mso-bidi-language: HI; mso-fareast-font-family: Symbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;There are totally 11 nodes, 8 client nodes and 3 router nodes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l1 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: Symbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: Symbol; mso-bidi-language: HI; mso-fareast-font-family: Symbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The links are colored&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l1 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: Symbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: Symbol; mso-bidi-language: HI; mso-fareast-font-family: Symbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;All the nodes were labelled&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l1 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: Symbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: Symbol; mso-bidi-language: HI; mso-fareast-font-family: Symbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;They use TCP Agents with FTP Flow with altered parameters like packetSize_, maximum congestion window specification, rate of transfer and flow id.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; mso-list: l1 level1 lfo1; mso-pagination: none; text-autospace: none; text-indent: -18pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span color="windowtext" style="font-family: Symbol; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-font-family: Symbol; mso-bidi-language: HI; mso-fareast-font-family: Symbol; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The script uses the set_flow_id and raw2xg_sctp binaries provided by ns2 and it uses perl script to plot the characteristics of data sent, data drop etc.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The Network Animation window and the related the graphs are shown below.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;The following figure shows the data sent, forwarded, received and dropped at all the links. The graph shows green color as dense dots as data generation is huge compared to the data forwarded, received or lost.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;!--more--&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: 0cm; mso-layout-grid-align: none; mso-pagination: none; text-autospace: none;"&gt;&lt;/p&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-sTminykNd0M/YXfGswLC4uI/AAAAAAACd5w/fVVV_TwVuxo7Gt4ptU1u2PCiybC5j-dgACNcBGAsYHQ/s652/45.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Network Animation" border="0" data-original-height="478" data-original-width="652" height="470" src="https://1.bp.blogspot.com/-sTminykNd0M/YXfGswLC4uI/AAAAAAACd5w/fVVV_TwVuxo7Gt4ptU1u2PCiybC5j-dgACNcBGAsYHQ/w640-h470/45.png" title="Network Animation" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Network Animation&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-ZcUGPgKV8wA/YXfGs8dECKI/AAAAAAACd50/x9viwWeI9MUYizhQ7T8-XxLU2VXJkGt-wCNcBGAsYHQ/s1363/46.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Packet data" border="0" data-original-height="717" data-original-width="1363" height="336" src="https://1.bp.blogspot.com/-ZcUGPgKV8wA/YXfGs8dECKI/AAAAAAACd50/x9viwWeI9MUYizhQ7T8-XxLU2VXJkGt-wCNcBGAsYHQ/w640-h336/46.png" title="Packet data" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Packet data&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span color="windowtext" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12pt; line-height: 150%; mso-ansi-language: EN-IN; mso-bidi-language: HI; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: ZH-CN; mso-font-kerning: .5pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt;&lt;/p&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/1057961009016234928/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/10/wired-networks-in-ns2-ns2-tutorial-4.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/1057961009016234928" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/1057961009016234928" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/10/wired-networks-in-ns2-ns2-tutorial-4.html" title="Wired Networks in NS2 - NS2 Tutorial 5" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-Hazl82Cn0k8/YXfF_OMvjRI/AAAAAAACd5U/AIj6ccLVBn4loXSTVBrhwRS1AB4ZJvNIgCNcBGAsYHQ/s72-w640-h240-c/41.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-3665954046306219198</id><published>2021-10-26T14:35:00.003+05:30</published><updated>2021-10-26T14:35:12.112+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Lecture Series" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Tutorial" /><title type="text">TCL/TK Programming for NS2 - NS2 Tutorial 4</title><content type="html">&lt;w:sdt docparttype="Cover Pages" docpartunique="t" id="277458971" sdtdocpart="t"&gt; &lt;h1 style="line-height: 150%; margin-bottom: 0.0001pt; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: x-large;"&gt;Tcl/Tk  Programming&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;In this  post, you may learn&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l2 level1 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;To know the basics of Tcl/TK Programming&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-list: l2 level1 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; font-size: 12.0pt; line-height: 150%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;To create a Tcl script&lt;/span&gt;&lt;b style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; text-align: right;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;&lt;/w:sdt&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: large;"&gt;Tcl Programming&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Over the span of 25 years a simple modular scripting language was developed and modified or improved by corporates, academia, open source community and web developers. The code developed and the binary source is free with no strings attached. This is one of the oldest scripting language still being used for testing the network equipment like routers, switches, etc. And used in electronic IC designs and used as a front end tool (testing tool) for Network Simulator 2 (NS2).&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Tcl was created by &lt;b&gt;&lt;i&gt;John Ousterhout&lt;/i&gt;&lt;/b&gt; mainly for embedded system applications for its ability for rapid prototyping, scripted applications and also fir its small or bigger footprints.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;3.1 Features of Tcl/Tk&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Rapid Development:&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Tcl almost runs 5 to 10X faster than other scripting languages if it involves GUI, string handling or integration.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Graphical User Interface&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp; Using its Tk toolkit, Tcl provides facilities for creating GUIs that are incredibly simple yet remarkably powerful.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Cross Platform &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Tcl/Tk runs almost same on all operating systems like Windows, Macintosh, and Linux/Unix platform.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Continuous upgrades: &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Since 1990s Tcl and Tk have been under continuous and rapid upgrades which makes Tcl/Tk really a reliable and solid scripting language that can be relied upon.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Deployment &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Tcl can be deployed as a single application on a target machine very easily whereas other dynamic languages makes deployment harder&lt;b&gt;.&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Network-aware applications: &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Tcl has a wide number of event driven codes that are helpful in generating events for networked devices like routers, switches, routing extensions, etc.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Apart from these features, Tcl also has a vibrant Community that helps developers with provision of free extensions, plugins and updates. Also Tcl is easy to learn and all these come free. Tcl/Tk is completely free with even the binary source can also be modified or upgraded. &lt;/span&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: large;"&gt;3.2 Tcl interpreter and Execution&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Tcl scripts are usually having extension of .tcl and can be executed using &lt;i&gt;tclsh or wish. &lt;/i&gt;In Linux/Unix families, following is the way to interpret the tcl scripts.&lt;/span&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;# tclsh filename.tcl &lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;The command wish will be working for GUI and text mode. Sometimes tclsh can be coming along with version number for example &lt;i&gt;tclsh86.exe&lt;/i&gt;and can be executed as follows&lt;/span&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: courier;"&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;C:/&amp;gt; tclsh86 filename.tcl &lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;C:/&amp;gt; source filename.tcl&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;Here is the screenshot of tclsh.&lt;/span&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-f9WDgcBvFPA/YXfEqSSWxUI/AAAAAAACd5M/nUL6aen3Dw455S3XOZ890XBZ-SG7L377gCNcBGAsYHQ/s1366/3.1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="tclsh interpreter" border="0" data-original-height="768" data-original-width="1366" height="360" src="https://1.bp.blogspot.com/-f9WDgcBvFPA/YXfEqSSWxUI/AAAAAAACd5M/nUL6aen3Dw455S3XOZ890XBZ-SG7L377gCNcBGAsYHQ/w640-h360/3.1.png" title="tclsh interpreter" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;p align="center" class="MsoNormal" style="line-height: 24px; margin-bottom: 0.0001pt;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 24px;"&gt;tclsh interpreter&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p align="center" class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; text-align: center;"&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; text-align: left;"&gt;Since this book is related to Network Simulator 2 (NS2), the commands and the syntax in this chapter will be related to NS2 and its simulation libraries. However for the understanding of new developers, bits and pieces of the tcl scripts are presented.&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; margin-bottom: 0.0001pt; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: large;"&gt;3.3 Getting Started&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Let us go through some basic syntax of Tcl Programming.&amp;nbsp; The following examples will give you a general introduction for Tcl Programming.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;The syntax of Tcl is not similar to C or C++, rather it is simple and straightforward. This chapter will give you a glimpse of the Tcl syntax used in NS2&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: courier;"&gt;Example 1:&amp;nbsp; “Hello World”&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;# This is an example to demonstrate the Hello World &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;puts “Hello World!”;&amp;nbsp; #printing Hello World! to the screen&lt;/span&gt;&lt;span style="font-family: Times New Roman, serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;To run this file, &lt;b&gt;tclsh ex1.tcl, &lt;/b&gt;if the operating system is windows then &lt;b&gt;tclsh.exe ex1.tcl. &lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l1 level1 lfo1; text-indent: -17.95pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;●&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;puts &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;is the command to print anything to screen&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l1 level1 lfo1; text-indent: -17.95pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;●&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;if comments are to be placed at the end of the statement, then a trailing semi colon is a must, as shown in the example above.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-list: l1 level1 lfo1; text-indent: -17.95pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;"&gt;●&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;A comment always starts with a preceding # symbol.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;h3 style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;a name="syntax"&gt;&lt;span lang="EN-US" style="font-size: 12.0pt; line-height: 150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;3.3.1 Basic syntax&lt;/h3&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US"&gt;Tcl scripts are full of&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;commands&lt;/i&gt;&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;separated by newlines. A typical example of Command is given below. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;pre style="background: white; line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/code&gt;expr 3 + 10&lt;/pre&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;This command computes the sum of 3 and 10 and returns the result, 13. You can try out this example using tclsh.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;There are different words that are separated by space. There are four words in this example:&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;expr&lt;/span&gt;&lt;/code&gt;, &lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;3&lt;/span&gt;&lt;/code&gt;,&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;+&lt;/span&gt;&lt;/code&gt;, and&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;10&lt;/span&gt;&lt;/code&gt;. The&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;expr&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;command is an arithmetic expression, computes the result of that expression, and returns the result as a string. Sometimes the same above command can also be represented as&lt;/span&gt;&lt;/p&gt;&lt;pre style="background: white; line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;expr 3+10&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;All commands returns results, even if a command has no results to display, it displays a empty string.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: large;"&gt;3.3.2 Assigning values to Variables&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;In Tcl, everything is represented as string, but internally it also represents integers, double, list or some other types. This enables faster interpretation. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;For this, the assignment command is used in Tcl which is &lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;set&lt;/span&gt;&lt;/code&gt;. When the set command is dealing with two arguments as in:&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;set name TclTk&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;the (name) in the first command references which stores TclTk in the memory. Set command always returns the contents of the variable named in the first argument. So in this command, TclTk without quotes is being stored in the memory which is referenced by the (name) in the first command.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: Calibri;"&gt;Set&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;can also be invoked with only one argument. When called with just one argument, it will return the contents of that argument.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US"&gt;Here's a summary of the&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-size: 10pt; line-height: 150%;"&gt;set&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;command.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: Calibri;"&gt;set&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%; mso-fareast-font-family: Calibri;"&gt;variableName valueOfVariable&lt;/span&gt;&lt;/code&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;If&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;valueOfVariable&lt;/span&gt;&lt;/code&gt;is specified, then the contents of the variable&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;variableName &lt;/span&gt;&lt;/code&gt;are set equal to&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;valueOfVariable. (Like the example we have seen above)&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;If&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;variableName &lt;/span&gt;&lt;/code&gt;consists only of alphanumeric characters, and no parentheses, it is a scalar variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;If&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;variableName &lt;/span&gt;&lt;/code&gt;has the form&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;variableName (index)&lt;/span&gt;&lt;/code&gt;, it is a member of an associative array.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: courier; font-size: 12pt;"&gt;Example 2: “Variable and Values”&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set Name “I am Tcl”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set A 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;puts $A&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;puts $Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set label "The value in A is: "&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;puts "$label $A"&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;h3 style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-size: large;"&gt;&lt;span lang="EN-US" style="line-height: 150%;"&gt;3.3.3 Command substitution&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Command substitution is a important concept in Tcl where result of one command argument can be used for another command. Here is an example&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;pre style="background: white; line-height: 150%;"&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre style="background: white; line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;set a 25&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre style="background: white; line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;set b [expr $a*4]&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;When a&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;[&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;appears in a command, Tcl treats everything between it and the matching&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;]&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;as a nested Tcl command. Tcl evaluates the entire expr $a*4 as a single command and substitutes as a separate command and another command set b will be holding the value 100. For future reference, b can used as $b.&lt;/span&gt;&lt;/p&gt; &lt;h3 style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 150%;"&gt;&lt;span style="font-size: large;"&gt;3.3.4 Quotes and braces&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt; &lt;h3 style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; font-size: 12pt; font-weight: normal; line-height: 150%;"&gt;For example, consider the following script:&lt;/span&gt;&lt;span lang="EN-US" style="font-size: 12.0pt; font-weight: normal; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt; &lt;pre style="line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="background: white; font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set x 10&lt;b&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre style="line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="background: white; font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set y 20&lt;b&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre style="line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="background: white; font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set z "$x + $y is [expr $x + $y]"&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;The value of z after the evaluation is &lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;10+ 20 is 30&lt;/span&gt;&lt;/code&gt;. Everything command between the double quotes is passed to the&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;set&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;command as a single word. Note that a command and variable substitutions are performed on the text between the quotes; and the quotes themselves are not passed to the command. If the quotes in the above example were absent, the&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;code&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; line-height: 150%; mso-ansi-font-size: 12.0pt; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: Calibri;"&gt;set&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;command would have received 6 arguments, which would be an error.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="background: white;"&gt;Curly braces provide another way of grouping information into words. They are different from quotes in that no substitutions are performed on the text between the curly braces:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;pre style="line-height: 150%;"&gt;&lt;code&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;set z {$x + $y is [expr $x + $y]}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;This command sets variable&lt;span class="apple-converted-space"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;z&lt;/span&gt;&lt;/code&gt;&lt;span class="apple-converted-space"&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;to the value "&lt;/span&gt;&lt;code&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;$x + $y is [expr $x + $y]&lt;/span&gt;&lt;/code&gt;&lt;span lang="EN-US" style="background: white; font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt; line-height: 150%;"&gt;".&lt;/span&gt;&lt;/pre&gt; &lt;h3 style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="line-height: 150%;"&gt;&lt;span style="font-size: large;"&gt;3.3.5 Looping and Control structures&lt;/span&gt;&lt;/span&gt;&lt;/h3&gt; &lt;h3 style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-size: 12.0pt; font-weight: normal; line-height: 150%;"&gt;Tcl provides almost all the control structures that were available with other programming languages. Tcl control structures are commands that take Tcl scripts as arguments. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;if statements&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;if { test1 } {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;body…..1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;} elseif { test2 } {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;Body…..2 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;} else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;Body….n&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;span style="background-color: transparent; font-family: courier; font-size: 12pt;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background: white; line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 5.0pt;"&gt;&lt;span style="background-color: transparent; font-family: courier; font-size: 12pt;"&gt;Example 3: Simple Example using if&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;puts "What’s your mark in Scripting Language"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;gets stdin marks&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;if {$marks &amp;gt; 90} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts "Great, you got S Grade"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;} elseif {$marks &amp;gt; 50 &amp;amp;&amp;amp; $marks &amp;lt; 90} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts "Hey You passed the Exam"&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;} else { &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts "You need to improve your marks next time" &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;}&lt;/span&gt;&lt;span style="font-family: Times New Roman, serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;This code gives a simple example of if statement with conditional statements. This example also helps understanding that how to get the input from the user using &lt;b&gt;&lt;i&gt;gets stdin&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;For Loop&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;The for loop in Tcl takes the same format as of other languages like &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;for { initialization }{ condition } { increment or decrement }{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;body&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: courier;"&gt;Example 4: Sum to N Terms&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set x 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set sum 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;for { set i 0 } { $i &amp;lt;= $x } { incr i } {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set sum [expr &amp;nbsp;$sum+ $i]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;puts $sum&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;The above example &lt;i&gt;displays&lt;/i&gt;the sum of first 10 elements which is 55.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;While Loop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;The while loop syntax is as follows:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;while { condition } {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Body of the loop&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;}&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;For example, here is a small code that helps in understanding while loops in a greater way&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: courier;"&gt;Example 5 – Squaring a number using while loop&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;set x 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;while { $x &amp;lt; 10 } {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;puts [expr $x * $x ]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;incr x&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;}&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Like for and while, there are foreach and for…in loops are also used in Tcl programming. Since this book is being written for Network simulator 2 and its simulation objects, the readers are advised to learn more about Tcl programming in these books [1].&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: medium;"&gt;3.3.6 Procedures&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;A procedure is a block that contains series of commands. Functions in other programming languages are preferred as Procedures in Tcl. The Modularity of the program is maintained when procedures are used. Here are some of the pros of the procedures:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul type="disc"&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Reducing      the code size by avoiding duplication&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Groups      in to simpler tasks rather than complex task&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo2; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Reuse      of code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;There are user defined procedures and built in procedures. The keyword &lt;b&gt;&lt;i&gt;proc&lt;/i&gt;&lt;/b&gt; is used to define the user defined keyword.&lt;/span&gt;&lt;/p&gt;&lt;p style="line-height: 150%;"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;span style="font-family: courier;"&gt;Example 6 – Tcl Procedure Example&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;proc display {} { ; &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;#This is the line to create a procedure using the command proc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&amp;nbsp; set ns [expr 1 + 2] ; &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;# evaluates the expression 1 + 2 and assign it to ns&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts $ns ; &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;# display the value to the screen&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;display; &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;#calling the procedure&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;the display procedure is called using &lt;b&gt;display &lt;/b&gt;as given in the last line of the code. It is understood that this procedure does not contain any arguments or parameters.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Procedure with arguments&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Procedures can also take arguments. The following examples show the procedure with single argument.&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;proc hello{f} { ; # f is the argument here&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; puts “Hello Mr. $f”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;puts [hello “Pradeep”]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;puts [hello “Amit”]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Output.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Hello Mr. Pradeep&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Hello Mr. Amit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Next example with more than one argument, let us see an example to find out the biggest among three numbers. So there can be three arguments.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;proc biggest { a b c } {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;if {$a &amp;gt; $b &amp;amp;&amp;amp; $a &amp;gt; $c }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;return $a&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;} elseif {$b &amp;gt;&amp;nbsp; $a &amp;amp;&amp;amp; $b &amp;gt; $c} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;return $b&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;} else {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;return $c&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;set a 10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;set b 20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;set c 30&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;set val [biggest $a $b $c]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="line-height: 150%; margin-bottom: .0001pt; margin: 0cm;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;puts “The biggest of $a, $b and $c is $val”&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Procedures are the powerful commands in Tcl and it is very much useful in producing reusable codes that also reduces the code size.&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; margin-bottom: 0.0001pt; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; line-height: 150%;"&gt;&lt;span style="font-size: medium;"&gt;3.3.7 Working with Files&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Like other languages, Tcl also has file handling facility and it can open, read and write to files. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Syntax:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;&lt;b&gt;set nf [open file.txt w]&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;&lt;b&gt;puts $nf “This is a simple example to write to a file&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;The file attribute can be&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;r – Open the file for reading and file should exist.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;r+ - Open the file for reading and writing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;w – Open the file for writing, and if the file exists already, it will be overwritten, else a new file will be created.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;w+ - open the file for reading and writing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;a - open the file for writing. If the file already exists, the cursor will point to the end of the file, if the file not exists, a new file will be created.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;a+ - Open the file for reading and writing. If the file already exists, the cursor will point to the end of the file, if the file not exists, a new file will be created.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;It is always a good practice to close a file once the job is done. The following code shows how to close the file. In Tcl programming, usually all the open handles like files, pipes, any global variables, etc can be closed at the end of the program.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;set tracef [open file.dat a]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;puts $tracef “This is an example to show the file close”&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US" style="font-size: 12pt; line-height: 150%;"&gt;&lt;span style="color: #2b00fe; font-family: courier;"&gt;close $tracef&lt;/span&gt;&lt;span style="font-family: Times New Roman, serif;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;, serif; font-size: 12pt;"&gt;The file is opened in the append mode and if the file.dat is already existing, then the string “This is an example to show the file close” will be written to the end of the file.&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; margin-bottom: 0.0001pt; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;Conclusion&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;This chapter informs the bits and pieces of Tcl programming to a limited level. Since this book is intended for Tcl files that are written for network simulation and hence limited information is provided for Tcl. The readers are advised to read the full-fledged tutorial for Tcl if they wanted to do extensive programming on Tcl.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-bottom: .0001pt; margin-bottom: 0cm;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Times New Roman&amp;quot;,serif; font-size: 12.0pt; line-height: 150%;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/3665954046306219198/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/10/tcltk-programming-for-ns2-ns2-tutorial-4.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3665954046306219198" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3665954046306219198" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/10/tcltk-programming-for-ns2-ns2-tutorial-4.html" title="TCL/TK Programming for NS2 - NS2 Tutorial 4" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-f9WDgcBvFPA/YXfEqSSWxUI/AAAAAAACd5M/nUL6aen3Dw455S3XOZ890XBZ-SG7L377gCNcBGAsYHQ/s72-w640-h360-c/3.1.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-8500043826660363078</id><published>2021-10-26T14:27:00.001+05:30</published><updated>2021-10-26T14:27:05.687+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Lecture Series" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Tutorial" /><title type="text">OTCL and C++ Linkages with Example - NS2 Tutorial 3</title><content type="html">&lt;h1 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 18.0pt; line-height: 150%; mso-bidi-font-size: 12.0pt;"&gt;OTcl and C++ Linkages&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-autospace: ideograph-numeric;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;In this post&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;ul style="margin-top: 0cm;" type="disc"&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: 36.0pt; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;The      linkages between OTcl and C++ is covered.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: 36.0pt; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;The      functions of various TclCL classes were explored.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;Network simulator 2 (ns) deals with two different languages OTcl and C++. The OTcl is mainly for beginners that act as a frontend to test, analyze the components of networks. But C++ on the other hand runs in the background and usually deals with implementation of Queues, protocols, packets, agents, applications, etc. However when C++ modules are introduced, it is necessary to see how it is linking with the OTcl objects. This chapter deals this. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;3.1 NS-2 Architecture&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Network Simulator 2 (NS-2) deals with two different languages C++ and OTcl.&amp;nbsp; Mainly OTcl is interpreted language and C++ is Compiled language. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;The advantage of both the languages in NS2 is not compromised as both the languages have their own pros and cons.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;b&gt;OTcl &amp;nbsp;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Preferable for beginners (to start simulation even without knowing much about ns2)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Runs in the front end. (Since interpreter is slow in execution, OTcl preferred in the front end)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Interpretation is fast and execution is slow (Since it accepts changes fast, the source code can be modified easily to verify the network performance)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;b&gt;C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l5 level1 lfo2; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Mainly deals with implementation of network terminologies like queues, packets, agents, applications, routing algorithms, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l5 level1 lfo2; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Preferable for medium and advanced users&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-list: l5 level1 lfo2; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Its execution is fast and compilation is slow. (Compilers usually are slow in compilation and hence they are running in the background to make the execution faster)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;With these above, we can conclude that OTcl and C++ both need to be in their places for faster execution.&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;3.2 Code Overview&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Consider the example:&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="font-family: courier;"&gt;&amp;nbsp; &amp;nbsp;&lt;b&gt;set tcp1 [new Agent/TCP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;set sink1 [new Agent/TCPSink]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-indent: 36.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;set udp1 [new Agent/UDP]&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;The above code is a Tcl code that calls TcpAgent, TCPSink Agent and FTP Application. All three are C++ modules that are executing in the backend.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;These three Tcl Objects links with the C++ Objects as given in the Table&lt;/span&gt;&lt;/p&gt; &lt;div align="center"&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 93.5pt;" valign="top" width="187"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;OTcl Object&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 92.8pt;" valign="top" width="186"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;C++ Class&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 132.6pt;" valign="top" width="265"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Location of C++ file&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 93.5pt;" valign="top" width="187"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Agent/TCP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 92.8pt;" valign="top" width="186"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;TcpClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 132.6pt;" valign="top" width="265"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;~ns-2.35/tcp/tcp.cc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 93.5pt;" valign="top" width="187"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Agent/TCPSink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 92.8pt;" valign="top" width="186"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;TcpSinkClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 132.6pt;" valign="top" width="265"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;~ns-2.35/tcp/tcp-sink.cc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 93.5pt;" valign="top" width="187"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Agent/UDP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 92.8pt;" valign="top" width="186"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;UdpAgentClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 132.6pt;" valign="top" width="265"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;~ns-2.35/apps/udp.cc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;As shown in the table, there should be a link between the OTcl and C++. NS-2 defines a interface called TclCL (~tclcl/) that contains some classes that makes the mapping between OTcl and C++.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;There are some lists of classes and this chapter will be focusing on four main classes with their member functions. These classes are defined in ~tclcl-xx/Tcl.h. The following table lists the purpose of each class with their class names&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 84.15pt;" valign="top" width="168"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 394.65pt;" valign="top" width="789"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Contains method   to access the interpreter&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 84.15pt;" valign="top" width="168"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;TclObject&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 394.65pt;" valign="top" width="789"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;This is the base   class of all Simulated object libraries&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 84.15pt;" valign="top" width="168"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;TclClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 394.65pt;" valign="top" width="789"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Provides the   mapping between the classes of interpreted hierarchy and compiled hierarchy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 84.15pt;" valign="top" width="168"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;TclCommand&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 394.65pt;" valign="top" width="789"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Used to define   the global interpreter command&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 84.15pt;" valign="top" width="168"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;EmbeddedTcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 394.65pt;" valign="top" width="789"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Contains method   to load the C++ commands for easier configuration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 84.15pt;" valign="top" width="168"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;InstVar&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 394.65pt;" valign="top" width="789"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Contains methods   to access C++ member variables as OTcl instance variables.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;The location of these classes are found in the ~tclcl/Tcl.[h, .cc], ~tclcl/Tcl2.cc, ~tclcl/tcl-object.tcl, etc. These classes are used in building ns.&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Class Tcl&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;The class Tcl that contains methods to access the interpreted hierarchy. The methods can be used by the programmer to develop the C++ code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Class Tcl provides the following operations&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-hyphenate: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Obtain a reference to Tcl instance &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l1 level2 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Tcl&amp;amp; tcl = Tcl::instance();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l1 level2 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl is the reference and all the methods can be accessed using tcl.eval(), tcl.evalf(), etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l1 level1 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Invoke Tcl procedures&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l1 level2 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Four methods are there to invoke the command through the instance tcl. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l1 level2 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.eval() - &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l1 level2 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.eval(char* a) – executes ‘a’ through the interpreter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l1 level2 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.evalf(const char* a…..)- this is similar like a printf() statement where the format specifiers are used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l1 level2 lfo3; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.evalc(const char* a)- it preserves the argument string ‘a’ as a constant.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto;"&gt;&lt;span lang="EN-US"&gt;Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto;"&gt;&lt;span lang="EN-US"&gt;tcl.evalf(“%d is the packet id”, packet_id);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto;"&gt;&lt;span lang="EN-US"&gt;tcl.evalc(“put this to the screen”); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l7 level1 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Passing Results to/from the Interpreter&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Two functions are used to pass results to/from the interpreter.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.result(const char* a) – pass the string a to the interpreter back. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.resultf(const char* fmt, ...)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;the following script will help you on this&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;if (strcmp(argv[1], "HELLO") == 0) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;{ &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;tcl.resultf("%d", seq_no); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;return TCL_OK; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;tcl.result("Invalid operation specified"); &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;return TCL_ERROR;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l7 level1 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Error Reporting and Exit&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Errors are often reported to the interpreter using the function error().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;; mso-fareast-font-family: &amp;quot;Courier New&amp;quot;;"&gt;o&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.error(const char* a) performs the following functions: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level3 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;write a to stdout; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level3 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;write tcl_-&amp;gt;result to stdout; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 108.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level3 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;"&gt;§&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;exit with error code 1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l7 level1 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;There are other operations and hash Functions within the Interpreter, they are &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: courier;"&gt;&lt;span lang="EN-US"&gt;o&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.enter(TclObject* o) – to insert an object in the hash table while creating the TclObject &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: courier;"&gt;&lt;span lang="EN-US"&gt;o&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.lookup(char* a) will retrieve the TclObject with the name a.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: courier;"&gt;&lt;span lang="EN-US"&gt;o&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl.remove(TclObject* o) will delete references to the TclObject.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l7 level2 lfo4; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: courier;"&gt;&lt;span lang="EN-US"&gt;o&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;These functions are used internally by the class TclObject and class TclClass.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; mso-hyphenate: auto;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Class TclClass and Class TclObject&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;TclClass is a pure virtual class. Classes derived from this base class provide two functions: &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-hyphenate: auto; mso-list: l3 level1 lfo5; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;It does the mapping between the classes of interpreted hierarchy and compiled hierarchy; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-hyphenate: auto; mso-list: l3 level1 lfo5; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;This class provides methods to create instance for TclObject.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt;"&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;// ~ns-2.35/tcp/tcp.cc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-indent: 18.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;static class TcpClass : public TclClass {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-indent: 18.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TcpClass() : TclClass("Agent/TCP") {}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TclObject* create(int , const char*const*) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (new TcpAgent());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } class_tcp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;As an example, consider the code segment above which shows the syntax of the TcpClass. It is derived from class TclClass, and is associated with the class TcpAgent. This will will create the instance of TcpAgent and thus create new objects in the class TcpAgent. The compiled class hierarchy for TcpAgent is that it derives from Agent, that in turn derives from TclObject.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Here is the observation from this deﬁnition:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-hyphenate: auto; mso-list: l4 level1 lfo6; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;This &lt;b&gt;TclClass&lt;/b&gt; defines only the constructor and it shows the compiled hierarchy. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l4 level1 lfo6; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;ns will execute the &lt;b&gt;TcpClass&lt;/b&gt; constructor for the static variable &lt;b&gt;class_tcp&lt;/b&gt;, when it is ﬁrst started. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l4 level1 lfo6; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;The constructor speciﬁes the interpreted class explicitly as &lt;b&gt;Agent/TCP&lt;/b&gt;. This also speciﬁes the interpreted hierarchy.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l4 level1 lfo6; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;The convention in &lt;b&gt;&lt;i&gt;ns&lt;/i&gt;&lt;/b&gt;is to use the character slash (’/’) is a separator. For any given class A/B/C/D, the class A/B/C/D is a sub-class of A/B/C that is itself a sub-class of A/B, that, in turn, is a sub-class of A. and A is the sub class of TclObject. In our case above, the &lt;b&gt;TclClass&lt;/b&gt;constructor creates two classes, &lt;b&gt;Agent/TCP&lt;/b&gt;sub-class of &lt;b&gt;Agent&lt;/b&gt; sub- class of &lt;b&gt;TclObject&lt;/b&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l4 level1 lfo6; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;The &lt;b&gt;TcpClass::create&lt;/b&gt; method returns &lt;b&gt;TclObject &lt;/b&gt;in the class &lt;b&gt;TcpAgent&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-hyphenate: auto; mso-list: l4 level1 lfo6; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;When the user speciﬁes new &lt;b&gt;Agent/TCP&lt;/b&gt; in the tcl file, the class &lt;b&gt;TcpClass::create&lt;/b&gt; is invoked and thus a shadow object is created.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Consider the Example shown called as the Amplifier Agent that amplifies the given value in to multiples times&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;/* A Simple agent that does the amplification of a given value to 3 fold and more. The name of the agent is represented as TSPAgent as The SPecial Agent that does the amplification */&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;//Header file declaration&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;#include &amp;lt;stdio.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;#include &amp;lt;string.h&amp;gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;#include "agent.h"&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;class TSPAgent : public Agent {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSPAgent();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;protected:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int command(int argc, const char*const* argv);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;private:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int&amp;nbsp;&amp;nbsp;&amp;nbsp; amp1, amp2, amp3;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void&amp;nbsp;&amp;nbsp; APrivateFunc(void);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;};&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;static class TSPAgentClass : public TclClass {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;public:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TSPAgentClass() : TclClass("Agent/AMPLIFY") {}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TclObject* create(int, const char*const*) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoListParagraph" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;return(new TSPAgent());&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;} class_tsp_agent;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;TSPAgent::TSPAgent() : Agent(PT_UDP) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bind("Ampli1", &amp;amp;amp1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bind("Ampli2", &amp;amp;amp2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bind("Ampli3", &amp;amp;amp3);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;int TSPAgent::command(int argc, const char*const* argv) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(argc == 2) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(strcmp(argv[1], "call-the-private-function") == 0) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APrivateFunc();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(TCL_OK);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(Agent::command(argc, argv));&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;void TSPAgent::APrivateFunc(void) {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tcl&amp;amp; tcl = Tcl::instance();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcl.eval("puts \"Message From the Private Function\"");&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcl.evalf("puts \"&amp;nbsp; The Amplified Value is %d and the factor is 2 \"", amp1*amp1);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcl.evalf("puts \"&amp;nbsp; The Amplified Value is %d and the factor is 3 \"", amp2*amp2*amp2);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tcl.evalf("puts \"&amp;nbsp; The Amplified Value is %d and the factor is 4 \"", amp3*amp3*amp3*amp3);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%;"&gt;                                                                                     &lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; mso-hyphenate: auto;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;}&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;In the above example, the Line 1 to 3, includes the header files, the Agent class is available in the agent.h file. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Line 5 to 13, declares a class with three integer variables and two functions command() and APrivateFunc().&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Line 14 to 19, includes a static class that does the mapping between the OTCL and C++ and also contains the code that instantiates the TclObject. The name of the Agent here is Agent/AMPLIFY which indicates it is a interpreted hierarchy and the static class TSPAgentClass is the compiled hierarchy class. Clearly, the TclClass does the mapping between the Interpreted hierarchy and Compiled hierarchy.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Line 20 to 24, declares the constructor and all the agents should act on a Packet, so this agent acts in the UDP Packet, PT_UDP. There are three binding OTCL factors &lt;b&gt;Ampli1, Ampli2 and Ampli3&lt;/b&gt; that maps to C++’s &lt;b&gt;amp1, amp2 and amp3&lt;/b&gt;respectively. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;Line 25 to 31, implements the command function, that processes the arguments passed from the OTCL.&amp;nbsp; If the argv[1] and the call-the-private-function is validated, that calls the APrivateFunc();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Line 32 to 38, the implementation of APrivateFunc() that amplifies the values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Here is the Tcl file to test the above agent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;#the name of the file is agent.tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;set myagent [new Agent/AMPLIFY]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;$myagent set Ampli1 3 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;$myagent set Ampli2 4&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;$myagent set Ampli3 5&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;$myagent call-the-private-function&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;To execute the above agent, here are the steps&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-hyphenate: auto; mso-list: l6 level1 lfo8; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Copy the ampagent.cc file in ~ns-allinone-2.35/ns-2.35/newagent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-hyphenate: auto; mso-list: l6 level1 lfo8; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Make an entry in the ~ns-2.35/Makefile.in&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Make an entry in the OBJ_CC =&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newfolder/ampagent.o \&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraph" style="line-height: 150%; mso-hyphenate: auto; mso-list: l2 level1 lfo9; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;In the shell prompt, go to ~ns-2.35 and give the following commands one by one &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-left: 36.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;./configure&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-left: 36.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;Make&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-hyphenate: auto; mso-list: l2 level1 lfo9; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Run the file agent.tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-hyphenate: auto; mso-list: l2 level1 lfo9; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;If warnings are there, the set the default values in the &lt;b&gt;ns-default.tcl&lt;/b&gt;file (~ns-2.35/tcl/lib) as shown below&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l2 level2 lfo9; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: courier;"&gt;&lt;span lang="EN-US"&gt;o&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Agent/AMPLIFY set Ampli1 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l2 level2 lfo9; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: courier;"&gt;&lt;span lang="EN-US"&gt;o&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Agent/AMPLIFY set Ampli2 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-hyphenate: auto; mso-list: l2 level2 lfo9; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span style="font-family: courier;"&gt;&lt;span lang="EN-US"&gt;o&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Agent/AMPLIFY set Ampli3 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Output:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Message From the Private Function&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp; The Amplified Value is 9 and the factor is 2 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp; The Amplified Value is 64 and the factor is 3 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp; The Amplified Value is 625 and the factor is 4&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/8500043826660363078/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/10/otcl-and-c-linkages-with-example-ns2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/8500043826660363078" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/8500043826660363078" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/10/otcl-and-c-linkages-with-example-ns2.html" title="OTCL and C++ Linkages with Example - NS2 Tutorial 3" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-710773664451287445</id><published>2021-10-26T14:18:00.006+05:30</published><updated>2021-10-26T14:20:09.328+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Lecture Series" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Tutorial" /><title type="text">Network Simulator 2 - Simple Example - NS2 Tutorial 2</title><content type="html">&lt;p class="MsoNormal" style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 20.0pt; line-height: 150%; mso-bidi-font-size: 12.0pt;"&gt;Introduction to Network Simulator 2&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-autospace: ideograph-numeric;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;In this post&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;ul style="margin-top: 0cm;" type="disc"&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: 36.0pt; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;Introduction      to Network Simulator 2 and its architecture&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: 36.0pt; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;Installation      of Network Simulator 2 in various Operating Systems &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: 36.0pt; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;How to      simulate a given network with available libraries of NS2&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;The network simulator 2 (ns) addresses large number of protocols, applications, agents, queues, etc. These are called as “simulated objects” either in the C++ or OTCL. This book will let the users to code the ns Tcl scripts for wired and wireless networks. This book is intended for students, researchers who need better understanding of networks. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; mso-hyphenate: auto; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"&gt;&lt;span lang="EN-US"&gt;NS is a discrete event simulator developed towards the research and development in networking. NS supports various supports on wired, wireless networks, protocols, unicast/multicast networks, satellite networks. The recent versions of ns2 support latest wireless networks. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; mso-hyphenate: auto; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"&gt;&lt;span lang="EN-US"&gt;NS evolves in 1989 as REAL network simulator. Later in the year 1995 ns development was supported by DARPA through the&amp;nbsp;VINT project at LBL, Xerox PARC, UCB, and USC/ISI. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; mso-hyphenate: auto; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;"&gt;&lt;span lang="EN-US" style="background: white;"&gt;While ns is favorable to researchers right through the inception it is still not a finished or a polished product. Still the bugs are being discovered and corrected by the researchers. &amp;nbsp;Sometimes the simulations may be invalidated by the bugs. Users are responsible for verifying themselves to correct these.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="background: white; line-height: 150%;"&gt;&lt;span lang="EN-US" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"&gt;The main purpose of this book is to provide the readers the basic knowledge and architecture on ns2. This book provides with Tcl scripts for various networks that were available as modules within ns2. The best way to start learning NS2 is through the Ns Manual [1] provided by the &lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;a href="http://www.isi.edu/nsnam/ns"&gt;&lt;span style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"&gt;http://www.isi.edu/nsnam/ns&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span lang="EN-US" style="background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"&gt;. However, this book will help you to simulate these networks that were available in ns2 software.&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Installation of NS2&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;NS2 uses two languages OTCL and C++, in which OTCL provides the front end and C++ runs in the backend. For more details, please refer Chapter 3.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;OTCL is &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Interpreted language also called as interpreted hierarchy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;OTcl is Object Oriented Tcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Preferable for beginners to simply test the protocols, wired, wireless networks, etc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Interpretation is fast and execution is slow (so prefer to run in the front end)&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Compiled hierarchy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Preferable when dealing with packet, agent, application, protocol, routing, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Compilation is slow, but execution is faster (so prefer to run in the backend)&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;TclCL is &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Provides some classes for interfacing between C++ and OTcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Consists of classes with methods &lt;/span&gt;&lt;span lang="EN-US"&gt;Tcl&lt;/span&gt;&lt;span lang="EN-US"&gt; and members to does the mapping between the other two languages.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;The fig1.1 will describe the same.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype  id="_x0000_t13" coordsize="21600,21600" o:spt="13" adj="16200,5400" path="m@0,l@0@1,0@1,0@2@0@2@0,21600,21600,10800xe"&gt; &lt;v:stroke joinstyle="miter"/&gt; &lt;v:formulas&gt;  &lt;v:f eqn="val #0"/&gt;  &lt;v:f eqn="val #1"/&gt;  &lt;v:f eqn="sum height 0 #1"/&gt;  &lt;v:f eqn="sum 10800 0 #1"/&gt;  &lt;v:f eqn="sum width 0 #0"/&gt;  &lt;v:f eqn="prod @4 @3 10800"/&gt;  &lt;v:f eqn="sum width 0 @5"/&gt; &lt;/v:formulas&gt; &lt;v:path o:connecttype="custom" o:connectlocs="@0,0;0,10800;@0,21600;21600,10800"   o:connectangles="270,180,90,0" textboxrect="0,@1,@6,@2"/&gt; &lt;v:handles&gt;  &lt;v:h position="#0,#1" xrange="0,21600" yrange="0,10800"/&gt; &lt;/v:handles&gt;&lt;/v:shapetype&gt;&lt;v:shape id="Right_x0020_Arrow_x0020_6" o:spid="_x0000_s1030"  type="#_x0000_t13" style='position:absolute;left:0;text-align:left;  margin-left:351pt;margin-top:31.5pt;width:97.5pt;height:69pt;z-index:251674624;  visibility:visible;mso-wrap-style:square;mso-width-percent:0;  mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;  mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;  mso-position-horizontal:absolute;mso-position-horizontal-relative:text;  mso-position-vertical:absolute;mso-position-vertical-relative:text;  mso-width-percent:0;mso-height-percent:0;mso-width-relative:margin;  mso-height-relative:margin;v-text-anchor:middle' o:gfxdata="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 BQBnAQAAsw0AAAAA " adj="13957" fillcolor="white [3201]" strokecolor="#f79646 [3209]"  strokeweight="2pt"&gt; &lt;v:textbox&gt;  &lt;![if !mso]&gt;  &lt;table cellpadding=0 cellspacing=0 width="100%"&gt;   &lt;tr&gt;    &lt;td&gt;&lt;![endif]&gt;    &lt;div&gt;    &lt;p class=MsoNormal align=center style='text-align:center'&gt;&lt;b     style='mso-bidi-font-weight:normal'&gt;&lt;span lang=EN-US&gt;NAM (Animation)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/div&gt;    &lt;![if !mso]&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/table&gt;  &lt;![endif]&gt;&lt;/v:textbox&gt;&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style="height: 157px; left: 0px; margin-left: 710px; margin-top: 921px; mso-ignore: vglayout; position: absolute; width: 206px; z-index: 251674624;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape  id="Right_x0020_Arrow_x0020_7" o:spid="_x0000_s1029" type="#_x0000_t13"  style='position:absolute;left:0;text-align:left;margin-left:351pt;  margin-top:157.5pt;width:101.25pt;height:72.75pt;z-index:251676672;  visibility:visible;mso-wrap-style:square;mso-width-percent:0;  mso-height-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;  mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;  mso-position-horizontal:absolute;mso-position-horizontal-relative:text;  mso-position-vertical:absolute;mso-position-vertical-relative:text;  mso-width-percent:0;mso-height-percent:0;mso-width-relative:margin;  mso-height-relative:margin;v-text-anchor:middle' o:gfxdata="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 BQAFAGcBAAC1DQAAAAA= " adj="13840" fillcolor="white [3201]" strokecolor="#f79646 [3209]"  strokeweight="2pt"&gt; &lt;v:textbox&gt;  &lt;![if !mso]&gt;  &lt;table cellpadding=0 cellspacing=0 width="100%"&gt;   &lt;tr&gt;    &lt;td&gt;&lt;![endif]&gt;    &lt;div&gt;    &lt;p class=MsoNormal align=center style='text-align:center'&gt;&lt;b     style='mso-bidi-font-weight:normal'&gt;&lt;span lang=EN-US&gt;Trace (Plotting)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/div&gt;    &lt;![if !mso]&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/table&gt;  &lt;![endif]&gt;&lt;/v:textbox&gt;&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style="height: 164px; left: 0px; margin-left: 710px; margin-top: 1173px; mso-ignore: vglayout; position: absolute; width: 214px; z-index: 251676672;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:oval  id="Oval_x0020_8" o:spid="_x0000_s1028" style='position:absolute;left:0;  text-align:left;margin-left:210pt;margin-top:83.25pt;width:61.5pt;height:36pt;  z-index:251677696;visibility:visible;mso-wrap-style:square;  mso-width-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;  mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;  mso-position-horizontal:absolute;mso-position-horizontal-relative:text;  mso-position-vertical:absolute;mso-position-vertical-relative:text;  mso-width-percent:0;mso-width-relative:margin;v-text-anchor:middle' o:gfxdata="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 hn9NC/CjG1oynRJfFYNdoGjf2du0lfKZImIYTo7QmM3EPobw61QFeyZUwusO0xH0Dbyb0942j9zm nBZd8Y2YwVk6ZkmI03arSzSrZAs3DSnXwdwV1APbSnU3xr26Kabkz8mUYhr/z0zR+wm8fahPdAR8 eNErMNKV0vG4UCGHLpSE1B8IGBxM74Bsgfe78BiSCt5Km19BDvWvrTnLw5Q1HCLVPg2QoLAfqVAQ sgdtyWTfKcyq6d5lWbKUkcmogroysWqPySFhI90DW3pv91AIqW66SdoGDO5k/rn3aQWNAz3kFOvN 6WT53mtr4J+efGwxg1FuHzYDTeb/XMV8PFjsqna9WZ7tvUVD9IPFmNXIqgKEFbaCdlr2r6nCK261 tmMtWVxrZspBFJctBmI+ECXwDgnpf7D/UeEz+wVDb6gjvg+9FcHHC80M0gay+oIdPJBukJY4hsHJ Em0yaVbWtenopL2WbdbnPOnmck84W2t2lni/orPz4cwV59TieTo79bDja0tb6WqI7MkSBdI0O8iY wJR9ydrFCRoH1Y4HX5Mg0PfgCr5HeUCraVpN0+AKPjLBsGS/DHW89CKjwHNLyTH1jFLPMI2M0sgo zYwCw1n6DSajtKBT6c8m8NlO/3go+0ICE1z6RSVrqs7nvs2/AAAA//8DAFBLAwQUAAYACAAAACEA nGZGQbsAAAAkAQAAKgAAAGNsaXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVs c4SPzQrCMBCE74LvEPZu0noQkSa9iNCr1AcIyTYtNj8kUezbG+hFQfCyMLPsN7NN+7IzeWJMk3cc aloBQae8npzhcOsvuyOQlKXTcvYOOSyYoBXbTXPFWeZylMYpJFIoLnEYcw4nxpIa0cpEfUBXNoOP VuYio2FBqrs0yPZVdWDxkwHii0k6zSF2ugbSL6Ek/2f7YZgUnr16WHT5RwTLpRcWoIwGMwdKV2ed NS1dgYmGff0m3gAAAP//AwBQSwECLQAUAAYACAAAACEAu+VIlAUBAAAeAgAAEwAAAAAAAAAAAAAA AAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQCtMD/xwQAAADIBAAALAAAA AAAAAAAAAAAAADYBAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQCnvRQTLAMAACgIAAAfAAAA AAAAAAAAAAAAACACAABjbGlwYm9hcmQvZHJhd2luZ3MvZHJhd2luZzEueG1sUEsBAi0AFAAGAAgA AAAhAJxOXiHiBgAAOhwAABoAAAAAAAAAAAAAAAAAiQUAAGNsaXBib2FyZC90aGVtZS90aGVtZTEu eG1sUEsBAi0AFAAGAAgAAAAhAJxmRkG7AAAAJAEAACoAAAAAAAAAAAAAAAAAowwAAGNsaXBib2Fy ZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVsc1BLBQYAAAAABQAFAGcBAACmDQAAAAA= " fillcolor="white [3201]" strokecolor="#f79646 [3209]" strokeweight="2pt"&gt; &lt;v:textbox&gt;  &lt;![if !mso]&gt;  &lt;table cellpadding=0 cellspacing=0 width="100%"&gt;   &lt;tr&gt;    &lt;td&gt;&lt;![endif]&gt;    &lt;div&gt;    &lt;p class=MsoNormal align=center style='text-align:center'&gt;&lt;b     style='mso-bidi-font-weight:normal'&gt;&lt;span lang=EN-US style='font-size:7.0pt;     mso-bidi-font-size:12.0pt'&gt;TCLCL&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/div&gt;    &lt;![if !mso]&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/table&gt;  &lt;![endif]&gt;&lt;/v:textbox&gt;&lt;/v:oval&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style="height: 80px; left: 0px; margin-left: 428px; margin-top: 1030px; mso-ignore: vglayout; position: absolute; width: 131px; z-index: 251677696;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype  id="_x0000_t32" coordsize="21600,21600" o:spt="32" o:oned="t" path="m,l21600,21600e"  filled="f"&gt; &lt;v:path arrowok="t" fillok="f" o:connecttype="none"/&gt; &lt;o:lock v:ext="edit" shapetype="t"/&gt;&lt;/v:shapetype&gt;&lt;v:shape id="Straight_x0020_Arrow_x0020_Connector_x0020_3"  o:spid="_x0000_s1027" type="#_x0000_t32" style='position:absolute;left:0;  text-align:left;margin-left:210pt;margin-top:127.5pt;width:61.5pt;height:0;  z-index:251671552;visibility:visible;mso-wrap-style:square;  mso-width-percent:0;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;  mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;  mso-position-horizontal:absolute;mso-position-horizontal-relative:text;  mso-position-vertical:absolute;mso-position-vertical-relative:text;  mso-width-percent:0;mso-width-relative:margin' o:gfxdata="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 Vta16eikvZZt1uc86eZyTzhba3aWeL+is/PhzBXn1OJ5Ojv1sONrS1vpaojsyRIF0jQ7yJjAlH3J 2sUJGgfVjgdfkyDQ9+AKvkd5QKtpWk3T4Ao+MsGwZL8Mdbz0IqPAc0vJMfWMUs8wjYzSyCjNjALD WfoNJqO0oFPpzybw2U7/eCj7QgITXPpFJWuqzue+zb8AAAD//wMAUEsDBBQABgAIAAAAIQCcZkZB uwAAACQBAAAqAAAAY2xpcGJvYXJkL2RyYXdpbmdzL19yZWxzL2RyYXdpbmcxLnhtbC5yZWxzhI/N CsIwEITvgu8Q9m7SehCRJr2I0KvUBwjJNi02PyRR7Nsb6EVB8LIws+w3s037sjN5YkyTdxxqWgFB p7yenOFw6y+7I5CUpdNy9g45LJigFdtNc8VZ5nKUxikkUigucRhzDifGkhrRykR9QFc2g49W5iKj YUGquzTI9lV1YPGTAeKLSTrNIXa6BtIvoST/Z/thmBSevXpYdPlHBMulFxagjAYzB0pXZ501LV2B iYZ9/SbeAAAA//8DAFBLAQItABQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAAAAAAAAAAAAAAAAA AABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAK0wP/HBAAAAMgEAAAsAAAAAAAAA AAAAAAAANgEAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhAAjMvA3SAQAAagQAAB8AAAAAAAAA AAAAAAAAIAIAAGNsaXBib2FyZC9kcmF3aW5ncy9kcmF3aW5nMS54bWxQSwECLQAUAAYACAAAACEA nE5eIeIGAAA6HAAAGgAAAAAAAAAAAAAAAAAvBAAAY2xpcGJvYXJkL3RoZW1lL3RoZW1lMS54bWxQ SwECLQAUAAYACAAAACEAnGZGQbsAAAAkAQAAKgAAAAAAAAAAAAAAAABJCwAAY2xpcGJvYXJkL2Ry YXdpbmdzL19yZWxzL2RyYXdpbmcxLnhtbC5yZWxzUEsFBgAAAAAFAAUAZwEAAEwMAAAAAA== " strokecolor="#4579b8 [3044]"&gt; &lt;v:stroke startarrow="open" endarrow="open"/&gt;&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style="height: 23px; left: 0px; margin-left: 428px; margin-top: 1109px; mso-ignore: vglayout; position: absolute; width: 127px; z-index: 251671552;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape  id="Right_x0020_Arrow_x0020_5" o:spid="_x0000_s1026" type="#_x0000_t13"  style='position:absolute;left:0;text-align:left;margin-left:30pt;margin-top:100.5pt;  width:90pt;height:50.25pt;z-index:251672576;visibility:visible;  mso-wrap-style:square;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;  mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;  mso-position-horizontal:absolute;mso-position-horizontal-relative:text;  mso-position-vertical:absolute;mso-position-vertical-relative:text;  v-text-anchor:middle' o:gfxdata="UEsDBBQABgAIAAAAIQC75UiUBQEAAB4CAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbKSRvU7DMBSF dyTewfKKEqcMCKEmHfgZgaE8wMW+SSwc27JvS/v23KTJgkoXFsu+P+c7Ol5vDoMTe0zZBl/LVVlJ gV4HY31Xy4/tS3EvRSbwBlzwWMsjZrlprq/W22PELHjb51r2RPFBqax7HCCXIaLnThvSAMTP1KkI +gs6VLdVdad08ISeCho1ZLN+whZ2jsTzgcsnJwldluLxNDiyagkxOquB2Knae/OLUsyEkjenmdzb mG/YhlRnCWPnb8C898bRJGtQvEOiVxjYhtLOxs8AySiT4JuDystlVV4WPeM6tK3VaILeDZxIOSsu ti/jidNGNZ3/J08yC1dNv9v8AAAA//8DAFBLAwQUAAYACAAAACEArTA/8cEAAAAyAQAACwAAAF9y ZWxzLy5yZWxzhI/NCsIwEITvgu8Q9m7TehCRpr2I4FX0AdZk2wbbJGTj39ubi6AgeJtl2G9m6vYx jeJGka13CqqiBEFOe2Ndr+B03C3WIDihMzh6RwqexNA281l9oBFTfuLBBhaZ4ljBkFLYSMl6oAm5 8IFcdjofJ0z5jL0MqC/Yk1yW5UrGTwY0X0yxNwri3lQgjs+Qk/+zfddZTVuvrxO59CNCmoj3vCwj MfaUFOjRhrPHaN4Wv0VV5OYgm1p+LW1eAAAA//8DAFBLAwQUAAYACAAAACEAQS80czIDAAA7CAAA HwAAAGNsaXBib2FyZC9kcmF3aW5ncy9kcmF3aW5nMS54bWzcVW1v2jAQ/j5p/8Hy95ZAgbaooWJs rSZVFAFVP18dh0R17Mw+3vrrd3YSYF21Snv5MiHAzt09fu7J3fnqelsotpbW5UbHvH0acSa1MEmu lzF/WNycXHDmEHQCymgZ8510/Hr48cMVDJYWyiwXjBC0G0DMM8Ry0Go5kckC3KkppSZbamwBSFu7 bCUWNoRcqFYnivqtAnLNhweoz4DAVjb/DShlxLNMxqDX4AhSicHxk5qjEn+ODAO9vrXlvJxaz1xM 1lPL8iTmpJyGgiTirdpQu9G29SpqeQDYprbw/iZN2ZbeQOey140IaxfzTvsyOu9FFZ7cIhPeod09 i7yDII/+2UX7vFcfmN2/AyGyL78GIZoVHVocUXSlJ6jXP+fca3Ke5csM2chas2ENn0kIaLJvgl0t 3F/Ke08ZBqV1eCtNwfwi5tZTCoxCicH6zmFFpnEM76Xhg9t5SBO3n0yy8wk/0T+9W2sIjPR2pbjJ CfkOHE7BUr3TQ+ocvKefVJlNzE294iwz9uWt596fapCsnG2of2Luvq3ASs7UV+1iftnudgkWw6bb O+/Qxh5bno4telWMjaKaCOzC0vujapapNcWjscnIn0om0ILOjrlA22zGSHsyUZsKORqFtTBFCXin 5yU1TDvI5zVbbB/BlrW8SAU5MfMMSvmWvpVvqBszWqFJ81r8SlVvUA7nuFMytEvQnkqDgVrSIPIE vQ+JPkqxXk3RsTVQvqEl6M03VlrWVWW9qyUYBX6ASX3yMCdxXnxj+aZ5avKRaSoFViVBVABzzXBX yhQEtfAiL6RjE7lhM1OA5qwEbRwZog59+tFZ1Iu69O3QqkvWHEV2A0WuqCfbNDFFBtbJoHnITsI/ A6fcKV+fNg4X4zs2FzYv0U8cks0bvUnqxJfs7FiYr5MjYYLTfyTJIeEgAlWXF2Tf2isn5+WMCqAa CE3vO1+OXgqlZzKlqU7ztlPVob/T5FjZqgBBCKmx7wcv4QZvH5bmSu0Dq74Jl+EhUGG7Dqp9D8Lv A6P3T6yqlyLCqUbjPrjItalb50fKyfP+5Mo/UK8zpiT8kG+9ujaDS33N+7v5eD/8DgAA//8DAFBL AwQUAAYACAAAACEAnE5eIeIGAAA6HAAAGgAAAGNsaXBib2FyZC90aGVtZS90aGVtZTEueG1s7FlP bxtFFL8j8R1Ge2/j/42jOlXs2A20aaPYLepxvB7vTjO7s5oZJ/UNtUckJERBHKjEjQMCKrUSl/Jp AkVQpH4F3szsrnfiNUnbCCpoDvHu29+8/+/Nm93LV+5FDB0SISmPO171YsVDJPb5hMZBx7s1GlxY 95BUOJ5gxmPS8eZEelc233/vMt7wGU3GHIvJKCQRQcAolhu444VKJRtra9IHMpYXeUJieDblIsIK bkWwNhH4CAREbK1WqbTWIkxjbxM4Ks2oz+BfrKQm+EwMNRuCYhyB9JvTKfWJwU4Oqhoh57LHBDrE rOMBzwk/GpF7ykMMSwUPOl7F/Hlrm5fX8Ea6iKkVawvrBuYvXZcumBzUjEwRjHOh1UGjfWk7528A TC3j+v1+r1/N+RkA9n2w1OpS5NkYrFe7Gc8CyF4u8+5VmpWGiy/wry/p3O52u812qotlakD2srGE X6+0Gls1B29AFt9cwje6W71ey8EbkMW3lvCDS+1Ww8UbUMhofLCE1gEdDFLuOWTK2U4pfB3g65UU vkBBNuTZpUVMeaxW5VqE73IxAIAGMqxojNQ8IVPsQ072cDQWFGsBeIPgwhNL8uUSSctC0hc0UR3v wwTHXgHy8tn3L589Qcf3nx7f/+n4wYPj+z9aRs6qHRwHxVUvvv3sz0cfoz+efPPi4RfleFnE//rD J7/8/Hk5EMpnYd7zLx//9vTx868+/f27hyXwLYHHRfiIRkSiG+QI7fMIDDNecTUnY/FqK0YhpsUV W3EgcYy1lBL+fRU66BtzzNLoOHp0ievB2wLaRxnw6uyuo/AwFDNFSyRfCyMHuMs563JR6oVrWlbB zaNZHJQLF7Mibh/jwzLZPRw78e3PEuibWVo6hvdC4qi5x3CscEBiopB+xg8IKbHuDqWOX3epL7jk U4XuUNTFtNQlIzp2smmxaIdGEJd5mc0Qb8c3u7dRl7Myq7fJoYuEqsCsRPkRYY4br+KZwlEZyxGO WNHh17EKy5QczoVfxPWlgkgHhHHUnxApy9bcFGBvIejXMHSs0rDvsnnkIoWiB2U8r2POi8htftAL cZSUYYc0DovYD+QBpChGe1yVwXe5WyH6HuKA45Xhvk2JE+7Tu8EtGjgqLRJEP5mJklheJdzJ3+Gc TTExrQaautOrIxr/XeNmFDq3lXB+jRta5fOvH5Xo/ba27C3YvcpqZudEo16FO9mee1xM6Nvfnbfx LN4jUBDLW9S75vyuOXv/+ea8qp7PvyUvujA0aD2L2EHbjN3Ryql7Shkbqjkj16UZvCXsPZMBEPU6 c7ok+SksCeFSVzIIcHCBwGYNElx9RFU4DHECQ3vV00wCmbIOJEq4hMOiIZfy1ngY/JU9ajb1IcR2 DonVLp9Ycl2Ts7NGzsZoFZgDbSaorhmcVVj9UsoUbHsdYVWt1JmlVY1qpik60nKTtYvNoRxcnpsG xNybMNQgGIXAyy0432vRcNjBjEy0322MsrCYKJxniGSIJySNkbZ7OUZVE6QsV5YM0XbYZNAHx1O8 VpDW1mzfQNpZglQU11ghLovem0Qpy+BFlIDbyXJkcbE4WYyOOl67WWt6yMdJx5vCORkuowSiLvUc iVkAb5h8JWzan1rMpsoX0WxnhrlFUIVXH9bvSwY7fSARUm1jGdrUMI/SFGCxlmT1rzXBredlQEk3 OpsW9XVIhn9NC/CjG1oynRJfFYNdoGjf2du0lfKZImIYTo7QmM3EPobw61QFeyZUwusO0xH0Dbyb 0942j9zmnBZd8Y2YwVk6ZkmI03arSzSrZAs3DSnXwdwV1APbSnU3xr26Kabkz8mUYhr/z0zR+wm8 fahPdAR8eNErMNKV0vG4UCGHLpSE1B8IGBxM74Bsgfe78BiSCt5Km19BDvWvrTnLw5Q1HCLVPg2Q oLAfqVAQsgdtyWTfKcyq6d5lWbKUkcmogroysWqPySFhI90DW3pv91AIqW66SdoGDO5k/rn3aQWN Az3kFOvN6WT53mtr4J+efGwxg1FuHzYDTeb/XMV8PFjsqna9WZ7tvUVD9IPFmNXIqgKEFbaCdlr2 r6nCK261tmMtWVxrZspBFJctBmI+ECXwDgnpf7D/UeEz+wVDb6gjvg+9FcHHC80M0gay+oIdPJBu kJY4hsHJEm0yaVbWtenopL2WbdbnPOnmck84W2t2lni/orPz4cwV59TieTo79bDja0tb6WqI7MkS BdI0O8iYwJR9ydrFCRoH1Y4HX5Mg0PfgCr5HeUCraVpN0+AKPjLBsGS/DHW89CKjwHNLyTH1jFLP MI2M0sgozYwCw1n6DSajtKBT6c8m8NlO/3go+0ICE1z6RSVrqs7nvs2/AAAA//8DAFBLAwQUAAYA CAAAACEAnGZGQbsAAAAkAQAAKgAAAGNsaXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54 bWwucmVsc4SPzQrCMBCE74LvEPZu0noQkSa9iNCr1AcIyTYtNj8kUezbG+hFQfCyMLPsN7NN+7Iz eWJMk3ccaloBQae8npzhcOsvuyOQlKXTcvYOOSyYoBXbTXPFWeZylMYpJFIoLnEYcw4nxpIa0cpE fUBXNoOPVuYio2FBqrs0yPZVdWDxkwHii0k6zSF2ugbSL6Ek/2f7YZgUnr16WHT5RwTLpRcWoIwG MwdKV2edNS1dgYmGff0m3gAAAP//AwBQSwECLQAUAAYACAAAACEAu+VIlAUBAAAeAgAAEwAAAAAA AAAAAAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQCtMD/xwQAAADIB AAALAAAAAAAAAAAAAAAAADYBAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQBBLzRzMgMAADsI AAAfAAAAAAAAAAAAAAAAACACAABjbGlwYm9hcmQvZHJhd2luZ3MvZHJhd2luZzEueG1sUEsBAi0A FAAGAAgAAAAhAJxOXiHiBgAAOhwAABoAAAAAAAAAAAAAAAAAjwUAAGNsaXBib2FyZC90aGVtZS90 aGVtZTEueG1sUEsBAi0AFAAGAAgAAAAhAJxmRkG7AAAAJAEAACoAAAAAAAAAAAAAAAAAqQwAAGNs aXBib2FyZC9kcmF3aW5ncy9fcmVscy9kcmF3aW5nMS54bWwucmVsc1BLBQYAAAAABQAFAGcBAACs DQAAAAA= " adj="15570" fillcolor="white [3201]" strokecolor="#f79646 [3209]"  strokeweight="2pt"&gt; &lt;v:textbox&gt;  &lt;![if !mso]&gt;  &lt;table cellpadding=0 cellspacing=0 width="100%"&gt;   &lt;tr&gt;    &lt;td&gt;&lt;![endif]&gt;    &lt;div&gt;    &lt;p class=MsoNormal align=center style='text-align:center'&gt;&lt;b     style='mso-bidi-font-weight:normal'&gt;&lt;span lang=EN-US&gt;TCL Script&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;    &lt;/div&gt;    &lt;![if !mso]&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/table&gt;  &lt;![endif]&gt;&lt;/v:textbox&gt;&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style="height: 119px; left: 0px; margin-left: 68px; margin-top: 1059px; mso-ignore: vglayout; position: absolute; width: 191px; z-index: 251672576;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75"  coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"  filled="f" stroked="f"&gt; &lt;v:stroke joinstyle="miter"/&gt; &lt;v:formulas&gt;  &lt;v:f eqn="if lineDrawn pixelLineWidth 0"/&gt;  &lt;v:f eqn="sum @0 1 0"/&gt;  &lt;v:f eqn="sum 0 0 @1"/&gt;  &lt;v:f eqn="prod @2 1 2"/&gt;  &lt;v:f eqn="prod @3 21600 pixelWidth"/&gt;  &lt;v:f eqn="prod @3 21600 pixelHeight"/&gt;  &lt;v:f eqn="sum @0 0 1"/&gt;  &lt;v:f eqn="prod @6 1 2"/&gt;  &lt;v:f eqn="prod @7 21600 pixelWidth"/&gt;  &lt;v:f eqn="sum @8 21600 0"/&gt;  &lt;v:f eqn="prod @7 21600 pixelHeight"/&gt;  &lt;v:f eqn="sum @10 21600 0"/&gt; &lt;/v:formulas&gt; &lt;v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/&gt; &lt;o:lock v:ext="edit" aspectratio="t"/&gt;&lt;/v:shapetype&gt;&lt;v:shape id="Diagram_x0020_2" o:spid="_x0000_i1027" type="#_x0000_t75"  style='width:447pt;height:257.5pt;visibility:visible' o:gfxdata="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 MvIQfYJlWLph/p7UC/tv6vk/AAAA//8DAFBLAQItABQABgAIAAAAIQC2MIQfXAEAANEEAAATAAAA AAAAAAAAAAAAAAAAAABbQ29udGVudF9UeXBlc10ueG1sUEsBAi0AFAAGAAgAAAAhAK0wP/HBAAAA MgEAAAsAAAAAAAAAAAAAAAAAjQEAAF9yZWxzLy5yZWxzUEsBAi0AFAAGAAgAAAAhAA7Y2A6XBgAA NhoAABwAAAAAAAAAAAAAAAAAdwIAAGNsaXBib2FyZC9kaWFncmFtcy9kYXRhMS54bWxQSwECLQAU AAYACAAAACEAuuzRGo0BAABIBAAAHwAAAAAAAAAAAAAAAABICQAAY2xpcGJvYXJkL2RyYXdpbmdz L2RyYXdpbmcxLnhtbFBLAQItABQABgAIAAAAIQA5Pf7PMAEAAPwDAAAqAAAAAAAAAAAAAAAAABIL AABjbGlwYm9hcmQvZHJhd2luZ3MvX3JlbHMvZHJhd2luZzEueG1sLnJlbHNQSwECLQAUAAYACAAA ACEAnE5eIeIGAAA6HAAAGgAAAAAAAAAAAAAAAACKDAAAY2xpcGJvYXJkL3RoZW1lL3RoZW1lMS54 bWxQSwECLQAUAAYACAAAACEAA8CiPBEEAADfQQAAHgAAAAAAAAAAAAAAAACkEwAAY2xpcGJvYXJk L2RpYWdyYW1zL2NvbG9yczEueG1sUEsBAi0AFAAGAAgAAAAhANZuR1lxBAAADFQAACIAAAAAAAAA AAAAAAAA8RcAAGNsaXBib2FyZC9kaWFncmFtcy9xdWlja1N0eWxlMS54bWxQSwECLQAUAAYACAAA ACEAsJs0Jd4EAAAcEwAAHgAAAAAAAAAAAAAAAACiHAAAY2xpcGJvYXJkL2RpYWdyYW1zL2xheW91 dDEueG1sUEsBAi0AFAAGAAgAAAAhADU0cF5QBQAAyRUAAB8AAAAAAAAAAAAAAAAAvCEAAGNsaXBi b2FyZC9kaWFncmFtcy9kcmF3aW5nMS54bWxQSwUGAAAAAAoACgDmAgAASScAAAAA "&gt; &lt;v:imagedata src="file:///C:/Users/tspra/AppData/Local/Temp/msohtmlclip1/01/clip_image006.png"   o:title="" cropleft="-19585f" cropright="-19726f"/&gt; &lt;o:lock v:ext="edit" aspectratio="f"/&gt;&lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;/p&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-YEyABeWHh9I/YXfAU3zyUuI/AAAAAAACd40/8VQxdsvN2_wsF-JpCoaINKyNsXY9lg3GwCNcBGAsYHQ/s916/1.1.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="NS2" border="0" data-original-height="550" data-original-width="916" height="384" src="https://1.bp.blogspot.com/-YEyABeWHh9I/YXfAU3zyUuI/AAAAAAACd40/8VQxdsvN2_wsF-JpCoaINKyNsXY9lg3GwCNcBGAsYHQ/w640-h384/1.1.png" title="NS2" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;NS2&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; &lt;p align="center" class="MsoNormal" style="line-height: 150%; text-align: center;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Fig 1.1 – Architecture of NS2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;As shown in the fig1.1, the input is the Tcl script and the output is to plot the graph or animate the network. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Develop the .tcl file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Execute the file using &lt;b&gt;&lt;i&gt;ns filename.tcl&lt;/i&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;There are two output files&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;A file with nam as extension to show the animation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;To execute the nam file, &lt;b&gt;&lt;i&gt;nam filename.nam&lt;/i&gt;&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;A file with .tr or .xg or any other as specified to plot the graph and to identify the performance characteristics&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;To see the graph, either to use &lt;b&gt;&lt;i&gt;xgraph &lt;/i&gt;&lt;/b&gt;&lt;i&gt;or&lt;b&gt; tracegraph &lt;/b&gt;or&lt;b&gt; gnuplot&lt;/b&gt;&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;The trace file can also be processed using awk script by analyzing the text information from the file and predict the performance metrics of the networks&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Directory Structure of NS2&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;This book deals with the latest ns package with version 2.35. The NS is a free tool that can be downloaded from [3]. It can be installed on various operating systems like Linux, Unix, Mac Systems, Windows, etc. &amp;nbsp;This book unless otherwise specified, uses Linux as the Operating System for using NS2.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;NS comes with two different forms,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;All in one package&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;The current version is ns-2.35&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;The various packages comes along with the allinone package &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;nam-1.15&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;ns-2.35&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;otcl-1.14&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl-8.5.10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tk-8.5.10&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tclcl-1.20&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;xgraph-12.2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;All these packages comes in a single bundle and it contains a install script that compiles all the packages using the make utility and generate the binaries for ns, nam, xgraph, etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Component wise package suite&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;In this all the packages have to be compiled separately&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;NS2 has the directory structure with ns-allinone-2.35 is the top level and there are subsequent levels. The fig 1.2 shows the directory structure of ns-2.35&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&amp;nbsp;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-fgYomerpJ5M/YXfAVIbKFDI/AAAAAAACd48/svtJHEF8MSwnKzTmrS_AlH9eMPGVt9n2gCPcBGAYYCw/s900/1.2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="NS2 Directory Structure" border="0" data-original-height="591" data-original-width="900" height="420" src="https://1.bp.blogspot.com/-fgYomerpJ5M/YXfAVIbKFDI/AAAAAAACd48/svtJHEF8MSwnKzTmrS_AlH9eMPGVt9n2gCPcBGAYYCw/w640-h420/1.2.png" title="NS2 Directory Structure" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;NS2 Directory Structure&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p align="center" class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt; text-align: center;"&gt;&lt;span style="text-align: left;"&gt;The &lt;/span&gt;&lt;b style="text-align: left;"&gt;ns-2.35 &lt;/b&gt;&lt;span style="text-align: left;"&gt;folder contains all the simulated modules in the compiled form and there are so many other folders within the ns-2.35. If anyone is working on the networks, then they can retain themselves within this ns-2.35 directory, because that contains almost everything related to the network.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;Some other folders of use are &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Ns-2.35 / &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;aodv – that contains the code of the routing algorithm AODV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;dsdv – contains the code for the routing DSDV&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;mac – contains all the mac layer codes , Ex. 802.11, etc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;queue – codes that contain all the queuing nodes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;mobile – information about the mobile parameters of the node.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;tcl – all the simulation modules in the interpreted hierarchy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;lib – all the TCL simulation objects &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpLast" style="line-height: 150%; margin-left: 72.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 72.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;ex – contains the tcl scripts for various networks&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Installation of NS2 on a UNIX like platform&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;To install the ns2 software on a UNIX like platform, the install script has to be executed using the make utility&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Shell&amp;gt; ./install&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;To install all the required software and to create the binaries.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Shell&amp;gt; ./validate&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;This is to validate the all the required functionalities that were installed during the &lt;b&gt;./install&lt;/b&gt;process.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;Please refer, Appendix A for detailed installation instructions for most of the Operating systems.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Starting with NS2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Starting with ns, the user need to know lot many things. Listed are some important ideas and techniques before proceeding to program ns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpFirst" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;set tcp1 [new Agent/TCP] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;In the above statement, [&lt;b&gt;new Agent/TCP]&lt;/b&gt; creates a shadow object from the &lt;b&gt;TcpClass&lt;/b&gt; Agent class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;When this statement is dealt with, there are many parameters to be noted.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;Where is the actual agent (in which source file the agent was written). &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;TcpClass&lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt; was written in C++ and the code is located at&lt;b&gt; ~ns-2.35/tcp/tcp.cc &lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;When new Agent/TCP is called in OTCL, the &lt;b&gt;TcpClass&lt;/b&gt; runs in the backend and thus creates a shadow object which returns the &lt;b&gt;TcpAgent&lt;/b&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;There are many parameters executes when the agent is created. &lt;b&gt;TcpAgent&lt;/b&gt;also has many parameters initialized and modified during the simulation of network. However, not all the parameters are relevant for the research when simulating the network. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;All those parameters default values are located in the &lt;b&gt;~ns-2.35/tcl/lib/ns-default.tcl &lt;/b&gt;file. These values can be overwritten within the tcl script when the user is writing.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;For example, &lt;b&gt;&lt;i&gt;Agent/TCP set numdupacks_ 3&lt;/i&gt;&lt;/b&gt; (this is the line taken from the ns-default.tcl file and specifies that the number of duplicate acknowledgment is 3 and if the user wanted to change it to 5, the code has to be included in the tcl file like this &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; margin-left: 54.0pt; mso-add-space: auto; mso-list: l0 level1 lfo1; tab-stops: list 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;i&gt;&lt;span lang="EN-US"&gt;$tcp0 set numdupacks_ 5 &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;(as tcp0 is the handler for the Agent/TCP)&lt;b&gt;&lt;i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt 54.0pt; text-indent: -18.0pt;"&gt;&lt;!--[if !supportLists]--&gt;&lt;span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;·&lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; line-height: normal;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span lang="EN-US"&gt;There may be more number of C++ classes running in the background when the Tcl file is interpreting and the researchers are advised to go through the source code if they are programming a given network.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;The following table tells the Agent name and their corresponding file location.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;div align="center"&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 100.15pt;" valign="top" width="200"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;Agent/TCP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 99.0pt;" valign="top" width="198"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;TcpClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 133.95pt;" valign="top" width="268"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;~ns-2.35/tcp/tcp.cc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 100.15pt;" valign="top" width="200"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;Agent/TCP/Reno&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 99.0pt;" valign="top" width="198"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;RenoTcpClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 133.95pt;" valign="top" width="268"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;~ns-2.35/tcp/tcp-reno.cc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 100.15pt;" valign="top" width="200"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;Agent/UDP&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 99.0pt;" valign="top" width="198"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;UdpAgentClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 133.95pt;" valign="top" width="268"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt;"&gt;&lt;span lang="EN-US"&gt;~ns-2.35/apps/udp.cc&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;/div&gt; &lt;p align="center" class="MsoNormal" style="line-height: 150%; tab-stops: list 54.0pt; text-align: center;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Table 1.1 – Otcl - C++ Class names&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Let us go through a simple example of a wired network that exchange packets between the nodes.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-hc8uDgyG4lk/YXfAU3qwcBI/AAAAAAACd5E/j5yS3SisiX8x6-ADedjbFEBn7bk48KjSACPcBGAYYCw/s1157/1.3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Two wired Nodes" border="0" data-original-height="350" data-original-width="1157" height="194" src="https://1.bp.blogspot.com/-hc8uDgyG4lk/YXfAU3qwcBI/AAAAAAACd5E/j5yS3SisiX8x6-ADedjbFEBn7bk48KjSACPcBGAYYCw/w640-h194/1.3.png" title="Two wired Nodes" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Two wired Nodes&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span lang="EN-US"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Listing 1.1 – TCP with FTP Traffic between two nodes&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#create a new simulator object &lt;b&gt;ns&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set ns [new Simulator]&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;# creation of two nodes n0 and n1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set n0 [$ns node]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set n1 [$ns node]&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#Open the files for tracing in write mode, if the file already exits, it will be overwritten, else a #new file will be created&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set tracefile [open out.tr w]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns trace-all $tracefile&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#Open the files for network animation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set namfile [open out.nam w]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns namtrace-all $namfile&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#Create a duplex link between nodes n0 and n1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns duplex-link $n0 $n1 2MB 10ms DropTail&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#Creates TCP Agent and attach it to node 0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set tcp0 [new Agent/TCP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns attach-agent $n0 $tcp0&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#creates TCP Sink Agent and attach that agent to node 1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set tcpsink0 [new Agent/TCPSink]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns attach-agent $n1 $tcpsink0&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;# Set the Traffic for FTP and attach it to TCP Agent&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;set ftp [new Application/FTP]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ftp attach-agent $tcp0&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#connect the source and the sink&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns connect $tcp0 $tcpsink0&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#Start the traffic at 1.0seconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns at 1.0 "$ftp start"&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#call the finish procedure at 4.0 sec&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns at 4.0 "finish"&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#Procedure finish{} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;proc finish {} {&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; global ns tracefile namfile&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exec nam out.nam &amp;amp;;&amp;nbsp; &lt;/span&gt;&lt;/b&gt;&lt;span lang="EN-US"&gt;#execute the animation within the procedure&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit 0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;#Run the simulation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;$ns run&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Conclusion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;This chapter gives you the short glimpse of what is ns2 and how it is installed under various operating system. This chapter deals with the directory structure of ns2 with various other packages that are of important to Network simulator for its operation. Also this chapter shows the two languages used in ns2 OTcl and C++ and demonstrates a wired Tcl script with Network animation screenshot.&lt;/span&gt;&lt;/p&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/710773664451287445/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/10/network-simulator-2-simple-example-ns2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/710773664451287445" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/710773664451287445" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/10/network-simulator-2-simple-example-ns2.html" title="Network Simulator 2 - Simple Example - NS2 Tutorial 2" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-YEyABeWHh9I/YXfAU3zyUuI/AAAAAAACd40/8VQxdsvN2_wsF-JpCoaINKyNsXY9lg3GwCNcBGAsYHQ/s72-w640-h384-c/1.1.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-2855205583292657547</id><published>2021-10-26T14:10:00.002+05:30</published><updated>2021-10-26T14:10:14.167+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Lecture Series" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Tutorial" /><title type="text">Introduction to NS2 - NS2 Tutorial 1</title><content type="html">&lt;p class="MsoNormal" style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-size: 20.0pt; line-height: 150%; mso-bidi-font-size: 12.0pt;"&gt;Introduction to Network Simulations&lt;/span&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-autospace: ideograph-numeric;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;In this post, you can learn&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;ul style="margin-top: 0cm; text-align: left;" type="disc"&gt;&lt;li&gt; Introduction      to Network Simulator 2 and its architecture&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: 36.0pt; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;Installation      of Network Simulator 2 in various Operating Systems &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: 36.0pt; text-autospace: ideograph-numeric;"&gt;&lt;span lang="EN-US"&gt;How to      simulate a given network with available libraries of NS2&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify; text-indent: 18.0pt;"&gt;&lt;span lang="EN-US"&gt;A simulator is of extensive use to engineers and researchers as it provides them a simple and inexpensive way to test the real world scenarios without facing the problems of actual implementation, though getting the same results. Similarly, a network simulator is software which models the behavior of the network given to it as an input, under real network characteristics without the actual network being present. To generalize, we can say that a simple network simulator must provide the user the capability to create nodes, the links between them and the traffic between the nodes. Additionally, an advanced network simulator may provide options for specifying every detail about the protocol used in handling network traffic.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-GB"&gt;Simulation is the modelling of an environment which is exactly similar to the underlying state of the target. The main goal of building a simulator is that, the internal state transitions and responsiveness of the system must exactly match the actual target environment it’s trying to mimic. Simulators are often used in order to give the user an initial experience of the real environment, since it may not be feasible for the user or the corporation to let the trainee use the actual environment due to monetary or safety reasons. The best example of a simulator is the flight simulator. The pilot trainee is never allowed to board the actual cockpit until he is able to get through the flight simulator environment. The flight simulator has the exact controls which is present in the cockpit and creates a virtual environment similar to that of the actual cockpit. It is capable of taking into consideration a number of factors like G-Forces, turbulence etc. It’s mandatory that these effects are very accurate so that the pilot doesn’t make any errors during the actual flight. Like wise, network simulators are useful in analysing, testing and design of various methods of computer networks. The emergence of wireless networks forced network simulations to be more accurate and appropriate due to its dynamic nature while deploying such networks. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; margin-left: 18.0pt; mso-list: l1 level2 lfo2; text-align: justify; text-indent: -18.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;1.1&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Need for Simulation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Most of the pilot projects are using simulators rather than the real network deployments because of various factors like cost, implementation difficulties, customization, new technology adaptation, etc. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;However there are situations where the real networks deployment are at upper hand for accurate results and it is the actual thing happening. Here is a simple comparison between the real model and the simulated model.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; margin-left: 18.0pt; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Real Network&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Simulated Model&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;The cost of all the network components have to be procured&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Most of the simulators are open source and free and cost is zero.   (Example, NS2, OMNeT++, etc)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Time to set the things is really a painful task. (For Example,   configuring a switch, hub or a router involves a skilled worker)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Learn a programming tool to model the devices once. Once learned,   setting a network is a very simple task&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Altering a given component may incur additional devices to setup   or malfunction the entire network setup.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;There is no risk while changing or altering the pre existing   network.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;This is the actual thing happening and whatever results you get   the results are real and accurate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Here also one may get accurate results until the system is bug   free. If there are bugs in the system, the results may be unreliable or   inaccurate.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Overall: Cost is high and exact results.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 239.4pt;" valign="top" width="479"&gt;  &lt;p class="MsoNormal" style="line-height: 150%; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;Overall: Cheaper and easier to deploy and development&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;So once the network project is decided, it is advisable to look for a simulator rather than option for a real network deployment as the initial cost should in any case be minimal.&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; margin-left: 18.0pt; mso-list: l1 level2 lfo2; text-align: justify; text-indent: -18.0pt;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;1.2&lt;span style="font-size: 7pt; font-stretch: normal; font-variant-east-asian: normal; font-variant-numeric: normal; font-weight: normal; line-height: normal;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;!--[endif]--&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;List of Network Simulators&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%; margin-left: 18.0pt; text-align: justify;"&gt;&lt;span lang="EN-US"&gt;There are various simulators available for simulations each with their own purpose. However there are limited simulators that support wide range of protocols, routing metrics, etc. Here is the list of simulators that support huge number of protocols and network entities.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Network Simulator 2 [NS2]&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Network simulator 2[3] is one of the oldest simulator available for simulation of wired, wireless, satellite networks, etc. For more than a decade, it satisfies most of the researchers/students across the globe in simulating the networks. It has a strong community that helps developers, researchers across the internet. &amp;nbsp;NS2 was criticized because of the complex architecture it has (OTcl and C++), but it supports the oldest to latest the protocol that were available for the wired or wireless networks. &amp;nbsp;NS2 is completely open source and free.&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; text-align: left;"&gt;&lt;span lang="EN-US"&gt;&lt;b&gt;Network Simulator 3 [NS3]&lt;/b&gt;&lt;/span&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;NS3 [14] is another simulator available for less than a decade and it supports network components of recent developments, unlike NS2, the architecture of ns3 is simpler and one can simulate a network using either C++ or python scripts. NS3 is evolving these days to a greater extent and will come with new protocols, new networks, etc in each of their releases. NS3 is completely open source and free.&lt;br /&gt;&lt;!--[endif]--&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; text-align: left;"&gt;&lt;span lang="EN-US"&gt;&lt;b&gt;OMNeT++ &lt;/b&gt;&lt;/span&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;OMNeT++[15] another tool that supports many protocols, network entities using the framework INET which is coming as a third party interface. OMNeT++ is built on the eclipse framework and the development and deployment is very easy as it as a richer GUI that supports the developers to form a network very easy.&amp;nbsp; It is built over C++ and most of the developmental modules are developed in C++ and there is a configuration file (omnetpp.ini) which solves the purpose of forming a network either in a text mode or in a graphical mode. &amp;nbsp;All these things available at a free cost. OMNEST is the commercial version.&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; text-align: left;"&gt;&lt;span lang="EN-US"&gt;&lt;b&gt;OPNET &lt;/b&gt;&lt;/span&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;This is expensive commercial software available for network simulation and is available with source codes for unrestricted protocols. Trial version is available on request. It contains excellent manual. It has a full-fledged GUI with XML based support for scenario generation. Because of its heavy weight components, this is a slow simulator. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;There are various other simulators too in the market that solves the purpose of narrow network research. So, the developers once identified a network, there are choices available for them to select the perfect simulator for their research. The following table will list some of the key comparisons between the simulators &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-border-insideh: .5pt solid windowtext; mso-border-insidev: .5pt solid windowtext; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;"&gt; &lt;tbody&gt;&lt;tr&gt;  &lt;td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;OPNET&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;NS2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;NS3&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.8pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;OMNeT++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Cost&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Highly   expensive.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Free and Open   Source&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Free and Open   Source&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.8pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Academic Version   is Free&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Support&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Good manual with   source codes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Proper   documentation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Proper   documentation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.8pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Documentation is   available&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Topology/Scenario&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;GUI&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;OTcl&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;C++ or Python&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.8pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;GUI with   omnetpp.ini&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Languages/scripts   used&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;OTcl and C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;C++ and Python&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.8pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;C++&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Forum /Community   Help&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Less&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Best&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Good&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.8pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Good&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;  &lt;td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Overall Rating&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Expensive and   highly commercial, simulation is also slow, suited best for the industries&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Best for latest   and faster simulations&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.75pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Best for latest   and faster simulations&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt;  &lt;td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 95.8pt;" valign="top" width="192"&gt;  &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Need for a third   party framework for a given network. Also issue with version compatibility&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;h2 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;1.3 Time driven and Event Driven Simulations&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Usually network simulations carried out either in time driven or event driven. Each of them have their own pros and cons. This topic will show you the difference between these simulations.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Time driven Simulation&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Time driven simulation is also called as discrete time simulation. The simulation is carried out on a fixed time interval. The time interval in which a task is running is assumed to be running before the end of the interval though the task would have arrived at the beginning of the interval. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;For example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Assume ∆t is the interval in which the task is running (Assuming a packet arrives in ∆t) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;∆t = t2- t1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Suppose if the packet arrives t1+0.001 and it may be running before the time t2. So sometimes, the packet may have to wait for a shorter duration of time because of this kind of simulation. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;A simple pseudo code shows&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;For t = 1 to time &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;If (packet arrival) &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-indent: 36.0pt;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Buffer ++;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Else (packet departure)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%; text-indent: 36.0pt;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Buffer—&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Print (Buffer);&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;This shows the time driven simulation has some limitations in networks.&lt;/span&gt;&lt;/p&gt; &lt;h3 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;Event driven Simulation&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Event driven simulation as the name says, it handles some set of events using a scheduler or a handler.&amp;nbsp; Here are some of the key features of event driven simulation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul style="margin-top: 0cm;" type="disc"&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Discrete set of events can be handled      by a scheduler&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;One event upon completes triggers      the next events&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;The events are fired as random      intervals and are scheduled by the handler&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;The simulation may be stopped once      all the events are executed or at a predefined time (where we want to end      the simulation). In short, the stopping occurs when the system reaches a      particular state or particular time. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;Here is the pseudo code for Event driven simulation&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Initialize the system &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;Initialize the events&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;While (true)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Collect information from the current event.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Remove first event from the list and handle it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US" style="font-family: &amp;quot;Courier New&amp;quot;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set time to the event&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;When compared event driven simulation has upper hand over the time driven simulation as in the latter case, the time is wasted in difference of timing. But selecting a small ∆t does not solve the purpose as the computational complexity of handling the network dynamics may not suite.&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;This book is demonstrates the Network Simulator 2 (NS2) which is a discrete event simulator that handles the network dynamics using discrete number of events that are handled by a scheduler. Also ns2 supports four different types of scheduler namely calendar (Default), heap, simple linked list and real time scheduler. &amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;h2 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;1.4 Modeling for Network Simulation&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%;"&gt;&lt;span lang="EN-US"&gt;The most difficult part in simulation of network is the selection of a Model. Selecting a model needs the thorough knowledge of network elements, problem specification and the deep knowledge of the system under study. So, to analyse a given network under study, here are steps that can be used for performance analysis [16]&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt; &lt;ul style="margin-top: 0cm;" type="disc"&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Problem formulation and system      model definition&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Performance Metrics definitions &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Various levels under study&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Data collection&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Selection of simulation      environment &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Verification and validation &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt; &lt;li class="MsoNormal" style="line-height: 150%; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;"&gt;&lt;span lang="EN-US"&gt;Experimentation and analysis&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;h2 style="line-height: 150%; text-align: left;"&gt;&lt;b&gt;&lt;span lang="EN-US"&gt;1.5 Conclusion&lt;/span&gt;&lt;/b&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="line-height: 150%; tab-stops: 196.5pt;"&gt;&lt;span lang="EN-US"&gt;This chapter deals with the elements of network simulation that compared time driven and event driven simulation. Also this chapter tells the list of network simulators that are available for research and development. This chapter compares various simulators based on their usage and features.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/2855205583292657547/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/10/introduction-to-ns2-ns2-tutorial-1.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2855205583292657547" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2855205583292657547" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/10/introduction-to-ns2-ns2-tutorial-1.html" title="Introduction to NS2 - NS2 Tutorial 1" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-3695891488451051844</id><published>2021-07-30T10:37:00.003+05:30</published><updated>2021-07-30T10:37:47.212+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 3" /><category scheme="http://www.blogger.com/atom/ns#" term="NS3" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><title type="text">Installing ns-3.34 in Ubuntu 20.04</title><content type="html">&lt;h1 style="text-align: left;"&gt;This post shows how to install ns 3.34 in Ubuntu 20.04 LTS&lt;/h1&gt;&lt;div&gt;Prerequisites:&lt;/div&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Fresh installation of Ubuntu Version 20.04 LTS&amp;nbsp;&lt;/li&gt;&lt;li&gt;&lt;a href="https://www.nsnam.org/releases/ns-allinone-3.34.tar.bz2" target="_blank"&gt;ns3.34 can be downloaded from here&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;Follow the video link for complete step by step instructions on the installation.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/timruVmsOxI" width="320" youtube-src-id="timruVmsOxI"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This version fixes the compilation issues of vanet-routing-compare.cc (bug in ns3.33)&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Issue the following commands after opening a terminal&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$ sudo apt update&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$ sudo apt install g++ python3 python3-dev python-dev pkg-config sqlite3 python3-setuptools git qt5-default gir1.2-goocanvas-2.0 python3-gi python3-gi-cairo python3-pygraphviz gir1.2-gtk-3.0 ipython3 openmpi-bin openmpi-common openmpi-doc libopenmpi-dev autoconf cvs bzr unrar openmpi-bin openmpi-common openmpi-doc libopenmpi-dev tcpdump wireshark libxml2 libxml2-dev&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;Unzip or untar the ns-allinone-3.34.tar.bz2 in the home folder (in my case its /home/pradeepkumar)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$ cd ns-allinone-3.34/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$ ./build.py --enable-examples --enable-tests&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Once the installation is completed, you may get an output shown as below&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-oovmkw-e_CY/YQOIwVvHPjI/AAAAAAACahA/JnXX6hbSmAAR07fqB_ZR2jjAcbjY_gv0wCNcBGAsYHQ/s2048/Screenshot%2B2021-07-29%2Bat%2B9.49.14%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="ns3" border="0" data-original-height="1280" data-original-width="2048" height="400" src="https://1.bp.blogspot.com/-oovmkw-e_CY/YQOIwVvHPjI/AAAAAAACahA/JnXX6hbSmAAR07fqB_ZR2jjAcbjY_gv0wCNcBGAsYHQ/w640-h400/Screenshot%2B2021-07-29%2Bat%2B9.49.14%2BPM.png" title="ns3" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;ns-3.34 in Ubuntu 20.04&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The following packages are installed&lt;/div&gt;&lt;div&gt;Visualizer&lt;/div&gt;&lt;div&gt;NetAnim&lt;/div&gt;&lt;div&gt;Python Bindings&lt;/div&gt;&lt;div&gt;Wireshark&lt;/div&gt;&lt;div&gt;ns3&lt;/div&gt;&lt;div&gt;GNU Scientific Library IEEE 802.11b&amp;nbsp;&lt;/div&gt;&lt;div&gt;MPI&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please subcribe to my channel and share it to your friends..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There is membership options as well for my channel.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks for watching...!!!!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In case, if you want to contribute to my work on Engineering Clinic, You can be part of my channel as a member.&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; caret-color: rgb(13, 13, 13); color: #0d0d0d; font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;Join my channel to get access to perks: &lt;/span&gt;&lt;span style="background-color: white; caret-color: rgb(13, 13, 13); color: #0d0d0d; font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;https://www.youtube.com/channel/UCSckTbBIf39jf2dIbruS32A/join&lt;/span&gt;&lt;/div&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/3695891488451051844/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/07/installing-ns-334-in-ubuntu-2004.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3695891488451051844" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3695891488451051844" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/07/installing-ns-334-in-ubuntu-2004.html" title="Installing ns-3.34 in Ubuntu 20.04" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/timruVmsOxI/default.jpg" height="72" width="72" /><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-7455366830664378534</id><published>2021-07-20T16:39:00.005+05:30</published><updated>2021-07-20T16:39:45.366+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 3" /><category scheme="http://www.blogger.com/atom/ns#" term="NS3" /><category scheme="http://www.blogger.com/atom/ns#" term="VANET" /><title type="text">VANET-routing-compare error in ns-3.33</title><content type="html">In network simulator 3, while simulating the vanet-routing-compare.cc file, you may get an error in ns-3.33 version as shown below:&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&lt;b&gt;msg="GlobalValue name=VRCcumulativeBsmCaptureStart: input value is not a string",&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&lt;b&gt;file=../src/core/model/global-value.cc, line=128&lt;br /&gt;terminate called without an active exception&lt;br /&gt;&lt;span style="color: red;"&gt;Command ['/home/ns3/Desktop/ns-allinone-3.33/ns-3.33/build/scratch/vanet-routing-compare'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run &amp;lt;program&amp;gt; --gdb").&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&lt;b&gt;&lt;span style="color: red;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;To overcome this error, here is the patch to download&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;https://github.com/tspradeepkumar/ns3/blob/main/vanet.patch&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;Once downloaded, move this file to&amp;nbsp;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;~ns-3.33/scratch/ folder and copy the vanet-routing-compare.cc also to the scratch/ folder and apply the following command&amp;nbsp;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: 14px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;span style="font-family: courier;"&gt;$ cd ns-allinone-3.33/ns-3.33/scratch&lt;/span&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;span style="font-family: courier;"&gt;$ patch -p0 &amp;lt; vanet.patch vanet-routing-compare.cc&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;Check the following video for explanation of vanet-routing-compare.cc and its characteristics.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/IJYeIpUqjQI" width="320" youtube-src-id="IJYeIpUqjQI"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;span style="font-family: courier;"&gt;Please find the screenshot of the action:&lt;/span&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-qWObzgKaezI/YPaunQc5KwI/AAAAAAACaa0/YUH1vKCK3bMufiA7BmG1lxt8z9Za26z8ACNcBGAsYHQ/s2048/Screenshot%2B2021-07-20%2Bat%2B4.34.51%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="ns-3.33 vanet" border="0" data-original-height="1280" data-original-width="2048" height="400" src="https://1.bp.blogspot.com/-qWObzgKaezI/YPaunQc5KwI/AAAAAAACaa0/YUH1vKCK3bMufiA7BmG1lxt8z9Za26z8ACNcBGAsYHQ/w640-h400/Screenshot%2B2021-07-20%2Bat%2B4.34.51%2BPM.png" title="ns-3.33 vanet" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;ns-3.33 vanet&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-koPmccLvq08/YPauYTaV6oI/AAAAAAACaas/rxX_TdMubbc3Sc66Rpi-P6QUCWgS7OGqwCNcBGAsYHQ/s2702/Screenshot%2B2021-07-20%2Bat%2B4.36.11%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="ns-3.33 vanet" border="0" data-original-height="1100" data-original-width="2702" height="260" src="https://1.bp.blogspot.com/-koPmccLvq08/YPauYTaV6oI/AAAAAAACaas/rxX_TdMubbc3Sc66Rpi-P6QUCWgS7OGqwCNcBGAsYHQ/w640-h260/Screenshot%2B2021-07-20%2Bat%2B4.36.11%2BPM.png" title="ns-3.33 vanet" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;vanet-routing-compare.cc in ns-3.33&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87);"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/7455366830664378534/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/07/vanet-routing-compare-error-in-ns-333.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/7455366830664378534" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/7455366830664378534" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/07/vanet-routing-compare-error-in-ns-333.html" title="VANET-routing-compare error in ns-3.33" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/IJYeIpUqjQI/default.jpg" height="72" width="72" /><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-2383143537312072725</id><published>2021-07-20T15:43:00.006+05:30</published><updated>2021-07-20T15:43:52.066+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="IOT" /><category scheme="http://www.blogger.com/atom/ns#" term="IoT Tutorials" /><category scheme="http://www.blogger.com/atom/ns#" term="Node JS" /><title type="text">MQTT using Node JS | Node JS Tutorial</title><content type="html">This post shows you Simple MQTT Application using Node JS. There are three parts of the application.&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div&gt;For running any MQTT application, we need a&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;1. Broker (The broker can be anywhere in the Internet or cloud or a local machine)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;2. Publisher (pub.js is the name of the file)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;3. Subscriber (sub.js is the name of the file)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;Check the following video for complete instructions.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/JwSoHIngGRI" width="320" youtube-src-id="JwSoHIngGRI"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In this example, we will be using a broker called https://www.hivemq.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;span style="-webkit-font-kerning: none;"&gt;&lt;span style="font-family: Times New Roman;"&gt;To use the cloud broker (&lt;/span&gt;&lt;span style="font-family: courier;"&gt;mqtt://broker.hivemq.com)&lt;/span&gt;&lt;span style="font-family: Times New Roman;"&gt; and connect the publisher and subscriber with a topic and a message. To install the Hive MQ software in your local machine (127.0.0.1) and run the same above code locally and make the connectivity between the pub-sub.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: &amp;quot;Times New Roman&amp;quot;; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;/p&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;We open two new .js files called pub.js (publisher) and sub.js (subscriber) in Visual Studio Code. To install the mqtt module in NodeJS, we use the command “&lt;span style="font-family: courier;"&gt;npm install mqtt&lt;/span&gt;” in C:/ terminal.&amp;nbsp;&lt;/li&gt;&lt;li&gt;We define our client as connecting to “mqtt://broker.hivemq.com”. We connect to the cloud broker in both publisher and subscriber js modules. We have taken temperature and temperature value as our message. The source code is given below.&amp;nbsp;&lt;/li&gt;&lt;li&gt;To execute our code, we open two terminals and use the command “node pub.js” and then in the other one, “node sub.js”. In the left command prompt, we have published, and in the one on the right, we have subscribed. We can see the outputs match each other.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-vp08yZSt0JU/YPac8g7JvmI/AAAAAAACaac/XOZ58qKUhpo3EF2IeYxoNlKV-Ezan8SrgCNcBGAsYHQ/s1840/Screenshot%2B2021-07-20%2Bat%2B3.20.37%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="MQTT using Node JS" border="0" data-original-height="910" data-original-width="1840" height="316" src="https://1.bp.blogspot.com/-vp08yZSt0JU/YPac8g7JvmI/AAAAAAACaac/XOZ58qKUhpo3EF2IeYxoNlKV-Ezan8SrgCNcBGAsYHQ/w640-h316/Screenshot%2B2021-07-20%2Bat%2B3.20.37%2BPM.png" title="MQTT Using Node JS" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;MQTT using Node JS&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;Using cloud broker:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;Pub.js:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;const&amp;nbsp;mqtt&amp;nbsp;=&amp;nbsp;require("mqtt");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;var&amp;nbsp;client&amp;nbsp;=&amp;nbsp;mqtt.connect("mqtt://broker.hivemq.com");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;client.on("connect",function()&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;setInterval(function(){&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;random&amp;nbsp;=&amp;nbsp;Math.random()*50;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(random);&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(random&amp;lt;30)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;client.publish("Pradeep","temperature&amp;nbsp;value:&amp;nbsp;"+random.toString());&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}),30000;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;});&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;Sub.js:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;const&amp;nbsp;mqtt&amp;nbsp;=&amp;nbsp;require("mqtt");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;var&amp;nbsp;client&amp;nbsp;=&amp;nbsp;mqtt.connect("mqtt://broker.hivemq.com");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;client.on("connect",function()&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;client.subscribe("Shirish");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log("Client&amp;nbsp;subscribed&amp;nbsp;");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;});&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;client.on("message",function(topic,&amp;nbsp;message){&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(message.toString());&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;});&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;Using local broker:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size: 14.7px;"&gt;To run the broker locally, we first install HiveMQ on our system.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-Xyoqgziy2LA/YPadT1ft2SI/AAAAAAACaak/5MFWTG4JRPMnwTWx0mmkE12ffL0_T5LdgCNcBGAsYHQ/s2166/Screenshot%2B2021-07-20%2Bat%2B3.23.40%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="HiveMQ for MQTT" border="0" data-original-height="1034" data-original-width="2166" height="306" src="https://1.bp.blogspot.com/-Xyoqgziy2LA/YPadT1ft2SI/AAAAAAACaak/5MFWTG4JRPMnwTWx0mmkE12ffL0_T5LdgCNcBGAsYHQ/w640-h306/Screenshot%2B2021-07-20%2Bat%2B3.23.40%2BPM.png" title="HiveMQ for MQTT" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;HiveMQ for MQTT&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;Pub.js:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;const&amp;nbsp;mqtt&amp;nbsp;=&amp;nbsp;require("mqtt");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;var&amp;nbsp;client&amp;nbsp;=&amp;nbsp;mqtt.connect("mqtt://127.0.0.1:1883");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;client.on("connect",function()&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;setInterval(function(){&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;random&amp;nbsp;=&amp;nbsp;Math.random()*50;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(random);&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(random&amp;lt;30)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;client.publish("Shirish","temperature&amp;nbsp;value:&amp;nbsp;"+random.toString());&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}),30000;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;});&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;Sub.js:&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;span style="text-decoration: underline;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;const&amp;nbsp;mqtt&amp;nbsp;=&amp;nbsp;require("mqtt");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;var&amp;nbsp;client&amp;nbsp;=&amp;nbsp;mqtt.connect("mqtt://127.0.0.1:1883");&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px; min-height: 16px;"&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;client.on("connect",function()&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;setInterval(function(){&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;var&amp;nbsp;random&amp;nbsp;=&amp;nbsp;Math.random()*50;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;console.log(random);&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(random&amp;lt;30)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;client.publish("Shirish","temperature&amp;nbsp;value:&amp;nbsp;"+random.toString());&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}),30000;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-stretch: normal; line-height: normal; margin: 0px;"&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;});&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="background-color: white; font-family: &amp;quot;Courier New&amp;quot;; font-size: 14px; font-stretch: normal; line-height: normal; margin: 0px 0px 10px; min-height: 16px;"&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 14.7px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;style class="WebKit-mso-list-quirks-style"&gt;&lt;!-- /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin-top:0cm; 	margin-right:0cm; 	margin-bottom:10.0pt; 	margin-left:0cm; 	line-height:115%; 	mso-pagination:widow-orphan; 	font-size:11.0pt; 	font-family:"Calibri",sans-serif; 	mso-fareast-font-family:Calibri; 	mso-bidi-font-family:"Times New Roman"; 	mso-ansi-language:EN-US; 	mso-bidi-language:AR-SA;} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt; 	font-family:"Calibri",sans-serif; 	mso-ascii-font-family:Calibri; 	mso-ascii-theme-font:minor-latin; 	mso-fareast-font-family:Calibri; 	mso-fareast-theme-font:minor-latin; 	mso-hansi-font-family:Calibri; 	mso-hansi-theme-font:minor-latin; 	mso-bidi-font-family:Latha; 	mso-bidi-theme-font:minor-bidi;} @page WordSection1 	{size:595.3pt 841.9pt; 	margin:72.0pt 72.0pt 72.0pt 72.0pt; 	mso-header-margin:35.4pt; 	mso-footer-margin:35.4pt; 	mso-paper-source:0;} div.WordSection1 	{page:WordSection1;}  /* List Definitions */  @list l0 	{mso-list-id:752356710; 	mso-list-template-ids:752356710;} @list l0:level1 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l0:level2 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:"Courier New";} @list l0:level3 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Wingdings;} @list l0:level4 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l0:level5 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:"Courier New";} @list l0:level6 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Wingdings;} @list l0:level7 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Symbol;} @list l0:level8 	{mso-level-number-format:bullet; 	mso-level-text:o; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:"Courier New";} @list l0:level9 	{mso-level-number-format:bullet; 	mso-level-text:; 	mso-level-tab-stop:none; 	mso-level-number-position:left; 	text-indent:-18.0pt; 	font-family:Wingdings;}  --&gt;&lt;/style&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/2383143537312072725/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/07/mqtt-using-node-js-node-js-tutorial.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2383143537312072725" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2383143537312072725" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/07/mqtt-using-node-js-node-js-tutorial.html" title="MQTT using Node JS | Node JS Tutorial" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/JwSoHIngGRI/default.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-5118464015336643924</id><published>2021-05-16T13:08:00.006+05:30</published><updated>2021-07-13T15:25:32.105+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 3" /><category scheme="http://www.blogger.com/atom/ns#" term="NS3" /><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows 10" /><category scheme="http://www.blogger.com/atom/ns#" term="wireless" /><title type="text">Installation of ns3 in Windows 10 and Windows 11 OS using WSL (Windows Subsystem for Linux)</title><content type="html">&lt;div&gt;&lt;span style="font-size: medium;"&gt;This post shows how to install ns-3.33 in Windows 10 through WSL (Windows Subsystem for Linux)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;This posts works for Windows 11 also (I have tested it on a Windows 11 ISO and it works the Same way as mentioned in the following post.)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;This post will work for ns-3.3x version.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Prerequisites&lt;/b&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Install Windows Subsystem for Linux with GUI: Please refer the following video&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/tmdGaXv30ug" width="320" youtube-src-id="tmdGaXv30ug"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;System Information:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;OS used: Windows 10 and WSL (Ubuntu 20.04)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;GUI: XServer for Windows&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;NS3 Version: ns-3.33&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;See the following complete video on how to install ns3 in Windows 10&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/cPpJ_mJLkzo" width="320" youtube-src-id="cPpJ_mJLkzo"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Step 0 : Open XLaunch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Step 1 :&amp;nbsp; Open WSL using PowerShell and open it as Administrator&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;span style="font-size: medium;"&gt;Command:/&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: large;"&gt;wsl&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;$ xfce4-session&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;The GUI of Ubuntu Opens within Windows 10 OS.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Step 2 : Download ns3 from nsnam.org website through Mozilla Firefox browser&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Step 3: Open a Terminal&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ sudo apt update&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ sudo apt install build-essential autoconf automake libxmu-dev python3-pygraphviz cvs mercurial bzr git cmake p7zip-full python3-matplotlib python-tk python3-dev qt5-qmake qt5-default gnuplot-x11 wireshark&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Step 4: Move the ns3 file from Downloads/ folder to Home folder (/home/pradeepkumar) and unzip it there itself, Right Click -- Extract Here&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Step 5: Go to the terminal that is already open and issue the following commands&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ cd&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ cd ns-allinone-3.33/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ ./build.py --enable-examples --enable-tests&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;It might take 10 to 20 minutes for installing, may be in between there might be errors as well.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Once the installation over, check for the following command for the working of ns3.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ cd ns-3.33&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ ./waf --run hello-simulator&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Also check for first.cc file, move the file from ns-3.33/examples/tutorial. folder to ns-3.33/scratch folder&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ ./waf --run scratch/first&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;You should get 4 lines of output between the client&amp;nbsp;and server interaction&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Then you can try for NetAnim as well as per the video.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;In the first.cc file, include the following lines so work for NetAnim&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;#include "ns3/netanim-module.h"&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;and the following line above the Simulator::Run() function&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;AnimationInterface anim("first.xml");&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;After the above changes, compile the file again using&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;b&gt;$ ./waf --run scratch/first&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;A file named&lt;b&gt;&lt;i&gt; first.xml &lt;/i&gt;&lt;/b&gt;would have created and it can be opened using &lt;span style="font-family: courier;"&gt;NetAnim&lt;/span&gt;. To run NetAnim, try the following:&lt;/div&gt;&lt;div&gt;Open a new Terminal&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;$ cd ns-allinone-3.33/netanim-3.108/&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;$./NetAnim&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open the first.xml file and you can check the output.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;Thanks are watching and please subscribe to my channel and share it to your friends....&lt;/span&gt;&lt;/div&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/5118464015336643924/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/05/installation-of-ns3-in-windows-10-os.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/5118464015336643924" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/5118464015336643924" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/05/installation-of-ns3-in-windows-10-os.html" title="Installation of ns3 in Windows 10 and Windows 11 OS using WSL (Windows Subsystem for Linux)" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/tmdGaXv30ug/default.jpg" height="72" width="72" /><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-8607203262315591462</id><published>2021-05-15T10:13:00.004+05:30</published><updated>2021-05-15T18:15:14.771+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu" /><category scheme="http://www.blogger.com/atom/ns#" term="Windows 10" /><title type="text">How to install Ubuntu within Windows 10 without a Virtual Machine (VM) | WSL</title><content type="html">This post shows you how to install Windows Subsystem for Linux (WSL) in windows 10 operating system.&amp;nbsp;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: x-large;"&gt;Requirements:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Windows 10 OS or Preview Release version of Windows 10. Refer the complete video below on how to install WSL in Windows 10 including how to use Full Linux GUI using XServer for Windows,&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Follow the video for more details on how to do this process:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/tmdGaXv30ug" width="320" youtube-src-id="tmdGaXv30ug"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: large;"&gt;Installing WSL&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are multiple steps involved as given below&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Step 1: Open Windows Power Shell from the Start Menu with Administrative Privileges&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and execute the following commands&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 16px;"&gt;Command prompt:/&amp;gt;&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;dism.exe /online /&lt;/span&gt;&lt;span class="hljs-pscommand" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #0101fd; font-size: 1em; outline-color: inherit;"&gt;enable-feature&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt; /featurename:&lt;/span&gt;&lt;span class="hljs-pscommand" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #0101fd; font-size: 1em; outline-color: inherit;"&gt;Microsoft-Windows&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;-&lt;/span&gt;&lt;span class="hljs-pscommand" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #0101fd; font-size: 1em; outline-color: inherit;"&gt;Subsystem-Linux&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt; /all /norestart&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 16px;"&gt;Command prompt:/&amp;gt;&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 16px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;dism.exe /online /&lt;/span&gt;&lt;span class="hljs-pscommand" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #0101fd; font-size: 1em; outline-color: inherit;"&gt;enable-feature&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt; /featurename:VirtualMachinePlatform /all /norestart&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Step 2: Restart your computer (This step is mandatory)&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Step 3: Download the Linux Kernel Update package for x64 Machine&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace" style="color: #171717;"&gt;&lt;a href="https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi"&gt;https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Double click the above downloaded file and install it. Click Yes if it asks for elevated privileges&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-size: medium;"&gt;Step 4: Set WSL2 as the default version&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt;Command prompt:/&amp;gt; wsl&lt;/span&gt;&lt;span class="hljs-parameter" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #007d9a; font-size: 1em; outline-color: inherit;"&gt; --set-default-version&lt;/span&gt;&lt;span face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="color: #171717; font-size: 1em;"&gt; &lt;/span&gt;&lt;span class="hljs-number" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #171717; font-size: 1em; outline-color: inherit;"&gt;2&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="hljs-number" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #171717; font-size: 1em; outline-color: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="hljs-number" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #171717; outline-color: inherit;"&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Step 5: Install the Linux Distribution of your choice: In MY case I have selected the following link. Its Ubuntu&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="hljs-number" face="SFMono-Regular, Consolas, &amp;quot;Liberation Mono&amp;quot;, Menlo, Courier, monospace" style="box-sizing: inherit; color: #171717; font-size: 1em; outline-color: inherit;"&gt;&lt;a href="https://aka.ms/wslstore"&gt;https://aka.ms/wslstore&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;If the above link is not working, then&amp;nbsp;&lt;/div&gt;&lt;div&gt;Open Windows Store and search for Ubuntu and select as per the screenshot given below&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-P0bbvo_Tq7Q/YJ8qGuZpfMI/AAAAAAACZ7U/Elye7fNzQkklGi-q_hr5-Ciu_SoOcGwKwCNcBGAsYHQ/s2048/Capture.PNG" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="WSL Ubuntu" border="0" data-original-height="1280" data-original-width="2048" height="400" src="https://1.bp.blogspot.com/-P0bbvo_Tq7Q/YJ8qGuZpfMI/AAAAAAACZ7U/Elye7fNzQkklGi-q_hr5-Ciu_SoOcGwKwCNcBGAsYHQ/w640-h400/Capture.PNG" title="WSL Ubuntu" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;WSL Ubuntu&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;After the downloading and installation of the above software, a new command window opens and asks you to enter the preferred username and password for your linux Login. Input both and you are done.&amp;nbsp;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Step 6: Using WSL&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Whenever you want to use Ubuntu within your windows OS, open Power shell and execute the command&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;C:/&amp;gt; wsl&amp;nbsp;&lt;/div&gt;&lt;div&gt;It goes into Linux mode and all the linux commands will work now&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use the following commands to update your system&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$ sudo apt update &amp;amp;&amp;amp; sudo apt -y upgrade&lt;/div&gt;&lt;div&gt;$ sudo apt install build-essential autoconf automake libxmu-dev net-tools&lt;/div&gt;&lt;div&gt;$&amp;nbsp;&lt;span style="background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;sudo apt install xrdp -y &amp;amp;&amp;amp; sudo systemctl enable xrdp&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;b&gt;Step 7: Enabling the GUI for Ubuntu within Windows&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;By default, WSL does not support any GUI, but there are some workaround to support the GUI like xubuntu-desktop or mate desktop, you can use either of these.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open the Powershell&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;Command Prompt:/&amp;gt; wsl&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;$&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;span style="background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;sudo apt install -y tasksel&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;$ &lt;/span&gt;&lt;span style="background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;sudo tasksel install xubuntu-desktop&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;$ &lt;/span&gt;&lt;span style="background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;sudo apt install gtk2-engines&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: #f2f2f2; color: #292929; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;$ nano ~/.bashrc&lt;/div&gt;&lt;div&gt;and paste the following texts in the above file&lt;/div&gt;&lt;div&gt;&lt;pre class="kg kh ki kj kk kl km kn" style="background-color: #f2f2f2; background: rgb(242, 242, 242); box-sizing: inherit; color: rgba(0, 0, 0, 0.8); margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gu ko je fy kp b dn kq kr s ks" data-selectable-paragraph="" id="8b95" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;"&gt;export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0&lt;/span&gt;&lt;span class="gu ko je fy kp b dn kt ku kv kw kx kr s ks" data-selectable-paragraph="" id="f439" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;"&gt;export LIBGL_ALWAYS_INDIRECT=1&lt;/span&gt;&lt;span class="gu ko je fy kp b dn kt ku kv kw kx kr s ks" data-selectable-paragraph="" id="e57e" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: 1.91em; white-space: pre-wrap;"&gt;sudo /etc/init.d/dbus start &amp;amp;&amp;gt; /dev/null&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also create another file as per the command&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$ nano /etc/sudoers.d/dbus&lt;/div&gt;&lt;div&gt;and paste the following line in this file. The username for ubuntu is pradeepkumar in my case, you can use your username in the following statement.&lt;/div&gt;&lt;div&gt;&lt;pre class="kg kh ki kj kk kl km kn" style="background-color: #f2f2f2; background: rgb(242, 242, 242); box-sizing: inherit; color: rgba(0, 0, 0, 0.8); margin-bottom: 0px; margin-top: 56px; overflow-x: auto; padding: 20px;"&gt;&lt;span class="gu ko je fy kp b dn kq kr s ks" data-selectable-paragraph="" id="8951" style="box-sizing: inherit; color: #292929; display: block; font-family: Menlo, Monaco, &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 16px; letter-spacing: -0.022em; line-height: 1.18; margin-bottom: -0.09em; margin-top: -0.09em; white-space: pre-wrap;"&gt;&lt;b&gt;&lt;i&gt;pradeepkumar&lt;/i&gt;&lt;/b&gt; ALL = (root) NOPASSWD: /etc/init.d/dbus&lt;/span&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 8: Download the XServer for Windows 10 (which is free) and helpful in running Ubuntu's GUI applications within Windows.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://sourceforge.net/projects/vcxsrv/"&gt;https://sourceforge.net/projects/vcxsrv/&lt;/a&gt;&lt;/div&gt;&lt;div&gt;Install it by double click and open it afterwards (XLaunch), and follow the below settings as per the screenshots.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-WemudlYb-Ls/YJ9QBWPxclI/AAAAAAACZ7g/fpXOO1fmtoYFbbsUfGzm0VqesrHtXC0PQCNcBGAsYHQ/s998/1.PNG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="784" data-original-width="998" height="502" src="https://1.bp.blogspot.com/-WemudlYb-Ls/YJ9QBWPxclI/AAAAAAACZ7g/fpXOO1fmtoYFbbsUfGzm0VqesrHtXC0PQCNcBGAsYHQ/w640-h502/1.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-ensaXTENveI/YJ9QBQdozXI/AAAAAAACZ7k/Db2oAjcCCqcJPenqWN_1kfHmVehccvqTACNcBGAsYHQ/s998/2.PNG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="784" data-original-width="998" height="502" src="https://1.bp.blogspot.com/-ensaXTENveI/YJ9QBQdozXI/AAAAAAACZ7k/Db2oAjcCCqcJPenqWN_1kfHmVehccvqTACNcBGAsYHQ/w640-h502/2.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-P2N6WumYx-o/YJ9QBENw5ZI/AAAAAAACZ7c/PlJ4kFnA3zA-2oAUl90nLZ6ZEAmx1cCNACNcBGAsYHQ/s998/3.PNG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" data-original-height="784" data-original-width="998" height="502" src="https://1.bp.blogspot.com/-P2N6WumYx-o/YJ9QBENw5ZI/AAAAAAACZ7c/PlJ4kFnA3zA-2oAUl90nLZ6ZEAmx1cCNACNcBGAsYHQ/w640-h502/3.PNG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-size: medium;"&gt;Final Steps:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;Once all the above steps are completed, restart your Windows Machine and from then on, use the following for working with ubuntu:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To open ubuntu from windows, Follow these steps&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Login to windows -&amp;gt;&amp;nbsp;&lt;/div&gt;&lt;div&gt;Open Powershell or Command prompt (either in Administrator mode or normal mode) and type&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style="font-family: courier;"&gt;Command Prompt:/&amp;gt;&amp;nbsp; wsl&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and thats it you are entering the ubuntu OS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;if you want to login with full Linux desktop, use the command&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;i&gt;Command Prompt:/&amp;gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;xfce4-session&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Its good and very powerful, lets use Ubuntu within Windows 10 without any hassles.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please subscribe to my channel and share the video to your near and dears....&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;My YouTube Channel is :&lt;/div&gt;&lt;div&gt;&lt;a href="https://www.youtube.com/tspradeepkumar " target="_blank"&gt;https://www.youtube.com/tspradeepkumar&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NB: I Used the following two links for the above procedure&lt;/div&gt;&lt;div&gt;&lt;a href="https://docs.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps"&gt;Install WSL on Windows 10 | Microsoft Docs&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://medium.com/@japheth.yates/the-complete-wsl2-gui-setup-2582828f4577"&gt;The complete WSL2 + GUI setup. | Medium&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;h2 class="heading-anchor" id="step-6---install-your-linux-distribution-of-choice" style="background-color: white; box-sizing: inherit; color: #171717; font-family: &amp;quot;Segoe UI&amp;quot;, SegoeUI, &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 2.125rem; line-height: 1.3; margin: 32px 0px 12px -1.875rem; outline-color: inherit; padding: 0px 0px 0px 1.875rem; position: relative;"&gt;&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/8607203262315591462/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/05/how-to-install-ubuntu-within-windows-10.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/8607203262315591462" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/8607203262315591462" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/05/how-to-install-ubuntu-within-windows-10.html" title="How to install Ubuntu within Windows 10 without a Virtual Machine (VM) | WSL" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/tmdGaXv30ug/default.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-3408986698523359156</id><published>2021-04-20T09:46:00.000+05:30</published><updated>2021-04-20T09:46:08.348+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><title type="text">BonnMotion - A mobile scenario Generator Tool</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;BonnMotion is a tool that generates scenario for ns2, ns3, qualnet, etc. This will comfortably work with Linux. And in windows, there could be some bugs.&lt;br /&gt;&lt;br /&gt;Please refer the documentation here: h&lt;a href="http://sys.cs.uos.de/bonnmotion/doc/BonnMotion_Docu.pdf" target="_blank"&gt;ttp://sys.cs.uos.de/bonnmotion/doc/BonnMotion_Docu.pdf &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To use this tool for ns2, here are the steps.&lt;br /&gt;Step1 : Download the BonnMotion tool &lt;a href="http://sys.cs.uos.de/bonnmotion/download.shtml" target="_blank"&gt;from this website&lt;/a&gt;&lt;br /&gt;Step 2: Unzip it to home folder (/home/pradeepkumar in my case)&lt;br /&gt;step 3: Here are the commands to install&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$] unzip -d bonnmotion-2.1.3.zip&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$] cd bonnmotion-2.1.3/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;$] ./install&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;The above command will install, if any packages are missing for dependencies, please install it.&lt;br /&gt;&lt;br /&gt;$] Once installed, copy the bonnmotion-2.1.3/bin/bm file to /usr/bin/ for running it anywhere. if not go to bin folder using the command given below&lt;br /&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;$] cd bonnmotion-2.1.3/bin/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To run BonnMotion&lt;br /&gt;&lt;span style="color: red;"&gt;$bonnmotion-2.1.3/bin] ./bm -hm&amp;nbsp;&lt;/span&gt;&lt;br /&gt;(this will list all the models)&lt;br /&gt;&lt;br /&gt;$bonnmotion-2.1.3/bin] ./bm -hm RandomWaypoint&lt;br /&gt;Will display all the parameters for RandomWaypoint like number of nodes, x, y, random seed, etc. &lt;br /&gt;&lt;br /&gt;Assuming RandomWaypoint is the model&lt;br /&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;b&gt;$bonnmotion-2.1.3/bin] ./bm -f scenario RandomWaypoint -n 10 -x 500 -y 500 &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;The above command will create a file called scenario with 10 number of nodes with x and y as 500x500)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;&lt;b&gt;$bonnmotion-2.1.3/bin]&amp;nbsp; ./bm NSFile -f scenario&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;This will create two files called scenario.ns_movements, scenario.ns_params&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;The above two files can be used inside tcl script for ns2 using the source command&lt;br /&gt;&lt;br /&gt;&lt;b&gt;source scenario.ns_params&lt;/b&gt;&lt;br /&gt;&lt;b&gt;source scenario.ns_movements&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;(NB: Please note that the above two files represents nodes like $node_(0), etc and $ns_ as simulator object, either you change these variables within your tcl file or edit the above two files.&amp;nbsp; Also scenario.ns_params file shows the stop script as set val(duration) 600.0, but most of the tcl scripts may have val(stop), so change it to val(duration) in all cases)&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The same will be applied to other simulators also, refer the documentation given in the beginning of the slide.&lt;br /&gt;&lt;br /&gt;Some screenshots for you.:&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-R3mRHEvnRCc/VQMK9cj9G2I/AAAAAAAAIk4/Gw6Y3ihHD14/s1600/Screenshot%2Bfrom%2B2015-03-13%2B20%3A53%3A29.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img border="0" height="360" src="http://4.bp.blogspot.com/-R3mRHEvnRCc/VQMK9cj9G2I/AAAAAAAAIk4/Gw6Y3ihHD14/s1600/Screenshot%2Bfrom%2B2015-03-13%2B20%3A53%3A29.png" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-p5mxQ4Rkg6c/VQMK9qJp0RI/AAAAAAAAIlA/-qEvP5huB2I/s1600/Screenshot%2Bfrom%2B2015-03-13%2B20%3A53%3A15.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Bonnmotion" border="0" height="360" src="http://1.bp.blogspot.com/-p5mxQ4Rkg6c/VQMK9qJp0RI/AAAAAAAAIlA/-qEvP5huB2I/s1600/Screenshot%2Bfrom%2B2015-03-13%2B20%3A53%3A15.png" title="Bonnmotion" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Installing Bonnmotion&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ypptupEPD8Y/VQMK9opKgUI/AAAAAAAAIk8/F0I1BwFTCok/s1600/Screenshot%2Bfrom%2B2015-03-13%2B20%3A54%3A15.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Bonnmotion" border="0" height="360" src="http://4.bp.blogspot.com/-ypptupEPD8Y/VQMK9opKgUI/AAAAAAAAIk8/F0I1BwFTCok/s1600/Screenshot%2Bfrom%2B2015-03-13%2B20%3A54%3A15.png" title="Bonnmotion" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;bm command with options&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-hrqctg6kDs4/VQMK-WNSmcI/AAAAAAAAIlE/VPat7Hbgvho/s1600/Screenshot%2Bfrom%2B2015-03-13%2B21%3A33%3A15.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Bonnmotion" border="0" height="360" src="http://4.bp.blogspot.com/-hrqctg6kDs4/VQMK-WNSmcI/AAAAAAAAIlE/VPat7Hbgvho/s1600/Screenshot%2Bfrom%2B2015-03-13%2B21%3A33%3A15.png" title="Bonnmotion" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;A Sample Tcl file using the script generated by BonnMotion&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a href="https://drive.google.com/open?id=0B4nUSbTYSK4TfmFVTVBiMnU2eU54V0w4OU9Wb0xRM3dBWTJPdjk4YUNRam4xUUxqZVgxZEk&amp;amp;authuser=0" target="_blank"&gt;Download the sample files here&lt;/a&gt;: put all the files in a single folder and run the tcl file using&lt;br /&gt;$] ns ex.tcl&lt;br /&gt;&lt;br /&gt;Provide your comments below, if you need any queries.&lt;br /&gt;&lt;br /&gt;Credits to:&amp;nbsp; &lt;a href="http://sys.cs.uos.de/bonnmotion/index.shtml"&gt;http://sys.cs.uos.de/bonnmotion/index.shtml&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://plus.google.com/u/0/+PradeepkumarTS/"&gt;&amp;nbsp;T S Pradeep Kumar &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/3408986698523359156/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2015/03/bonnmotion-mobile-scenario-generator.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3408986698523359156" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3408986698523359156" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2015/03/bonnmotion-mobile-scenario-generator.html" title="BonnMotion - A mobile scenario Generator Tool" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-R3mRHEvnRCc/VQMK9cj9G2I/AAAAAAAAIk4/Gw6Y3ihHD14/s72-c/Screenshot%2Bfrom%2B2015-03-13%2B20%3A53%3A29.png" height="72" width="72" /><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-4973547863500981010</id><published>2021-04-12T22:21:00.005+05:30</published><updated>2021-04-12T22:25:53.325+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 3" /><category scheme="http://www.blogger.com/atom/ns#" term="NS3" /><title type="text">Link State Routing in NS3 - Wired Network</title><content type="html">&lt;h1 style="text-align: left;"&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;Link state routing in ns3&lt;/span&gt;&lt;/b&gt;&lt;/h1&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;There are two varieties of protocols that deals with wired networks namely distance vector routing and link state routing,&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;As per the wikipedia, Distance-vector routing protocols&lt;span face="sans-serif" style="background-color: white; color: #202122;"&gt;, which work by having each node share its routing table with its neighbours, in a link-state protocol the only information passed between nodes is&amp;nbsp;&lt;/span&gt;&lt;i style="background-color: white; color: #202122; font-family: sans-serif;"&gt;connectivity related&lt;/i&gt;&lt;span face="sans-serif" style="background-color: white; color: #202122;"&gt;. Link-state algorithms are sometimes characterized informally as each router, "telling the world about its neighbors.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; white-space: pre-wrap;"&gt;&lt;span style="font-size: medium;"&gt;This exercise can be one of the lab exercises of many universities in India. There are many more exercises to follow. If one understand this video, they can able to simulate any network design and run it successfully in ns3.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;span face="sans-serif" style="background-color: white; color: #202122;"&gt;&lt;span style="color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;span face="sans-serif" style="background-color: white; color: #202122;"&gt;In this blog post, I am not going to explain the concepts of link state routing, but will explain how to configure the nodes to use link state routing in ns3.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-size: medium;"&gt;&lt;span face="sans-serif" style="background-color: white; color: #202122;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;&lt;span style="background-color: white;"&gt;Please find the video for the source code explanation and compilation in ns3 on link state routing protocol&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="349" src="https://www.youtube.com/embed/dTfJQiEq73Y" width="554" youtube-src-id="dTfJQiEq73Y"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;Here is the step to run the LSR and compile it to get the details.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;Scenario is&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-PzVvCj5ah5c/YHR59ThrZdI/AAAAAAACZ2k/RS2IaEK2goQ3s7GInyOwOtnDJAkYpec2wCNcBGAsYHQ/s1308/IMG_0817.PNG" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="LinkStateRouting" border="0" data-original-height="981" data-original-width="1308" height="480" src="https://1.bp.blogspot.com/-PzVvCj5ah5c/YHR59ThrZdI/AAAAAAACZ2k/RS2IaEK2goQ3s7GInyOwOtnDJAkYpec2wCNcBGAsYHQ/w640-h480/IMG_0817.PNG" title="LinkStateRouting" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Link State Routing (LSR)&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;Here is the source code from GITHUB&amp;nbsp;&lt;b&gt;&lt;a href="https://github.com/tspradeepkumar/ns3"&gt;https://github.com/tspradeepkumar/ns3&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;else you can copy from here:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span face="sans-serif" style="color: #202122; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: #202122; font-family: courier; font-size: medium;"&gt;&lt;b&gt;&lt;div&gt;//Link state routing for Wired Networks, OLSR&amp;nbsp;&lt;/div&gt;&lt;div&gt;#include &amp;lt;iostream&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;fstream&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;string&amp;gt;&lt;/div&gt;&lt;div&gt;#include &amp;lt;cassert&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#include "ns3/core-module.h"&lt;/div&gt;&lt;div&gt;#include "ns3/network-module.h"&lt;/div&gt;&lt;div&gt;#include "ns3/internet-module.h"&lt;/div&gt;&lt;div&gt;#include "ns3/point-to-point-module.h"&lt;/div&gt;&lt;div&gt;#include "ns3/applications-module.h"&lt;/div&gt;&lt;div&gt;#include "ns3/olsr-helper.h"&lt;/div&gt;&lt;div&gt;#include "ns3/ipv4-static-routing-helper.h"&lt;/div&gt;&lt;div&gt;#include "ns3/ipv4-list-routing-helper.h"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#include "ns3/netanim-module.h"&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;using namespace ns3;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NS_LOG_COMPONENT_DEFINE ("SimplePointToPointOlsrExample");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;int&lt;/div&gt;&lt;div&gt;main (int argc, char *argv[])&lt;/div&gt;&lt;div&gt;{&lt;/div&gt;&lt;div&gt;&amp;nbsp; Config::SetDefault ("ns3::OnOffApplication::PacketSize", UintegerValue (210));&lt;/div&gt;&lt;div&gt;&amp;nbsp; Config::SetDefault ("ns3::OnOffApplication::DataRate", StringValue ("448kb/s"));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; CommandLine cmd;&lt;/div&gt;&lt;div&gt;&amp;nbsp; cmd.Parse (argc, argv);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; NS_LOG_INFO ("Create nodes.");&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer c;&lt;/div&gt;&lt;div&gt;&amp;nbsp; c.Create (5);&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer n01 = NodeContainer (c.Get (0), c.Get (1));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer n14 = NodeContainer (c.Get (1), c.Get (4));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer n43 = NodeContainer (c.Get (4), c.Get (3));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer n30 = NodeContainer (c.Get (3), c.Get (0));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer n02 = NodeContainer (c.Get (0), c.Get (2));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer n23 = NodeContainer (c.Get (2), c.Get (3));&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; // Enable OLSR&lt;/div&gt;&lt;div&gt;&amp;nbsp; NS_LOG_INFO ("Enabling OLSR Routing.");&lt;/div&gt;&lt;div&gt;&amp;nbsp; OlsrHelper olsr;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4StaticRoutingHelper staticRouting;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4ListRoutingHelper list;&lt;/div&gt;&lt;div&gt;&amp;nbsp; list.Add (staticRouting, 0);&lt;/div&gt;&lt;div&gt;&amp;nbsp; list.Add (olsr, 10);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; InternetStackHelper internet;&lt;/div&gt;&lt;div&gt;&amp;nbsp; internet.SetRoutingHelper (list); // has effect on the next Install ()&lt;/div&gt;&lt;div&gt;&amp;nbsp; internet.Install (c);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; // We create the channels first without any IP addressing information&lt;/div&gt;&lt;div&gt;&amp;nbsp; NS_LOG_INFO ("Create channels.");&lt;/div&gt;&lt;div&gt;&amp;nbsp; PointToPointHelper p2p;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetDeviceAttribute ("DataRate", StringValue ("10Mbps"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NetDeviceContainer nd01 = p2p.Install (n01);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetChannelAttribute ("Delay", StringValue ("10ms"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NetDeviceContainer nd14 = p2p.Install (n14);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetDeviceAttribute ("DataRate", StringValue ("50Mbps"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetChannelAttribute ("Delay", StringValue ("50ms"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NetDeviceContainer nd43 = p2p.Install (n43);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetDeviceAttribute ("DataRate", StringValue ("5Mbps"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetChannelAttribute ("Delay", StringValue ("5ms"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NetDeviceContainer nd30 = p2p.Install (n30);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetDeviceAttribute ("DataRate", StringValue ("1Mbps"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetChannelAttribute ("Delay", StringValue ("1ms"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NetDeviceContainer nd02 = p2p.Install (n02);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetDeviceAttribute ("DataRate", StringValue ("2Mbps"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.SetChannelAttribute ("Delay", StringValue ("2ms"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NetDeviceContainer nd23 = p2p.Install (n23);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; // Later, we add IP addresses.&lt;/div&gt;&lt;div&gt;&amp;nbsp; NS_LOG_INFO ("Assign IP Addresses.");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4AddressHelper ipv4;&lt;/div&gt;&lt;div&gt;&amp;nbsp; ipv4.SetBase ("10.1.1.0", "255.255.255.0");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4InterfaceContainer i01 = ipv4.Assign (nd01);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; ipv4.SetBase ("10.1.2.0", "255.255.255.0");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4InterfaceContainer i14 = ipv4.Assign (nd14);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; ipv4.SetBase ("10.1.3.0", "255.255.255.0");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4InterfaceContainer i43 = ipv4.Assign (nd43);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; ipv4.SetBase ("10.1.4.0", "255.255.255.0");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4InterfaceContainer i30 = ipv4.Assign (nd30);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; ipv4.SetBase ("10.1.5.0", "255.255.255.0");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4InterfaceContainer i02 = ipv4.Assign (nd02);&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; ipv4.SetBase ("10.1.6.0", "255.255.255.0");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Ipv4InterfaceContainer i23 = ipv4.Assign (nd23);&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; // Create the OnOff application to send UDP datagrams of size&lt;/div&gt;&lt;div&gt;&amp;nbsp; // 210 bytes at a rate of 448 Kb/s&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; NS_LOG_INFO ("Create Applications.");&lt;/div&gt;&lt;div&gt;&amp;nbsp; uint16_t port = 8000;&amp;nbsp; &amp;nbsp;// Discard port (RFC 863)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; OnOffHelper onoff1 ("ns3::UdpSocketFactory",&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;InetSocketAddress (i02.GetAddress (1), port));&lt;/div&gt;&lt;div&gt;&amp;nbsp; onoff1.SetConstantRate (DataRate ("448kb/s"));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; ApplicationContainer onOffApp1 = onoff1.Install (c.Get (1));&lt;/div&gt;&lt;div&gt;&amp;nbsp; onOffApp1.Start (Seconds (10.0));&lt;/div&gt;&lt;div&gt;&amp;nbsp; onOffApp1.Stop (Seconds (20.0));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; // Create packet sinks to receive these packets&lt;/div&gt;&lt;div&gt;&amp;nbsp; PacketSinkHelper sink ("ns3::UdpSocketFactory",&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;InetSocketAddress (Ipv4Address::GetAny (), port));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NodeContainer sinks = NodeContainer (c.Get (2), c.Get (1));&lt;/div&gt;&lt;div&gt;&amp;nbsp; ApplicationContainer sinkApps = sink.Install (sinks);&lt;/div&gt;&lt;div&gt;&amp;nbsp; sinkApps.Start (Seconds (0.0));&lt;/div&gt;&lt;div&gt;&amp;nbsp; sinkApps.Stop (Seconds (21.0));&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; AsciiTraceHelper ascii;&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.EnableAsciiAll (ascii.CreateFileStream ("lsr.tr"));&lt;/div&gt;&lt;div&gt;&amp;nbsp; p2p.EnablePcapAll ("lsr");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;AnimationInterface anim("lsr.xml");&lt;/div&gt;&lt;div&gt;anim.SetConstantPosition(c.Get(0),0.0,50.0);&lt;/div&gt;&lt;div&gt;anim.SetConstantPosition(c.Get(1),50.0,100.0);&lt;/div&gt;&lt;div&gt;anim.SetConstantPosition(c.Get(2),50.0,50.0);&lt;/div&gt;&lt;div&gt;anim.SetConstantPosition(c.Get(3),50.0,0.0);&lt;/div&gt;&lt;div&gt;anim.SetConstantPosition(c.Get(4),100.0,50.0);&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; Simulator::Stop (Seconds (30));&lt;/div&gt;&lt;div&gt;&amp;nbsp; NS_LOG_INFO ("Run Simulation.");&lt;/div&gt;&lt;div&gt;&amp;nbsp; Simulator::Run ();&lt;/div&gt;&lt;div&gt;&amp;nbsp; Simulator::Destroy ();&lt;/div&gt;&lt;div&gt;&amp;nbsp; NS_LOG_INFO ("Done.");&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; return 0;&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;How to Run this file in ns3&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;This file LinkStateRouting.cc have to be stored in ns-3.29/scratch folder&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;open a terminal&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;$ cd ns-allinone-3.29/ns-3.29/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;$ ./waf --run scratch/LinkStaterouting&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;To run network animation&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;Open a new terminal&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;$] cd ns-allinone-3.29/netanim-3.108/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;$] ./NetAnim&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;The output is shown like this&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-r9639GUFxqc/YHR6P3NPy6I/AAAAAAACZ2s/aZSKDZg6TjMz7_BOx7cMvP7oWSksvIuIACNcBGAsYHQ/s1850/lsr.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="LinkStateRouting" border="0" data-original-height="1055" data-original-width="1850" height="364" src="https://1.bp.blogspot.com/-r9639GUFxqc/YHR6P3NPy6I/AAAAAAACZ2s/aZSKDZg6TjMz7_BOx7cMvP7oWSksvIuIACNcBGAsYHQ/w640-h364/lsr.png" title="LinkStateRouting" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Link State Routing&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;Tracemetrics&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;Open a new Terminal&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;$] cd tracemetrics-1.4.0/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier; font-size: medium;"&gt;$] java -jar tracemetrics.jar&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/4973547863500981010/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/04/link-state-routing-in-ns3-wired-network.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4973547863500981010" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4973547863500981010" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/04/link-state-routing-in-ns3-wired-network.html" title="Link State Routing in NS3 - Wired Network" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/dTfJQiEq73Y/default.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-3033034005918353338</id><published>2021-03-08T21:47:00.000+05:30</published><updated>2021-03-08T21:47:07.213+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="TCL" /><category scheme="http://www.blogger.com/atom/ns#" term="Wired network" /><title type="text">TCP Congestion Control using NS2</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Congestion control is one of the performance metrics of TCP protocol. There are so many TCP Versions to control congestion in the network.&lt;br /&gt;NS2 also supports various TCP protocols like TCP Vegas, TCP Reno, TCP, TCP Sack, Full TCP, TCP linux, etc.&lt;br /&gt;&lt;br /&gt;The code can be downloaded from the following link&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;https://drive.google.com/file/d/1EGeJOtqapDIB5NQy5Ar1L7nzPIihSyck/view?usp=sharing&lt;/div&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;Each TCP protocols has different mechanism in controlling the congestion. Some are good at Congestion control, some are good at error ands flow control.&lt;br /&gt;&lt;br /&gt;Before understanding the congestion control, one has to know the congestion window of TCP. TCP has a congestion window (cwnd_ in ns2), this variable affects or predicts the congestion control.&lt;br /&gt;&lt;br /&gt;The value assigned to this variable will alter the congestion control. Here are the files that are of prime importance before dealing with congestion control.&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;~ns-2.35/tcp/tcp.cc&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;~ns-2.35/tcp/tcp.h&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;~ns-2.35/tcl/lib/ns-default.tcl&lt;/span&gt; (In this file, the constant values for all the protocols in ns2 are set)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;For example, the packet size of CBR is 210 by default, this value is represented like this in the ns-default.tcl file.&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;Application/Traffic/CBR set packetSize_ 210&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;if you want to change the packet size of CBR for ns2, you may change the above line to&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;Application/Traffic/CBR set packetSize_ 500&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;which is set to 500 bytes, the above line will affect the entire tcl scripts (the value is changed to 500), instead the packet size can be changed within the TCL file where it is programmed as given below&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;set cbr [new Application/Traffic/CBR]&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;$cbr set packetSize_ 500&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;The above line will change the packet size for this file only. Similarly, the TCP congestion window is set like this&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;Agent/TCP set cwnd_ 0&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;the default value is 0 and you may modify this within the file as given below&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;set tcp [new Agent/TCP]&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;$tcp set cwnd_ 3&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Courier New, Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;To know more about congestion control, please see the video given below for detailed instructions.&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/7RR8yZtc0Vo" width="320" youtube-src-id="7RR8yZtc0Vo"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/6_PINy02_g0" width="320" youtube-src-id="6_PINy02_g0"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="https://plus.google.com/u/0/+PradeepkumarTS/"&gt; T S Pradeep Kumar &lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/3033034005918353338/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2014/06/tcp-congestion-control.html#comment-form" title="3 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3033034005918353338" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3033034005918353338" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2014/06/tcp-congestion-control.html" title="TCP Congestion Control using NS2" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/7RR8yZtc0Vo/default.jpg" height="72" width="72" /><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-2837997495323805342</id><published>2021-01-16T16:56:00.001+05:30</published><updated>2021-01-16T16:56:02.854+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="xgraph" /><title type="text">xgraph in Ubuntu 20.04 | Solved (Issues)</title><content type="html">&lt;div&gt;&lt;b&gt;&lt;span style="font-size: x-large;"&gt;XGRAPH in Ubuntu 20.04&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;xgraph - Standalone application in Ubuntu 20.04&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are two options to use either 32 bit or 64 bit OS, to find what OS instruction set your OS is Using, use the following command&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] uname -a&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;div&gt;Linux pradeepkumar-Latitude-3410 5.8.0-36-generic #40~20.04.1-Ubuntu SMP Wed Jan 6 10:15:55 UTC 2021 &lt;b&gt;&lt;i&gt;x86_64 x86_64 x86_64&lt;/i&gt;&lt;/b&gt; GNU/Linux&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the above output x86_64 indicates its 64 bit, else it may show i686 which indicates its a 32 bit OS&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can watch the complete instruction here on how to do?&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/ViW9dS7JOkg" width="320" youtube-src-id="ViW9dS7JOkg"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] gedit ~/.bashrc&lt;br /&gt;&lt;/span&gt;include the following line in the &lt;b&gt;&lt;i&gt;&lt;span style="font-family: courier;"&gt;.bashrc&lt;/span&gt;&lt;/i&gt;&lt;/b&gt; file (Copy the PAT H of xgraph and paste it in .bashrc)&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt; &amp;nbsp; &amp;nbsp; &lt;span style="font-family: courier;"&gt;alias xgraph=/home/pradeepkumar/XGraph4.38_linux64/bin/xgraph&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;After the above change is made, restart the computer and its set.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$] xgraph&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;A window will be popping up as shown below&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-XimE2d4MFOY/YALMDaw4wZI/AAAAAAACZbs/iTJzqftSDSQGlGOEXb4vfF-3jqMQ7go9QCNcBGAsYHQ/s1076/xgraph.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="xgraph" border="0" data-original-height="649" data-original-width="1076" height="386" src="https://1.bp.blogspot.com/-XimE2d4MFOY/YALMDaw4wZI/AAAAAAACZbs/iTJzqftSDSQGlGOEXb4vfF-3jqMQ7go9QCNcBGAsYHQ/w640-h386/xgraph.png" title="xgraph" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;xgraph&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;How to plot a data file &lt;br /&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;#data.xg&lt;br /&gt;1 3.2 4.3&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;2 4.5 6.9&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;3 9.8 11.9&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;4 10.2 17.6&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;5 7.8 22.2&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To plot the above two curves, the following command can be used&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$] xgraph data.xg&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;But only one curve will be printed, to print two curves use the following command&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$] xgraph -c data.xg data.xg&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;You have selected to read column-oriented data in file 'data.xg'.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;Please select the column numbers for x and y (first column = 1) ? &lt;b&gt;&lt;span style="color: red;"&gt;1 2&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp; Using column 1 against 2.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;You have selected to read column-oriented data in file 'data.xg'.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;Please select the column numbers for x and y (first column = 1) ? &lt;span style="color: red;"&gt;1 3&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&amp;nbsp; Using column 1 against 3.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;10 points read.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;Supply the values of two curves, 1 2 means X axis - 1 st column and Y axis - 2nd column&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The output of the above command will be looking like this&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-311NenwlRcE/YALM_EyL3QI/AAAAAAACZb0/RYs-FOlWX9wwQ5QL5_0m6PgGDcMdsLu-wCNcBGAsYHQ/s1920/xgraph2.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="xgraph" border="0" data-original-height="1080" data-original-width="1920" height="360" src="https://1.bp.blogspot.com/-311NenwlRcE/YALM_EyL3QI/AAAAAAACZb0/RYs-FOlWX9wwQ5QL5_0m6PgGDcMdsLu-wCNcBGAsYHQ/w640-h360/xgraph2.png" title="xgraph" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;xgraph&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For more details you use &lt;span style="font-family: courier;"&gt;https://www.xgraph.org/&lt;/span&gt;&lt;br /&gt;I have used a 64 bit version, 32 bit version also available&amp;nbsp;&lt;br /&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/2837997495323805342/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2021/01/xgraph-in-ubuntu-2004-solved-issues.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2837997495323805342" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2837997495323805342" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2021/01/xgraph-in-ubuntu-2004-solved-issues.html" title="xgraph in Ubuntu 20.04 | Solved (Issues)" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/ViW9dS7JOkg/default.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-3613901656947696219</id><published>2020-12-03T21:46:00.001+05:30</published><updated>2020-12-03T21:46:05.400+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 3" /><category scheme="http://www.blogger.com/atom/ns#" term="NS3" /><title type="text">Installing NS-3.32 in Ubuntu 20.04 </title><content type="html">&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;This is about installing ns version 3.32 in Ubuntu 20.04 LTS. &lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;#ns3&lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt; &lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;#ns3&lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;.32 &lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;#networksimulation&lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;The commands used in the video are given here.  &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: courier;"&gt;$] sudo apt update $] sudo apt install build-essential autoconf automake libxmu-dev python3-pygraphviz cvs mercurial bzr git cmake p7zip-full python3-matplotlib python-tk python3-dev qt5-qmake qt5-default gnuplot-x11 wireshark &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;Download the ns-allinone-3.32.tar.bz2 package from nsnam.org  and copy it to /home/ folder &lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;See the full video for detailed instructions&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/xE1jUh3-mOI" width="320" youtube-src-id="xE1jUh3-mOI"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;Extract it either in GUI or using command  &lt;/span&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;$] tar jxvf ns-allinone-3.32.tar.bz2  $] cd ns-allinone-3.32/ $] ./build.py --enable-examples --enable-tests &lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;The above command will take some time to install all the packages&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;You can see the output as shown below&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Roboto, Noto, sans-serif;"&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-nQDma12xjww/X8kOs5jBnsI/AAAAAAACZS4/hGfVUAnNuGMnApb91Ijq-p58UTq_qhw6gCNcBGAsYHQ/s2048/Screenshot%2B2020-12-03%2Bat%2B9.31.44%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="ns3" border="0" data-original-height="1491" data-original-width="2048" height="466" src="https://1.bp.blogspot.com/-nQDma12xjww/X8kOs5jBnsI/AAAAAAACZS4/hGfVUAnNuGMnApb91Ijq-p58UTq_qhw6gCNcBGAsYHQ/w640-h466/Screenshot%2B2020-12-03%2Bat%2B9.31.44%2BPM.png" title="ns3" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;ns3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;To check whether ns3 installed successfully, use the following commands. &lt;/span&gt;&lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: courier; font-size: 15px; white-space: pre-wrap;"&gt;&lt;b&gt;$] cd ns-3.32/ $] ./waf --run hello-simulator &lt;/b&gt;&lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;You should get the output as Hello Simulator  &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: courier; font-size: 15px; white-space: pre-wrap;"&gt;$] ./waf --run first &lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;This is the example from the ns-3.32/examples/tutorial/first.cc file which will run directly using the above command  But python files have to be moved to scratch folder. Use the following command to move it to scratch folder &lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: courier; font-size: 15px; white-space: pre-wrap;"&gt;$] cp examples/tutorial/second.py scratch/ $] ./waf --pyrun scratch/second.py&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: courier; font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-size: 15px; white-space: pre-wrap;"&gt;The following figure shows the actual output. &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="caret-color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-ufV-TluXmBE/X8kO7Qbw7TI/AAAAAAACZS8/QgoxKyQIvXkXBoeWWjGMdWAlYNZ5EXIwgCNcBGAsYHQ/s2726/Screenshot%2B2020-12-03%2Bat%2B9.32.17%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="ns3" border="0" data-original-height="770" data-original-width="2726" height="180" src="https://1.bp.blogspot.com/-ufV-TluXmBE/X8kO7Qbw7TI/AAAAAAACZS8/QgoxKyQIvXkXBoeWWjGMdWAlYNZ5EXIwgCNcBGAsYHQ/w640-h180/Screenshot%2B2020-12-03%2Bat%2B9.32.17%2BPM.png" title="ns3" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;How to execute python file in ns3&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: courier; font-size: 15px; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;span style="caret-color: rgba(0, 0, 0, 0.87); color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;Thats all&lt;/span&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/3613901656947696219/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/12/installing-ns-332-in-ubuntu-2004.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3613901656947696219" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3613901656947696219" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/12/installing-ns-332-in-ubuntu-2004.html" title="Installing NS-3.32 in Ubuntu 20.04 " /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/xE1jUh3-mOI/default.jpg" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-3917019633769832719</id><published>2020-11-18T18:07:00.001+05:30</published><updated>2020-11-18T18:07:10.108+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 3" /><category scheme="http://www.blogger.com/atom/ns#" term="NS3" /><title type="text">Flying Adhoc Network Simulation (FANET) using NS3</title><content type="html">In this post, we will see how to simulation a Flying Adhoc Network (FANET) simulation using NS3.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Its actually MANET with 3D mobility Model called Gauss Markov Mobility Model.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;See the following video for more details and explanation:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/ORbnY_juH2o" width="320" youtube-src-id="ORbnY_juH2o"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So all the nodes are flying in a 3D Fashion with X axis, Y Axis and Z Axis&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The default values of the three axes are&amp;nbsp;&lt;/div&gt;&lt;div&gt;X axis can be (-100m, 100m)&lt;/div&gt;&lt;div&gt;Y axis can be (-100m, 100m)&lt;br /&gt;&lt;div&gt;Z axis can be (0m, 100m)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We will take the following example for experimenting the Flying Adhoc Networks. To begin with, We use the following parameters for Simulation:&lt;/div&gt;&lt;div&gt;The name of the File is &lt;b&gt;&lt;span style="font-family: courier;"&gt;fanetex.cc&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); font-family: &amp;quot;Andale Mono&amp;quot;, &amp;quot;Lucida Console&amp;quot;, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code style="word-wrap: normal;"&gt;#include "ns3/point-to-point-module.h"&lt;br /&gt;#include "ns3/ipv4-global-routing-helper.h"&lt;br /&gt;#include &amp;lt;fstream&amp;gt;&lt;fstream&gt;&lt;br /&gt;#include &amp;lt;string&amp;gt;&lt;string&gt;&lt;br /&gt;#include "ns3/core-module.h"&lt;br /&gt;#include "ns3/network-module.h"&lt;br /&gt;#include "ns3/applications-module.h"&lt;br /&gt;#include "ns3/mobility-module.h"&lt;br /&gt;#include "ns3/config-store-module.h"&lt;br /&gt;#include "ns3/wifi-module.h"&lt;br /&gt;&lt;br /&gt;#include "ns3/aodv-helper.h"&lt;br /&gt;#include "ns3/internet-module.h"&lt;br /&gt;#include "ns3/netanim-module.h"&lt;br /&gt;&lt;br /&gt;using namespace ns3;&lt;br /&gt;NS_LOG_COMPONENT_DEFINE ("Mob");&lt;br /&gt;&lt;br /&gt;int main (int argc, char *argv[])&lt;br /&gt;{&lt;br /&gt;  CommandLine cmd;&lt;br /&gt;  cmd.Parse (argc, argv);&lt;br /&gt; &lt;br /&gt;  NodeContainer c;&lt;br /&gt;  c.Create (20); //20 wireless nodes&lt;br /&gt;&lt;br /&gt; WifiHelper wifi;&lt;br /&gt;wifi.SetStandard (WIFI_PHY_STANDARD_80211b);&lt;br /&gt;//80211a, 80211b, 80211n, 2.4g and 5G, 80211ac, 80211ax is also supported.80211p (VANETs, WAVE)&lt;br /&gt;&lt;br /&gt;  WifiMacHelper mac;&lt;br /&gt;  mac.SetType ("ns3::AdhocWifiMac");&lt;br /&gt;  //AdhocWifiMac, StaWifiMac, ApWifiMac&lt;br /&gt;  wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",&lt;br /&gt;                                "DataMode", StringValue ("OfdmRate54Mbps"));&lt;br /&gt;  YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();&lt;br /&gt;  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();&lt;br /&gt;  wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");&lt;br /&gt;  wifiChannel.AddPropagationLoss ("ns3::FriisPropagationLossModel");&lt;br /&gt;  wifiPhy.SetChannel (wifiChannel.Create ());&lt;br /&gt;  NetDeviceContainer cDevices = wifi.Install (wifiPhy, mac, c);&lt;br /&gt; //&lt;br /&gt;  NS_LOG_INFO ("Enabling AODV routing on all backbone nodes");&lt;br /&gt;  AodvHelper aodv;&lt;br /&gt;  //AODV protocol is being using FANETs.&lt;br /&gt;  InternetStackHelper internet;&lt;br /&gt;  internet.SetRoutingHelper (aodv); // has effect on the next Install ()&lt;br /&gt;  internet.Install (c);&lt;br /&gt;&lt;br /&gt;  //&lt;br /&gt;  // Assign IPv4 addresses to the device drivers (actually to the associated&lt;br /&gt;  // IPv4 interfaces) we just created.&lt;br /&gt;  //&lt;br /&gt;  Ipv4AddressHelper ipAddrs;&lt;br /&gt;  ipAddrs.SetBase ("192.168.0.0", "255.255.255.0");&lt;br /&gt;  Ipv4InterfaceContainer cInterfaces;&lt;br /&gt;  cInterfaces=ipAddrs.Assign (cDevices);&lt;br /&gt;  &lt;br /&gt;&lt;span style="color: red;"&gt; /*&lt;br /&gt;//Mobility Model - 2D&lt;br /&gt;MobilityHelper mobility;&lt;br /&gt;&lt;br /&gt;mobility.SetPositionAllocator ("ns3::GridPositionAllocator",&lt;br /&gt;  "MinX", DoubleValue (0.0),&lt;br /&gt;  "MinY", DoubleValue (0.0),&lt;br /&gt;  "DeltaX", DoubleValue (5.0),&lt;br /&gt;  "DeltaY", DoubleValue (10.0),&lt;br /&gt;  "GridWidth", UintegerValue (3),&lt;br /&gt;  "LayoutType", StringValue ("RowFirst"));&lt;br /&gt;&lt;br /&gt;mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",  "Bounds", RectangleValue (Rectangle (-100, 100, -100, 100)));&lt;br /&gt;mobility.Install (c);&lt;br /&gt; */&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;b&gt;&lt;span style="color: #3d85c6;"&gt;//Mobility Model -3D&lt;br /&gt; MobilityHelper mobility;&lt;br /&gt;mobility.SetMobilityModel ("ns3::GaussMarkovMobilityModel",&lt;br /&gt;  "Bounds", BoxValue (Box (0, 100, 0, 100, 0, 100)),&lt;br /&gt;  "TimeStep", TimeValue (Seconds (0.5)),&lt;br /&gt;  "Alpha", DoubleValue (0.85),&lt;br /&gt;  "MeanVelocity", StringValue ("ns3::UniformRandomVariable[Min=800|Max=1200]"),&lt;br /&gt;  "MeanDirection", StringValue ("ns3::UniformRandomVariable[Min=0|Max=6.283185307]"),&lt;br /&gt;  "MeanPitch", StringValue ("ns3::UniformRandomVariable[Min=0.05|Max=0.05]"),&lt;br /&gt;  "NormalVelocity", StringValue ("ns3::NormalRandomVariable[Mean=0.0|Variance=0.0|Bound=0.0]"),&lt;br /&gt;  "NormalDirection", StringValue ("ns3::NormalRandomVariable[Mean=0.0|Variance=0.2|Bound=0.4]"),&lt;br /&gt;  "NormalPitch", StringValue ("ns3::NormalRandomVariable[Mean=0.0|Variance=0.02|Bound=0.04]"));&lt;br /&gt;mobility.SetPositionAllocator ("ns3::RandomBoxPositionAllocator",&lt;br /&gt;  "X", StringValue ("ns3::UniformRandomVariable[Min=0|Max=100]"),&lt;br /&gt;  "Y", StringValue ("ns3::UniformRandomVariable[Min=0|Max=100]"),&lt;br /&gt;  "Z", StringValue ("ns3::UniformRandomVariable[Min=0|Max=100]"));&lt;br /&gt;mobility.Install (c);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt; UdpEchoServerHelper echoServer (9);&lt;br /&gt;&lt;br /&gt;  ApplicationContainer serverApps = echoServer.Install (c.Get(0));&lt;br /&gt;  serverApps.Start (Seconds (1.0));&lt;br /&gt;  serverApps.Stop (Seconds (10.0));&lt;br /&gt;&lt;br /&gt; UdpEchoClientHelper echoClient (cInterfaces.GetAddress(0), 9);&lt;br /&gt;  echoClient.SetAttribute ("MaxPackets", UintegerValue (1));&lt;br /&gt;  echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));&lt;br /&gt;  echoClient.SetAttribute ("PacketSize", UintegerValue (1024));&lt;br /&gt;&lt;br /&gt;  ApplicationContainer clientApps = echoClient.Install (c.Get(1));&lt;br /&gt;  clientApps.Start (Seconds (2.0));&lt;br /&gt;  clientApps.Stop (Seconds (10.0));&lt;br /&gt;&lt;br /&gt;wifiPhy.EnablePcapAll ("Fanet3D"); //Packet Capture.&lt;br /&gt;//Network Animation using NetAnim.&lt;br /&gt;AnimationInterface anim("Fanet3D.xml");&lt;br /&gt;//Ascii Trace Metrics can be processed using Tracemetrics Software.&lt;br /&gt;AsciiTraceHelper ascii;&lt;br /&gt;wifiPhy.EnableAsciiAll(ascii.CreateFileStream("Fanet3D.tr"));&lt;br /&gt;&lt;br /&gt;  Simulator::Stop (Seconds (10.0));&lt;br /&gt;  Simulator::Run ();&lt;br /&gt;  Simulator::Destroy ();&lt;br /&gt;  return 0;&lt;br /&gt;}&lt;br /&gt;       &lt;/string&gt;&lt;/fstream&gt;&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt; The source code above explains the Flying Adhoc Networks in 3D using the Gauss Markov model. The RED code indicates its a 2D model and the BLUE code indicates the 3D mobility model.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;How to run this file:&lt;/div&gt;&lt;div&gt;Step 1: Copy the above file in the folder &lt;span style="font-family: courier;"&gt;~ns-3.31/scratch&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Step 2: Open the terminal&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] cd ns-allinone-3.31/ns-3.31/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] ./waf --run scratch/fanetex&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To See the animation:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] ../netanim-3.108/NetAnim&lt;/span&gt;&lt;/div&gt;&lt;div&gt;and do as per the instructions in the video&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-D9UuylEHZvY/X7UVMlrFpUI/AAAAAAACZO0/NnkZYjffe1gJiranyUqhZaQQtoIqc1ROgCNcBGAsYHQ/s1440/Screenshot%2Bfrom%2B2020-11-18%2B04-23-38.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="NetAnim" border="0" data-original-height="900" data-original-width="1440" height="400" src="https://1.bp.blogspot.com/-D9UuylEHZvY/X7UVMlrFpUI/AAAAAAACZO0/NnkZYjffe1gJiranyUqhZaQQtoIqc1ROgCNcBGAsYHQ/w640-h400/Screenshot%2Bfrom%2B2020-11-18%2B04-23-38.png" title="NetAnim" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;NetAnim&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/3917019633769832719/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/11/flying-adhoc-network-simulation-fanet.html#comment-form" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3917019633769832719" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3917019633769832719" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/11/flying-adhoc-network-simulation-fanet.html" title="Flying Adhoc Network Simulation (FANET) using NS3" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/ORbnY_juH2o/default.jpg" height="72" width="72" /><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-3111751171079504840</id><published>2020-11-16T15:23:00.002+05:30</published><updated>2020-11-16T15:23:31.005+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 3" /><category scheme="http://www.blogger.com/atom/ns#" term="NS3" /><title type="text">Installing NS-3.31 in Ubuntu 20.04</title><content type="html">&lt;div&gt;Installing ns-3.31 in Ubuntu 20.04 - 64 bit OS.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Follow the full video for more details:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/KaA6GiP8deQ" width="320" youtube-src-id="KaA6GiP8deQ"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Fresh installation of Ubuntu OS&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] sudo apt update&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] sudo apt install build-essential autoconf automake libxmu-dev&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] sudo apt install build-essential autoconf automake libxmu-dev python-pygraphviz cvs mercurial bzr git cmake p7zip-full python-matplotlib python-tk python-dev python-kiwi python-gnome2 python-gnome2-desktop qt4-dev-tools qt4-qmake qt4-qmake qt4-default gnuplot-x11 wireshark&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;extract to &lt;span style="font-family: courier;"&gt;/home/pradeepkumar&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] echo $HOME&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] cd ns-allinone-3.31/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] ./build.py --enable-examples --enable-tests&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;you will get the following screen after the installation&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-lZGd9x_0fbs/X7JLbh5UxOI/AAAAAAACZOU/fK3hI4nKHR8XAmrkHw0tXxuxlgqt-RN_gCNcBGAsYHQ/s1440/oie_1610492UVEBB04y.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="NS3.31" border="0" data-original-height="900" data-original-width="1440" height="400" src="https://1.bp.blogspot.com/-lZGd9x_0fbs/X7JLbh5UxOI/AAAAAAACZOU/fK3hI4nKHR8XAmrkHw0tXxuxlgqt-RN_gCNcBGAsYHQ/w640-h400/oie_1610492UVEBB04y.png" title="ns3.31" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] cd ns-allinone-3.31/ns-3.31/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] ./waf --run hello-simulator&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;This will display&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;"Hello Simulator"&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Which indicates that ns3 is installed successfully.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] ./waf --run first&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/3111751171079504840/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/11/installing-ns-331-in-ubuntu-2004.html#comment-form" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3111751171079504840" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/3111751171079504840" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/11/installing-ns-331-in-ubuntu-2004.html" title="Installing NS-3.31 in Ubuntu 20.04" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/KaA6GiP8deQ/default.jpg" height="72" width="72" /><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-4602798963621921721</id><published>2020-11-10T11:14:00.001+05:30</published><updated>2020-11-10T11:14:37.540+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="SDN" /><title type="text">Software Defined Networking Architecture (SDN)</title><content type="html">&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/3Z4Df3AUJUQCOs" width="595" height="485" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px; margin-bottom:5px; max-width: 100%;" allowfullscreen&gt; &lt;/iframe&gt; &lt;div style="margin-bottom:5px"&gt; &lt;strong&gt; &lt;a href="//www.slideshare.net/tspradeepkumar/software-define-networking-sdn" title="Software Define Networking (SDN)" target="_blank"&gt;Software Define Networking (SDN)&lt;/a&gt; &lt;/strong&gt; from &lt;strong&gt;&lt;a href="//www.slideshare.net/tspradeepkumar" target="_blank"&gt;Dr. Pradeep Kumar TS, PhD&lt;/a&gt;&lt;/strong&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/4602798963621921721/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/11/software-defined-networking.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4602798963621921721" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4602798963621921721" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/11/software-defined-networking.html" title="Software Defined Networking Architecture (SDN)" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-2207310250332652021</id><published>2020-09-15T21:13:00.000+05:30</published><updated>2020-09-15T21:13:01.332+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><title type="text">Ant Colony algorithm using NS2</title><content type="html">&lt;div&gt;Ant Colony Algorithm in NS2 for Wired Networks.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please follow the video for full instructions&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/Ud_egvqju_M" width="320" youtube-src-id="Ud_egvqju_M"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am running in Ubuntu 20.04&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/--X-HOKK0bfY/X2Dghy1te8I/AAAAAAACY48/Ky59VWUeg1cFx0yGATPcY--tfo6KJJDJgCNcBGAsYHQ/s1280/Social%2BMedia%2BManagement.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Ant Colony" border="0" data-original-height="720" data-original-width="1280" height="360" src="https://1.bp.blogspot.com/--X-HOKK0bfY/X2Dghy1te8I/AAAAAAACY48/Ky59VWUeg1cFx0yGATPcY--tfo6KJJDJgCNcBGAsYHQ/w640-h360/Social%2BMedia%2BManagement.PNG" title="Ant Colony" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;There are multiple files in Ant Colony (we use a protocol called Antnet) which i have already included in my blog called&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;https://www.nsnam.com&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Lets go to my Blog. And Search for Ant Colony and Download the complete folder AntNet as shown in the video.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now Copy paste the files in their corresponding location:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;My Location if ns2 is&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;b&gt;/home/pradeepkumar/ns-allinone-2.35/ns-2.35/&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Inside this folder, the files have to be pasted in differnet sub folders...&amp;nbsp;&lt;/div&gt;&lt;div&gt;Let me show you one by one...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;cmu-trace.cc and cmu-trace.h&lt;/span&gt; have to be pasted to ~trace/&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;drop-tail.cc and drop-tail.h&lt;/span&gt; ---- ~queue/&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;Makefile.in&lt;/span&gt; to be replaced in the ns-2.35/ folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;ns-default.tcl, ns-lib.tcl and ns-packet.tcl &lt;/span&gt;to be pasted at&amp;nbsp;&lt;/div&gt;&lt;div&gt;~tcl/lib&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;packet.h&lt;/span&gt; to be replaced at common/ folder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;priqueue.cc and priqueue.h&lt;/span&gt; to be pasted at queue/&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;antnet&lt;/span&gt;/ folder have to be copied to ns-2.35/ folder (this is very important as this is the main algorithm.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 2:&amp;nbsp;&lt;/div&gt;&lt;div&gt;Change the GCC and G++ compiler in the Makefile.in as this is very important, else you might get errors if you leave the default GCC.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Please refer my following video on how to install ns2.35 in ubuntu 20.04.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open Makefile.in&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Change the following lines as given below&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;CC&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;= gcc-4.8&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;CPP&lt;span style="white-space: pre;"&gt;	&lt;/span&gt;= g++-4.8&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;Step 3: Now Compile it&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;Open a Terminal.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] cd ns-allinone-2.35/ns-2.35/&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] ./configure&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] make clean&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: courier;"&gt;$] make&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This might take some time based on the speed of your computer.&lt;/div&gt;&lt;div&gt;Without errors, successfully installed....&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 4:&amp;nbsp;&lt;/div&gt;&lt;div&gt;Now lets understand the algorithm and packet structure.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 5:&lt;/div&gt;&lt;div&gt;Running the TCL File.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;$] ns simpleant.tcl&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We got three files simple.tr and simple.nam and rtable.txt&lt;/div&gt;&lt;div&gt;https://www.nsnam.com/2014/11/app-tool-for-analysing-tracefiles-for.html?q=ant+colony&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Use of APP Tool Master.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;URLs&lt;/div&gt;&lt;div&gt;Ant Colony Algorithm&lt;/div&gt;&lt;div&gt;https://www.nsnam.com/2015/03/ant-colony-algorithm-antnet-in-ns-235.html&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;APP Tools to analyse trace files.&lt;/div&gt;&lt;div&gt;https://www.nsnam.com/2014/11/app-tool-for-analysing-tracefiles-for.html&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To download the Ant colony algorithm&lt;/div&gt;&lt;div&gt;https://drive.google.com/drive/folders/0B4nUSbTYSK4TflVJRDVXQ1QzTUo0bUJWUlAyZkx4UFdzQzJhYkpvWXU5N0k4QlE5Yl9tOFE&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks for watching my video...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/2207310250332652021/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/09/ant-colony-algorithm-using-ns2.html#comment-form" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2207310250332652021" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/2207310250332652021" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/09/ant-colony-algorithm-using-ns2.html" title="Ant Colony algorithm using NS2" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/Ud_egvqju_M/default.jpg" height="72" width="72" /><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-4594886684180666896</id><published>2020-08-29T14:55:00.002+05:30</published><updated>2020-08-29T14:55:44.911+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Network Simulator 2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Lecture Series" /><category scheme="http://www.blogger.com/atom/ns#" term="NS2 Tutorial" /><title type="text">Complete NS2 Tutorial </title><content type="html">&lt;div&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Complete NS2 Tutorial&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;To benefit the various students and research scholars who are working in NS2 (Network Simulator 2), this NS2 Tutorial will help you in understanding the basics of NS2 and you can accomplish most of the your simulation using this software.&amp;nbsp;&lt;div&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Total Duration of the Videos: 11 Hours&amp;nbsp;&lt;/div&gt;&lt;div&gt;Total Lectures - 25 (More will be added to the following list)&lt;/div&gt;&lt;div&gt;To view the Lectures, &lt;a href="https://www.youtube.com/watch?v=k_lfL93zDNQ&amp;amp;list=PLX6MKaDw0naZBi0R-6_IAuYA9Yk_yuyXp" target="_blank"&gt;Click here &lt;/a&gt;to go the Playlist in my Youtube Channel.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;a href="https://www.youtube.com/watch?v=k_lfL93zDNQ&amp;amp;list=PLX6MKaDw0naZBi0R-6_IAuYA9Yk_yuyXp"&gt;https://www.youtube.com/watch?v=k_lfL93zDNQ&amp;amp;list=PLX6MKaDw0naZBi0R-6_IAuYA9Yk_yuyXp&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-QO11t_jWetE/X0oeJnsmZsI/AAAAAAACYvs/K1pJFYreBOIRFDZ2Q5CIyLbde8HNMh3ggCNcBGAsYHQ/s661/NS2Lecture.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="NS2 Tutorial" border="0" data-original-height="661" data-original-width="530" height="640" src="https://1.bp.blogspot.com/-QO11t_jWetE/X0oeJnsmZsI/AAAAAAACYvs/K1pJFYreBOIRFDZ2Q5CIyLbde8HNMh3ggCNcBGAsYHQ/w513-h640/NS2Lecture.png" title="NS2 Tutorial" width="513" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/4594886684180666896/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/08/complete-ns2-tutorial.html#comment-form" title="13 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4594886684180666896" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4594886684180666896" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/08/complete-ns2-tutorial.html" title="Complete NS2 Tutorial " /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-QO11t_jWetE/X0oeJnsmZsI/AAAAAAACYvs/K1pJFYreBOIRFDZ2Q5CIyLbde8HNMh3ggCNcBGAsYHQ/s72-w513-h640-c/NS2Lecture.png" height="72" width="72" /><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-1806594181514280681</id><published>2020-07-19T21:12:00.002+05:30</published><updated>2020-07-19T21:40:55.942+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Moodle" /><title type="text">How to enable Course Outcomes in Moodle | Moodle 3.9</title><content type="html">&lt;div&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;#Moodle #ELearning #PradeepKumarTS  This post is to enable Course outcomes or Learning Outcomes in Moodle Learning Management Systems. This is for Faculty Members or one who teach a course.  Steps:  1. Login to Moodle with your username and Password. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-v7KpzBDIWSk/XxRvLoPI3tI/AAAAAAACYmg/26b6_I-KxrQPn9weF9i4Ozvn3dfT4WLHwCNcBGAsYHQ/s844/Screenshot%2B2020-07-19%2Bat%2B9.14.47%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Moodle Login" border="0" data-original-height="467" data-original-width="844" height="345" src="https://1.bp.blogspot.com/-v7KpzBDIWSk/XxRvLoPI3tI/AAAAAAACYmg/26b6_I-KxrQPn9weF9i4Ozvn3dfT4WLHwCNcBGAsYHQ/w625-h345/Screenshot%2B2020-07-19%2Bat%2B9.14.47%2BPM.png" title="Moodle Login" width="625" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;2. Go to Your Course --  Click the Settings ICON -- Click "Outcomes" and select the outcomes of your course. (there will be all course outcomes, select the three or four outcomes of your course and Click Add button so that the Outcomes will be copied from Right to Left )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-PyX0PC5bf4I/XxRv1ujlftI/AAAAAAACYmo/OTwdIEzey9g1eAnwZPfzxLhja8v5pOA0ACNcBGAsYHQ/s1440/2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Moodle Outcomes" border="0" data-original-height="900" data-original-width="1440" height="391" src="https://1.bp.blogspot.com/-PyX0PC5bf4I/XxRv1ujlftI/AAAAAAACYmo/OTwdIEzey9g1eAnwZPfzxLhja8v5pOA0ACNcBGAsYHQ/w625-h391/2.png" title="Moodle Outcomes" width="625" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-59-WDoKHCUc/XxRv1xqwsmI/AAAAAAACYms/Y4e_xLRjO_IB6inPDYdy8iyVaPVk1Fw1gCNcBGAsYHQ/s1440/3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="Moodle Outcomes" border="0" data-original-height="900" data-original-width="1440" height="391" src="https://1.bp.blogspot.com/-59-WDoKHCUc/XxRv1xqwsmI/AAAAAAACYms/Y4e_xLRjO_IB6inPDYdy8iyVaPVk1Fw1gCNcBGAsYHQ/w625-h391/3.png" title="Moodle Outcomes" width="625" /&gt;&lt;/a&gt;&lt;/div&gt; 3. Once done, give any activities to the students -- you can see a outcome menu and select the corresponding outcome(s) that the student or learner can attain by doing that activity.  4. During evaluation, You can evaluate the outcomes as well (There will be rubrics like Excellent, Very Good, Good, Average and Fair). The Administrator can customise the above Rubrics according to their convenience.  Excellent - 5 point and Fair is 1 point.  5. During the end semester, the grade report can be downloaded with outcomes as well as indicated in the Video. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="https://1.bp.blogspot.com/-ZvsG--JYYHs/XxRv2eNqttI/AAAAAAACYm0/lr6KyL4q-KcYRKy6htlS413w7Ern5HWaACNcBGAsYHQ/s1440/5.png" imageanchor="1" style="background-color: white; font-family: Roboto, Noto, sans-serif; font-size: 15px; margin-left: 1em; margin-right: 1em; text-align: center; white-space: pre-wrap;"&gt;&lt;img alt="Outcomes Report" border="0" data-original-height="900" data-original-width="1440" height="391" src="https://1.bp.blogspot.com/-ZvsG--JYYHs/XxRv2eNqttI/AAAAAAACYm0/lr6KyL4q-KcYRKy6htlS413w7Ern5HWaACNcBGAsYHQ/w625-h391/5.png" title="Outcomes Report" width="625" /&gt;&lt;/a&gt;&lt;span style="background-color: white; color: rgba(0, 0, 0, 0.87); font-family: Roboto, Noto, sans-serif; font-size: 15px; white-space: pre-wrap;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;iframe allowfullscreen="" class="BLOG_video_class" height="266" src="https://www.youtube.com/embed/_5fcz_xme4E" width="320" youtube-src-id="_5fcz_xme4E"&gt;&lt;/iframe&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/1806594181514280681/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/07/how-to-enable-course-outcomes-in-moodle.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/1806594181514280681" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/1806594181514280681" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/07/how-to-enable-course-outcomes-in-moodle.html" title="How to enable Course Outcomes in Moodle | Moodle 3.9" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-v7KpzBDIWSk/XxRvLoPI3tI/AAAAAAACYmg/26b6_I-KxrQPn9weF9i4Ozvn3dfT4WLHwCNcBGAsYHQ/s72-w625-h345-c/Screenshot%2B2020-07-19%2Bat%2B9.14.47%2BPM.png" height="72" width="72" /><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-4622534802681518206</id><published>2020-06-22T23:38:00.003+05:30</published><updated>2020-06-22T23:38:40.152+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Analytics" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title type="text">How to read a CSV file in R | Lecture 4</title><content type="html">&lt;font size="6"&gt;How to read a CSV file in R&lt;/font&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;CSV is called as Comma Separated Value file which can be easily generated using any spreadsheet application like OpenOffice, LibreOffice, MS Office, etc...&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can also create csv files using any text editor as well as given below.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Create a csv file as per the format given below:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;Name, Age, Science, Maths, Social&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;Kumar,14,57,67,78&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;Anand,24,98,97,90&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;Balakumar, 25,35,45,56&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To read this file&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&amp;gt; mydata=read.csv("users.csv");&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&amp;gt;&amp;nbsp;mydata&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;name age science maths social&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;1 &amp;nbsp; &amp;nbsp; kumar &amp;nbsp;14 &amp;nbsp; &amp;nbsp; &amp;nbsp;57 &amp;nbsp; &amp;nbsp;67 &amp;nbsp; &amp;nbsp; 78&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;2 &amp;nbsp; &amp;nbsp; Anand &amp;nbsp;24 &amp;nbsp; &amp;nbsp; &amp;nbsp;98 &amp;nbsp; &amp;nbsp;97 &amp;nbsp; &amp;nbsp; 90&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;3 Balakumar &amp;nbsp;25 &amp;nbsp; &amp;nbsp; &amp;nbsp;35 &amp;nbsp; &amp;nbsp;45 &amp;nbsp; &amp;nbsp; 56&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;To create a new file,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;span style="background-color: white; font-size: 17px;"&gt;df &amp;lt;- data.frame(name = c("Jon", "Bill", "Maria"),&amp;nbsp;&lt;/span&gt;&lt;span style="background-color: white; font-size: 17px;"&gt;age = c(23, 41, 32), science=c(20,30,40), maths=c(56,67,78), social=c(98,76,65))&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: 17px;"&gt;&lt;font face="courier"&gt;write.csv(df,"anewfile.csv", row.names = FALSE)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="background-color: white; font-size: 17px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-Hu295SGeixM/XvDzhpHIOeI/AAAAAAACX9Q/xCrLT7_nIlQ9Vj39r_RlTqL8-Gc6UOvnQCK4BGAsYHg/s681/Screenshot%2B2020-06-22%2Bat%2B11.37.44%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="CSV file in R" border="0" data-original-height="485" data-original-width="681" height="456" src="https://1.bp.blogspot.com/-Hu295SGeixM/XvDzhpHIOeI/AAAAAAACX9Q/xCrLT7_nIlQ9Vj39r_RlTqL8-Gc6UOvnQCK4BGAsYHg/w640-h456/Screenshot%2B2020-06-22%2Bat%2B11.37.44%2BPM.png" title="CSV file in R" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/4622534802681518206/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/06/how-to-read-csv-file-in-r-lecture-4.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4622534802681518206" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4622534802681518206" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/06/how-to-read-csv-file-in-r-lecture-4.html" title="How to read a CSV file in R | Lecture 4" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-Hu295SGeixM/XvDzhpHIOeI/AAAAAAACX9Q/xCrLT7_nIlQ9Vj39r_RlTqL8-Gc6UOvnQCK4BGAsYHg/s72-w640-h456-c/Screenshot%2B2020-06-22%2Bat%2B11.37.44%2BPM.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-4094385179464181644</id><published>2020-06-22T21:27:00.000+05:30</published><updated>2020-06-22T21:27:51.954+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Analytics" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title type="text">Arrays and Matrices in R | Lecture 3</title><content type="html">&lt;font size="6"&gt;Arrays and Matrices in R&lt;/font&gt;&lt;div&gt;Arrays are declared in R using the dim() or array() functions.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For example:&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; mycarsale.array&amp;lt;-1:30&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; mycarsale.array&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;nbsp;[1] &amp;nbsp;1 &amp;nbsp;2 &amp;nbsp;3 &amp;nbsp;4 &amp;nbsp;5 &amp;nbsp;6 &amp;nbsp;7 &amp;nbsp;8 &amp;nbsp;9 10 11 12 13 14 15 16&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;[17] 17 18 19 20 21 22 23 24 25 26 27 28 29 30&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The above command allocates a vector of 1 to 30 to the variable array called mycarsale.array&amp;nbsp;&lt;/div&gt;&lt;div&gt;To make it as a matrix, we can use dim() function as given below&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; dim(mycarsale.array)&amp;lt;-c(3,5,2)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; mycarsale.array&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;, , 1&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[,1] [,2] [,3] [,4] [,5]&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;[1,] &amp;nbsp; &amp;nbsp;1 &amp;nbsp; &amp;nbsp;4 &amp;nbsp; &amp;nbsp;7 &amp;nbsp; 10 &amp;nbsp; 13&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;[2,] &amp;nbsp; &amp;nbsp;2 &amp;nbsp; &amp;nbsp;5 &amp;nbsp; &amp;nbsp;8 &amp;nbsp; 11 &amp;nbsp; 14&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;[3,] &amp;nbsp; &amp;nbsp;3 &amp;nbsp; &amp;nbsp;6 &amp;nbsp; &amp;nbsp;9 &amp;nbsp; 12 &amp;nbsp; 15&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;, , 2&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[,1] [,2] [,3] [,4] [,5]&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;[1,] &amp;nbsp; 16 &amp;nbsp; 19 &amp;nbsp; 22 &amp;nbsp; 25 &amp;nbsp; 28&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;[2,] &amp;nbsp; 17 &amp;nbsp; 20 &amp;nbsp; 23 &amp;nbsp; 26 &amp;nbsp; 29&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;[3,] &amp;nbsp; 18 &amp;nbsp; 21 &amp;nbsp; 24 &amp;nbsp; 27 &amp;nbsp; 30&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In the above output 3 indicates the number of columns, 5 indicate the number of columns and 2 indicates the number of tables.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-WHAER64gqhE/XvDUucqRGII/AAAAAAACX80/rsUrhLlrky8kKfJnjVW2tF70q3xnU-SSwCK4BGAsYHg/s769/Screenshot%2B2020-06-22%2Bat%2B9.25.29%2BPM.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="Array in R" border="0" data-original-height="769" data-original-width="762" height="640" src="https://1.bp.blogspot.com/-WHAER64gqhE/XvDUucqRGII/AAAAAAACX80/rsUrhLlrky8kKfJnjVW2tF70q3xnU-SSwCK4BGAsYHg/w634-h640/Screenshot%2B2020-06-22%2Bat%2B9.25.29%2BPM.png" title="Array in R" width="634" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;Array in R&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div&gt;&lt;div&gt;&lt;font face="courier" size="6"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&amp;gt; mycarsale.array[2,3,1]&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;[1] 8&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&amp;gt; mycarsale.array[2,3,2]&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;[1] 23&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/4094385179464181644/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/06/arrays-and-matrices-in-r-lecture-3.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4094385179464181644" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4094385179464181644" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/06/arrays-and-matrices-in-r-lecture-3.html" title="Arrays and Matrices in R | Lecture 3" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-WHAER64gqhE/XvDUucqRGII/AAAAAAACX80/rsUrhLlrky8kKfJnjVW2tF70q3xnU-SSwCK4BGAsYHg/s72-w634-h640-c/Screenshot%2B2020-06-22%2Bat%2B9.25.29%2BPM.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-8391005876281248439</id><published>2020-06-22T21:12:00.000+05:30</published><updated>2020-06-22T21:12:40.052+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Analytics" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title type="text">How to Use R as a Calculator | Lecture 2</title><content type="html">&lt;font face="courier" size="6"&gt;R as a Calculator&lt;/font&gt;&lt;div&gt;&lt;font face="inherit"&gt;How to use R as a calculator&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="inherit"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="inherit"&gt;Open R Studio either through GUI or through Command/Terminal Mode by typing&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="inherit"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="inherit"&gt;$] rstudio&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="inherit"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="inherit"&gt;In the Console Window, type the following&amp;nbsp;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="inherit"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; 2+3&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; log(10)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt;log10(10)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; 3^2+4^3&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; exp(5)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; exp(1)&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;Check the output given in the following Window.&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-pzAijHHfm3k/XvDMurw3zaI/AAAAAAACX8Y/VVbQfyzhQXsWVBGtkQVoT6Md9EtwyyzXwCK4BGAsYHg/s758/Screenshot%2B2020-06-22%2Bat%2B8.52.17%2BPM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img alt="R" border="0" data-original-height="578" data-original-width="758" height="488" src="https://1.bp.blogspot.com/-pzAijHHfm3k/XvDMurw3zaI/AAAAAAACX8Y/VVbQfyzhQXsWVBGtkQVoT6Md9EtwyyzXwCK4BGAsYHg/w640-h488/Screenshot%2B2020-06-22%2Bat%2B8.52.17%2BPM.png" title="R" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;font face="courier"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;To clear&amp;nbsp;the console Window, use the Shortcut key Ctl+L,&amp;nbsp;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;in R, pi is recognised as PI = 3.141&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&amp;gt;pi&amp;nbsp;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;[1] 3.141593&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can use -ve sign also in front of the numbers&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&amp;gt; -9 + 1&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;font face="courier"&gt;[1] -8&lt;/font&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="courier"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/font&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/8391005876281248439/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/06/how-to-use-r-as-calculator-lecture-2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/8391005876281248439" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/8391005876281248439" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/06/how-to-use-r-as-calculator-lecture-2.html" title="How to Use R as a Calculator | Lecture 2" /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-pzAijHHfm3k/XvDMurw3zaI/AAAAAAACX8Y/VVbQfyzhQXsWVBGtkQVoT6Md9EtwyyzXwCK4BGAsYHg/s72-w640-h488-c/Screenshot%2B2020-06-22%2Bat%2B8.52.17%2BPM.png" height="72" width="72" /><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8826608353769320919.post-4850000420540282331</id><published>2020-06-22T16:11:00.003+05:30</published><updated>2020-06-22T19:29:31.657+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Analytics" /><category scheme="http://www.blogger.com/atom/ns#" term="R" /><title type="text">Basics of R | Lecture 1 </title><content type="html">&lt;b&gt;&lt;font size="6"&gt;Basics of R&lt;/font&gt;&lt;/b&gt;&lt;script async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;&lt;ins class="adsbygoogle" data-ad-client="ca-pub-6266661353943337" data-ad-format="fluid" data-ad-layout="in-article" data-ad-slot="6306553473" style="display: block; text-align: center;"&gt;&lt;/ins&gt;&lt;script&gt;     (adsbygoogle = window.adsbygoogle || []).push({}); &lt;/script&gt;&lt;div class="g-ytsubscribe" data-channel="tspradeepkumar" data-count="default" data-layout="full" data-theme="dark"&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="georgia"&gt;Its a software and programming language used&amp;nbsp;&lt;/font&gt;&lt;span style="font-family: georgia;"&gt;for statistical computing and report generation.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;Its Free and open source with GPL Licensing&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;It has a GUI to work upon called as RStudio.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;This software can be installed using the following command in&amp;nbsp; Ubuntu&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;font face="courier"&gt;$] sudo apt update&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;font face="courier"&gt;$] sudo apt install build-essential autoconf automake libxmu-dev&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;font face="courier"&gt;$] sudo apt install r-base rstudio&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To open the software, you can use either through the GUI or through terminal using&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;font face="courier"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;font face="courier"&gt;$] rstudio&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;&lt;b&gt;The GUI looks like this&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: georgia;"&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-ykH_uUwfYSU/XvCMQQzfWDI/AAAAAAACX7g/tt2Fs-zcDMc4q6MPnnziWJYFKDG009MOgCK4BGAsYHg/s1440/r1.png" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="R Studio" border="0" data-original-height="900" data-original-width="1440" height="400" src="https://1.bp.blogspot.com/-ykH_uUwfYSU/XvCMQQzfWDI/AAAAAAACX7g/tt2Fs-zcDMc4q6MPnnziWJYFKDG009MOgCK4BGAsYHg/w640-h400/r1.png" title="R Studio" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;R Studio&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;font face="georgia"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;font size="5"&gt;Features of R&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Its based on object oriented design&lt;/li&gt;&lt;li&gt;R Commands can be included or embedded with other software or applications or programming languages namely C++. Java and other commercial tools.&lt;/li&gt;&lt;li&gt;It supports multiple Operating systems like Windows, Linux, Mac OS, etc.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;b&gt;&lt;font size="5"&gt;Advantages of R&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Good community to help&amp;nbsp;&lt;/li&gt;&lt;li&gt;Works in a interactive way&lt;/li&gt;&lt;li&gt;Plotting and graphs are easy to plot using the libraries.&lt;/li&gt;&lt;li&gt;New libraries can be easily generated.&lt;/li&gt;&lt;li&gt;Its completely modular and object oriented.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;See the following screenshot that shows the RStudio Window. We can run the commands in Console window and get the output interactively.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;We can write a script directly in the Script window and execute the program using Run Button and other two window namely environment and file window.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;a href="https://1.bp.blogspot.com/-aInyTiZlXu8/XvC42_uRHGI/AAAAAAACX78/KKHJWiEo0PgL5x1BIIDV_iglVYcnSB_HQCK4BGAsYHg/s1368/IMG_0260.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"&gt;&lt;img alt="R STudio" border="0" data-original-height="833" data-original-width="1368" height="390" src="https://1.bp.blogspot.com/-aInyTiZlXu8/XvC42_uRHGI/AAAAAAACX78/KKHJWiEo0PgL5x1BIIDV_iglVYcnSB_HQCK4BGAsYHg/w640-h390/IMG_0260.JPG" title="R Studio" width="640" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;R Studio&lt;br /&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;font size="5"&gt;Disadvantages&lt;/font&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;R needs more memory, so large datasets can be processed with the maximum available memory in the machine.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"&gt;&lt;/script&gt;
&lt;!-- linuxasaservice_main_AdSense1_728x90_as --&gt;
&lt;ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6266661353943337"
     data-ad-slot="9847222411"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.nsnam.com/feeds/4850000420540282331/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://www.nsnam.com/2020/06/basics-of-r-lecture-1.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4850000420540282331" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/8826608353769320919/posts/default/4850000420540282331" /><link rel="alternate" type="text/html" href="http://www.nsnam.com/2020/06/basics-of-r-lecture-1.html" title="Basics of R | Lecture 1 " /><author><name>T S Pradeep Kumar</name><uri>http://www.blogger.com/profile/00230848934745389790</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="24" height="32" src="//1.bp.blogspot.com/-PbZzIlQvsqw/X9iMp-nzoCI/AAAAAAACZWM/qMoFNbHwGuM8GEiZc9PPh1Jwgh5u41IEQCK4BGAYYCw/s113/IMG_0794.jpg" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://1.bp.blogspot.com/-ykH_uUwfYSU/XvCMQQzfWDI/AAAAAAACX7g/tt2Fs-zcDMc4q6MPnnziWJYFKDG009MOgCK4BGAsYHg/s72-w640-h400-c/r1.png" height="72" width="72" /><thr:total>0</thr:total></entry></feed>
