[ns] 802.11p extension

2006-09-14 Thread juan novoa fernandez

Helloi
I'm trying to simulate with ns2 802.11p (very similar to 802.11a) for a few 
points in my final thesis
Does anybody know how to make the link adaptation and the multirate in C++ 
in order to extend the simulator?

thank you
Juan Novoa

_
Descubre la descarga digital con MSN Music. Más de un millón de canciones. 
http://music.msn.es/



[ns] Measuring physical data rate for wireless medium

2006-09-14 Thread Piyush Agrawal

Hi all,

I wish to implement a feature for 802.11, in which I need to know the
current physical data rate of the wireless medium form the C++ code. I know
that in the real world scenario, the data rate fluctuates. Does ns model
such fluctuations and can the changing rates be measured?

Thanks,
Piyush

-- 
Piyush Agrawal
4th Year Undergraduate Student,
Department of Computer Science  Engineering,
IIT Kanpur, India


Re: [ns] Measuring physical data rate for wireless medium

2006-09-14 Thread Joshua Robinson

ns does not currently model such fluctuations (i.e. ARF,RBAR, or OAR).
 the data rate used is always the same.

On 9/14/06, Piyush Agrawal [EMAIL PROTECTED] wrote:

 Hi all,

 I wish to implement a feature for 802.11, in which I need to know the
 current physical data rate of the wireless medium form the C++ code. I know
 that in the real world scenario, the data rate fluctuates. Does ns model
 such fluctuations and can the changing rates be measured?

 Thanks,
 Piyush

 --
 Piyush Agrawal
 4th Year Undergraduate Student,
 Department of Computer Science  Engineering,
 IIT Kanpur, India




[ns] R: Re: Measuring physical data rate for wireless medium

2006-09-14 Thread Marco Fiore

Hi,

you could have a look at the wireless patch at
http://www.reti.
polito.it/fiore

regards,

Marco

Messaggio originale
Da: 
[EMAIL PROTECTED]
Data: 14-set-2006 8.22 PM
A: Piyush 
Agrawal[EMAIL PROTECTED]
Cc: ns-users@ISI.EDU
Ogg: Re: [ns] 
Measuring physical data rate for wireless medium


ns does not 
currently model such fluctuations (i.e. ARF,RBAR, or OAR).
 the data 
rate used is always the same.

On 9/14/06, Piyush Agrawal piyush.
[EMAIL PROTECTED] wrote:

 Hi all,

 I wish to implement a 
feature for 802.11, in which I need to know the
 current physical 
data rate of the wireless medium form the C++ code. I know
 that in 
the real world scenario, the data rate fluctuates. Does ns model
 
such fluctuations and can the changing rates be measured?

 Thanks,
 Piyush

 --
 Piyush Agrawal
 4th Year Undergraduate Student,
 Department of Computer Science  Engineering,
 IIT Kanpur, India







[ns] web sumulation

2006-09-14 Thread yaya

hi, ns-users!
the first question:
can anyone tell me how to set the req_trace_ and resp_trace_, I invoke the 
function 
$pool launch-req {id pid clnt svr ctcp csnk size pobj}
   but I dont know the meanning of pid, ctcp, csnk, size and pobj, can anyone 
give me some sugestion 
the other: how to set the fixed size of page and how to set the page 
size as 500Kbit
thanks!

!!

my ns2 scritps is:
#Create a simulator object
set ns [new Simulator]
$ns color 0 blue  ;# Set colors to display packets
$ns color 1 red 

source /home/ns2/ns-allinone-2.28/ns-2.28/tcl/webcache/webtraf.tcl
#Open the trace file
set p2p_tracefd [open p2p_web1.tr w]
$ns trace-all $p2p_tracefd

#Open the nam trace file
set p2p_namfd [open p2p_web1.nam w]
$ns namtrace-all $p2p_namfd   

#
#
||--10m,10ms-Np1
#||   
#|
|--10m,10ms-Npn   
#N0-10mb,20ms|  r |
#|
|--10m,20ms-Nt1
#|  
|   
#
||--10m,20ms-Ntm
##

##
#set the default parameter
##
set n 5;##set the number n of 
short-lived p2p
set m 2;##set the 
number m of long-lived web 
set u 1Mb;  ##set the capacity of 
the bottleneck link
set Ltn 10ms;   ##set the link RTT of 
long-lived tcp
set Ltm 20ms;   ##set the link RTT of 
short-lived tcp

##
#Create the nodes and links
#
set N0 [$ns node]
set r  [$ns node]

$N0 label N0
$r label route

for {set i 1} {$i=$m} {incr i} {
   set Nt($i) [$ns node]
   $Nt($i) label Nt$i
}
set i 0
for {set i 1} {$i=$n} {incr i} {
   set Np($i) [$ns node]
   $Np($i) label Np$i
}

#Create a duplex link between the nodes
$ns duplex-link $N0 $r  $u  1ms RED
$ns duplex-link-op $N0 $r color pink 

set i 0
for {set i 1} {$i=$n} {incr i} {
   $ns duplex-link $r $Np($i) $u  $Ltn RED
   $ns duplex-link-op $r $Np($i) color red 
}
set i 0
for {set i 1} {$i=$m} {incr i} {
   $ns duplex-link $r $Nt($i) $u  $Ltm RED
   $ns duplex-link-op $r $Nt($i) color green
}

$ns set src_ [list 0]
$ns set dst_ [list 2]

#
#set the short-lived p2p flow
#

for {set o 1} {$o=$n} {incr o} {
  set tcp($o) [new Agent/TCP/Reno]
  $ns attach-agent $Np($o) $tcp($o)
  
  set ftp($o) [new Application/FTP]
  $ftp($o) set fid_ 1
  $ftp($o) attach-agent $tcp($o)
  
  set sink($o) [new Agent/TCPSink]
  $ns attach-agent $N0 $sink($o)  
  $ns connect $tcp($o) $sink($o)
  
}

##
#set the short-lived web flow
#
#debug 1
set pool [new PagePool/WebTraf]

$pool set debug_ true

# Trace web request and response flows
$pool set req_trace_ 0
$pool set resp_trace_ 0

#$pool launch-req {1 1 $N0 $Nt(2) 1 0 40 23456}

# options to control traffic based on flow size, 
# used to evaluate SFD algorithm.
# The threshold to classify short and long flows (in TCP packets, ie 15KB)
$pool set FLOW_SIZE_TH_ 60 

# Set up server and client nodes
$pool set-num-client [llength [$ns set src_]]
$pool set-num-server [llength [$ns set dst_]]
#global n
set i 0
foreach s [$ns set src_] {
$pool set-client $i $N0
incr i
}

set i 0
foreach s [$ns set dst_] {
$pool set-server $i $Nt($s)
incr i
}

# Number of Pages per Session
set numPage 1
# Session 0 starts from 2s, session 1 starts from 2.1s
$pool set-num-session 2

# XXX Can't initialize instvars using something like this:
# set interPage [new RandomVariable/Exponential -avg_ 1]
# Must explicitly set variable values
set interPage [new RandomVariable/Exponential] 
$interPage set avg_ 1
set pageSize [new RandomVariable/Constant]
$pageSize set val_ 1
set interObj [new RandomVariable/Exponential]
$interObj set avg_ 0.01
set objSize [new RandomVariable/ParetoII]
$objSize set avg_ 10
$objSize set shape_ 1.2
$pool create-session 0 $numPage 2 $interPage $pageSize $interObj $objSize

set interPage [new RandomVariable/Exponential]

[ns] Help of getting the sourcecode for Ns-2 simulation of PbCast

2006-09-14 Thread ns-2 simulator

Hi Ns Users,

I would appreciate if someone can share the source code for NS-2 Simulation for 
PbCast.

Thanks.

regards,

Eric Jiang