LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2021, 05:16 PM   #1
haitam09
Member
 
Registered: Jan 2015
Posts: 30

Rep: Reputation: Disabled
TCP congestion window for wireless sensors


Hi ALL,
I need your help if possible.
I would like to study the impact of the TCP congestion window for the simulation of a wireless sensors network based on the AODV or DSDV protocol in NS2.34.
I have a problem: when the .tr file is generated correctly,the graph of the congestion window (cwnd_) has remained fixed at a value equal to 1 (see attached).
Thank you very much in advance for helping me solve this problem.
I will be very grateful.
The code used is :
# ##############procedure to plot the congestion window
proc plotWindow {tcpSource outfile} {
global ns
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
###Print TIME CWND for gnuplot to plot progressing on CWND
puts $outfile "$now $cwnd"
$ns at [expr $now+0.1] "plotWindow $tcpSource $outfile"
}
# Open the Window trace file
set outfile [open "WinFile" w]
$ns at 0.0 "plotWindow $tcp1 $outfile"
Attached Thumbnails
Click image for larger version

Name:	xgraph_cwnd.PNG
Views:	11
Size:	81.5 KB
ID:	37154  
 
Old 09-08-2021, 08:49 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by haitam09 View Post
Hi ALL,
I need your help if possible. I would like to study the impact of the TCP congestion window for the simulation of a wireless sensors network based on the AODV or DSDV protocol in NS2.34.

I have a problem: when the .tr file is generated correctly,the graph of the congestion window (cwnd_) has remained fixed at a value equal to 1 (see attached). Thank you very much in advance for helping me solve this problem. I will be very grateful. The code used is :
Code:
# ##############procedure to plot the congestion window
proc plotWindow {tcpSource outfile} {
   global ns
   set now [$ns now]
   set cwnd [$tcpSource set cwnd_]
###Print TIME CWND   for  gnuplot to plot progressing on CWND   
   puts  $outfile  "$now $cwnd"
   $ns at [expr $now+0.1] "plotWindow $tcpSource  $outfile"
}
# Open the Window trace file
  set outfile [open "WinFile" w]
$ns  at  0.0  "plotWindow $tcp1  $outfile"
Sorry, no...you've posted 10 lines of code, with no context. You've been working with NS2 for six years now...can you apply anything you've learned and been told towards solving your own issue??

Post your code (in CODE tags), along with telling us what you've done/tried on your own, modifications you've made, version/distro of Linux, etc., and we can try to assist.
 
Old 09-09-2021, 05:14 AM   #3
haitam09
Member
 
Registered: Jan 2015
Posts: 30

Original Poster
Rep: Reputation: Disabled
Hi,
Thank you for the answer.
The code used is :
# Define options
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type

set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 2 ;# number of mobilenodes
set val(rp) AODV ;# routing protocol
set val(x) 500 ;# X dimension of topography
set val(y) 400 ;# Y dimension of topography
set val(stop) 150 ;# time of simulation end

set ns [new Simulator]
set tracefd [open testAODV.tr w]
set windowVsTime2 [open win.tr w]
set namtrace [open testAODV.nam w]

$ns trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)

#
# Create nn mobilenodes [$val(nn)] and attach them to the channel.
#

# configure the nodes
$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace ON

for {set i 0} {$i < $val(nn) } { incr i } {
set node_($i) [$ns node]
}
#Provide initial location of mobile nodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 5.0
$node_(1) set Y_ 5.0
$node_(1) set Z_ 0.0

#Generation of movements
$ns at 1.0 "$node_(0) setdest 400.0 5.0 5.0"
#Set a TCP connection between node_(0) and node_(1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
#$tcp set window_ 2000
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 1.0 "$ftp start"

#Printing the tcpwindow size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file "$now $cwnd"
$ns at [expr $now+$time] "plotWindow $tcpSource $file"}
$ns at 10.1 "plotWindow $tcp $windowVsTime2"
# Define node initial position in nam
for {set i 0} {$i < $val(nn)} { incr i } {
# 30 defines the node size for nam
$ns initial_node_pos $node_($i) 30
}

# Telling nodes when the simulation ends
for {set i 0} {$i < $val(nn) } { incr i } {
$ns at $val(stop) "$node_($i) reset";
}

# ending nam and the simulation
$ns at $val(stop) "$ns nam-end-wireless $val(stop)"
$ns at $val(stop) "stop"
$ns at 150 "puts "end simulation" ; $ns halt"
proc stop {} {
global ns tracefd namtrace
$ns flush-trace
close $tracefd
close $namtrace
exit 0
}

$ns run
Thanks for the help
 
Old 09-09-2021, 06:06 AM   #4
jkirchner
Member
 
Registered: Apr 2007
Location: West Virginia
Distribution: Pop!_OS
Posts: 945

Rep: Reputation: 297Reputation: 297Reputation: 297
Fixed it for you, please use code tags!!!

Code:
# Define options
set val(chan) Channel/WirelessChannel ;# channel type
set val(prop) Propagation/TwoRayGround ;# radio-propagation model
set val(netif) Phy/WirelessPhy ;# network interface type

set val(mac) Mac/802_11 ;# MAC type
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type
set val(ll) LL ;# link layer type
set val(ant) Antenna/OmniAntenna ;# antenna model
set val(ifqlen) 50 ;# max packet in ifq
set val(nn) 2 ;# number of mobilenodes
set val(rp) AODV ;# routing protocol
set val(x) 500 ;# X dimension of topography
set val(y) 400 ;# Y dimension of topography
set val(stop) 150 ;# time of simulation end

set ns [new Simulator]
set tracefd [open testAODV.tr w]
set windowVsTime2 [open win.tr w]
set namtrace [open testAODV.nam w]

$ns trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)

#
# Create nn mobilenodes [$val(nn)] and attach them to the channel.
#

# configure the nodes
$ns node-config -adhocRouting $val(rp) \
-llType $val(ll) \
-macType $val(mac) \
-ifqType $val(ifq) \
-ifqLen $val(ifqlen) \
-antType $val(ant) \
-propType $val(prop) \
-phyType $val(netif) \
-channelType $val(chan) \
-topoInstance $topo \
-agentTrace ON \
-routerTrace ON \
-macTrace OFF \
-movementTrace ON

for {set i 0} {$i < $val(nn) } { incr i } {
set node_($i) [$ns node]
}
#Provide initial location of mobile nodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 5.0
$node_(1) set Y_ 5.0
$node_(1) set Z_ 0.0

#Generation of movements
$ns at 1.0 "$node_(0) setdest 400.0 5.0 5.0"
#Set a TCP connection between node_(0) and node_(1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
#$tcp set window_ 2000
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 1.0 "$ftp start"

#Printing the tcpwindow size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file "$now $cwnd"
$ns at [expr $now+$time] "plotWindow $tcpSource $file"}
$ns at 10.1 "plotWindow $tcp $windowVsTime2"
# Define node initial position in nam
for {set i 0} {$i < $val(nn)} { incr i } {
# 30 defines the node size for nam
$ns initial_node_pos $node_($i) 30
}

# Telling nodes when the simulation ends
for {set i 0} {$i < $val(nn) } { incr i } {
$ns at $val(stop) "$node_($i) reset";
}

# ending nam and the simulation
$ns at $val(stop) "$ns nam-end-wireless $val(stop)"
$ns at $val(stop) "stop"
$ns at 150 "puts "end simulation" ; $ns halt"
proc stop {} {
global ns tracefd namtrace
$ns flush-trace
close $tracefd
close $namtrace
exit 0
}
 
Old 09-09-2021, 07:55 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by haitam09 View Post
Hi,
Thank you for the answer. The code used is :
Code:
# Define options
set val(chan)           Channel/WirelessChannel    ;# channel type
set val(prop)           Propagation/TwoRayGround   ;# radio-propagation model
set val(netif)          Phy/WirelessPhy            ;# network interface type

set val(mac)            Mac/802_11                 ;# MAC type
set val(ifq)            Queue/DropTail/PriQueue    ;# interface queue type
set val(ll)             LL                         ;# link layer type
set val(ant)            Antenna/OmniAntenna        ;# antenna model
set val(ifqlen)         50                         ;# max packet in ifq
set val(nn)             2                         ;# number of mobilenodes
set val(rp)             AODV                       ;# routing protocol
set val(x)              500                        ;# X dimension of topography
set val(y)              400                        ;# Y dimension of topography
set val(stop)           150                        ;# time of simulation end

set ns          [new Simulator]
set tracefd       [open testAODV.tr w]
set windowVsTime2 [open win.tr w]
set namtrace      [open testAODV.nam w]

$ns trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo       [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)

#
#  Create nn mobilenodes [$val(nn)] and attach them to the channel.
#

# configure the nodes
        $ns node-config -adhocRouting $val(rp) \
             -llType $val(ll) \
             -macType $val(mac) \
             -ifqType $val(ifq) \
             -ifqLen $val(ifqlen) \
             -antType $val(ant) \
             -propType $val(prop) \
             -phyType $val(netif) \
             -channelType $val(chan) \
             -topoInstance $topo \
             -agentTrace ON \
             -routerTrace ON \
             -macTrace OFF \
             -movementTrace ON

    for {set i 0} {$i < $val(nn) } { incr i } {
        set node_($i) [$ns node]            
    }
#Provide initial location of mobile nodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 5.0
$node_(1) set Y_ 5.0
$node_(1) set Z_ 0.0

#Generation of movements
$ns at 1.0 "$node_(0) setdest 400.0 5.0 5.0"
#Set a TCP connection between node_(0) and node_(1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
#$tcp set window_ 2000
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 1.0 "$ftp start"

#Printing the tcpwindow size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file "$now $cwnd"
$ns at [expr $now+$time] "plotWindow $tcpSource $file"}
$ns at 10.1 "plotWindow $tcp $windowVsTime2"
# Define node initial position in nam
  for {set i 0} {$i < $val(nn)} { incr i } {
# 30 defines the node size for nam
  $ns initial_node_pos $node_($i) 30
}

# Telling nodes when the simulation ends
for {set i 0} {$i < $val(nn) } { incr i } {
    $ns at $val(stop) "$node_($i) reset";
}

# ending nam and the simulation
$ns at $val(stop) "$ns nam-end-wireless $val(stop)"
$ns at $val(stop) "stop"
$ns at 150 "puts "end simulation" ; $ns halt"
proc stop {} {
    global ns tracefd namtrace
    $ns flush-trace
    close $tracefd
    close $namtrace
	exit 0
}
$ns run
Thanks for the help
AGAIN:
  • You were asked to post your code in CODE tags; you did not
  • You were asked to tell us what you modified/changed/tried; you did not
  • You were asked what version/distro of Linux you're using; you didn't tell us
  • You were asked to provide additional details (like NS version??) but you did not.
We aren't going to download/run your code for you, and debug it for you. And again, after using NS for at least six years, it's hard to imagine you can't apply anything you've learned in that time on your own. You've repeated this pattern for some time now, where you will post with little/no details and showing no effort of your own.
 
Old 09-10-2021, 04:47 AM   #6
haitam09
Member
 
Registered: Jan 2015
Posts: 30

Original Poster
Rep: Reputation: Disabled
Hi Friends TB0ne and jkirchner.

Sorry for the inconvenience and thanks for your advices.

I would like juste test this code (everywhere on the web), the simulation was generated correctly.
But the problem lies in the graph of "TCP congestion window VS Time" generated by the WIN.TR file using "set windowVsTime2 [open win.tr w]"
the graph of the congestion window (cwnd_) has remained fixed at a value equal to 1 in my case (see last attachment).
The code below is used to print the tcp window size :
Code:
# Define options
set val(chan)           Channel/WirelessChannel    ;# channel type
set val(prop)           Propagation/TwoRayGround   ;# radio-propagation model
set val(netif)          Phy/WirelessPhy            ;# network interface type

set val(mac)            Mac/802_11                 ;# MAC type
set val(ifq)            Queue/DropTail/PriQueue    ;# interface queue type
set val(ll)             LL                         ;# link layer type
set val(ant)            Antenna/OmniAntenna        ;# antenna model
set val(ifqlen)         50                         ;# max packet in ifq
set val(nn)             2                         ;# number of mobilenodes
set val(rp)             AODV                       ;# routing protocol
set val(x)              500                        ;# X dimension of topography
set val(y)              400                        ;# Y dimension of topography
set val(stop)           150                        ;# time of simulation end

set ns          [new Simulator]
set tracefd       [open testAODV.tr w]
set windowVsTime2 [open win.tr w]
set namtrace      [open testAODV.nam w]

$ns trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo       [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)

#
#  Create nn mobilenodes [$val(nn)] and attach them to the channel.
#

# configure the nodes
        $ns node-config -adhocRouting $val(rp) \
             -llType $val(ll) \
             -macType $val(mac) \
             -ifqType $val(ifq) \
             -ifqLen $val(ifqlen) \
             -antType $val(ant) \
             -propType $val(prop) \
             -phyType $val(netif) \
             -channelType $val(chan) \
             -topoInstance $topo \
             -agentTrace ON \
             -routerTrace ON \
             -macTrace OFF \
             -movementTrace ON

    for {set i 0} {$i < $val(nn) } { incr i } {
        set node_($i) [$ns node]            
    }
#Provide initial location of mobile nodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 5.0
$node_(1) set Y_ 5.0
$node_(1) set Z_ 0.0

#Generation of movements
$ns at 1.0 "$node_(0) setdest 400.0 5.0 5.0"
#Set a TCP connection between node_(0) and node_(1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
#$tcp set window_ 2000
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 1.0 "$ftp start"

#Printing the tcpwindow size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file "$now $cwnd"
$ns at [expr $now+$time] "plotWindow $tcpSource $file"}
$ns at 10.1 "plotWindow $tcp $windowVsTime2"

# Define node initial position in nam
  for {set i 0} {$i < $val(nn)} { incr i } {
# 30 defines the node size for nam
  $ns initial_node_pos $node_($i) 30
}

# Telling nodes when the simulation ends
for {set i 0} {$i < $val(nn) } { incr i } {
    $ns at $val(stop) "$node_($i) reset";
}

# ending nam and the simulation
$ns at $val(stop) "$ns nam-end-wireless $val(stop)"
$ns at $val(stop) "stop"
$ns at 150 "puts "end simulation" ; $ns halt"
proc stop {} {
    global ns tracefd namtrace
    $ns flush-trace
    close $tracefd
    close $namtrace
	exit 0
}
$ns run
1) You were asked to post your code in CODE tags; ====== thanks to jkirchner
2) You were asked to tell us what you modified/changed/tried; =========== No modification, it is a test of a script
3) You were asked what version/distro of Linux you're using; ============
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid

You were asked to provide additional details (like NS version??) : NS2.34.

thanks for the help.

Last edited by haitam09; 09-10-2021 at 06:02 AM.
 
Old 09-10-2021, 07:35 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by haitam09 View Post
Hi Friends TB0ne and jkirchner.
Sorry for the inconvenience and thanks for your advices.

I would like juste test this code (everywhere on the web), the simulation was generated correctly. But the problem lies in the graph of "TCP congestion window VS Time" generated by the WIN.TR file using "set windowVsTime2 [open win.tr w]" the graph of the congestion window (cwnd_) has remained fixed at a value equal to 1 in my case (see last attachment).
Right; this is exactly what you said in your first post. Nothing new.
Quote:
The code below is used to print the tcp window size :
Code:
# Define options
set val(chan)           Channel/WirelessChannel    ;# channel type
set val(prop)           Propagation/TwoRayGround   ;# radio-propagation model
set val(netif)          Phy/WirelessPhy            ;# network interface type

set val(mac)            Mac/802_11                 ;# MAC type
set val(ifq)            Queue/DropTail/PriQueue    ;# interface queue type
set val(ll)             LL                         ;# link layer type
set val(ant)            Antenna/OmniAntenna        ;# antenna model
set val(ifqlen)         50                         ;# max packet in ifq
set val(nn)             2                         ;# number of mobilenodes
set val(rp)             AODV                       ;# routing protocol
set val(x)              500                        ;# X dimension of topography
set val(y)              400                        ;# Y dimension of topography
set val(stop)           150                        ;# time of simulation end

set ns          [new Simulator]
set tracefd       [open testAODV.tr w]
set windowVsTime2 [open win.tr w]
set namtrace      [open testAODV.nam w]

$ns trace-all $tracefd
$ns namtrace-all-wireless $namtrace $val(x) $val(y)

# set up topography object
set topo       [new Topography]

$topo load_flatgrid $val(x) $val(y)

create-god $val(nn)

#
#  Create nn mobilenodes [$val(nn)] and attach them to the channel.
#

# configure the nodes
        $ns node-config -adhocRouting $val(rp) \
             -llType $val(ll) \
             -macType $val(mac) \
             -ifqType $val(ifq) \
             -ifqLen $val(ifqlen) \
             -antType $val(ant) \
             -propType $val(prop) \
             -phyType $val(netif) \
             -channelType $val(chan) \
             -topoInstance $topo \
             -agentTrace ON \
             -routerTrace ON \
             -macTrace OFF \
             -movementTrace ON

    for {set i 0} {$i < $val(nn) } { incr i } {
        set node_($i) [$ns node]            
    }
#Provide initial location of mobile nodes
$node_(0) set X_ 5.0
$node_(0) set Y_ 5.0
$node_(0) set Z_ 0.0
$node_(1) set X_ 5.0
$node_(1) set Y_ 5.0
$node_(1) set Z_ 0.0

#Generation of movements
$ns at 1.0 "$node_(0) setdest 400.0 5.0 5.0"
#Set a TCP connection between node_(0) and node_(1)
set tcp [new Agent/TCP/Newreno]
$tcp set class_ 2
#$tcp set window_ 2000
set sink [new Agent/TCPSink]
$ns attach-agent $node_(0) $tcp
$ns attach-agent $node_(1) $sink
$ns connect $tcp $sink
set ftp [new Application/FTP]
$ftp attach-agent $tcp
$ns at 1.0 "$ftp start"

#Printing the tcpwindow size
proc plotWindow {tcpSource file} {
global ns
set time 0.01
set now [$ns now]
set cwnd [$tcpSource set cwnd_]
puts $file "$now $cwnd"
$ns at [expr $now+$time] "plotWindow $tcpSource $file"}
$ns at 10.1 "plotWindow $tcp $windowVsTime2"

# Define node initial position in nam
  for {set i 0} {$i < $val(nn)} { incr i } {
# 30 defines the node size for nam
  $ns initial_node_pos $node_($i) 30
}

# Telling nodes when the simulation ends
for {set i 0} {$i < $val(nn) } { incr i } {
    $ns at $val(stop) "$node_($i) reset";
}

# ending nam and the simulation
$ns at $val(stop) "$ns nam-end-wireless $val(stop)"
$ns at $val(stop) "stop"
$ns at 150 "puts "end simulation" ; $ns halt"
proc stop {} {
    global ns tracefd namtrace
    $ns flush-trace
    close $tracefd
    close $namtrace
	exit 0
}
$ns run
1) You were asked to post your code in CODE tags; ====== thanks to jkirchner
And you were also asked by myself, in post #2.
Quote:
2) You were asked to tell us what you modified/changed/tried; =========== No modification, it is a test of a script
So you changed NOTHING...and somehow expect it to just work for your needs?? Did you happen to pay attention to the number of nodes you're creating?? Again, you have been using NS for **SIX YEARS**. Why can't you apply what you've learned/been told on your own at this point??? Can you not write/modify/change scripts on your own yet??
Quote:
3) You were asked what version/distro of Linux you're using; ============
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid

You were asked to provide additional details (like NS version??) : NS2.34.
And the allinone package for NS2.34 has this, and sample graphing code that looks very much like what you posted, with a graphing example.
http://ashrafiash.blogspot.com/2013/...untu-1004.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing TCP initial congestion window prafulnama Linux - Networking 2 09-23-2011 10:23 AM
Select YeAH-TCP like default TCP congestion control algorithm simonbcn Linux - Networking 0 01-20-2011 10:34 AM
Programming - Linux TCP Congestion Control smokey1582 Programming 1 10-22-2004 04:07 PM
Programming - Linux TCP Congestion Control smokey1582 Linux - Software 1 10-21-2004 12:38 PM
TCP Congestion Window Size Reduction shinkm Linux - Networking 0 08-24-2004 04:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration