[ns] Handover Simulation NS-2

2011-10-16 Thread Syed Faraz Hasan

Hi Guys,

I am playing with handover simulation in NS-2 and having some difficulty in 
interpreting the results. Two 802.11 APs are placed at a certain distance such 
that their footprints are not overlapping. A mobile node is made to move from 
the footprint of one AP to the next (passing through the uncovered region). 
According to the trace file generated for this simulation, the mobile node does 
not handover to the next AP even when it enters its footprint. It is tuned to 
passive scanning. I reckon it should initiate a handover as soon as it enters 
AP footprint?

I simulated another scenario when the AP footprints are overlapping and in this 
case handover works fine. But, the authentication messages are a little 
strange. Near the edge of the AP-1 footprint, the mobile node authenticates 
with the first AP again. After moving out of AP-1 range it authenticates with 
AP-2. This may be because of ping-pong effect? If so, I didn't observe this for 
simulation where APs are highly overlapping (inter AP distance is equal to the 
range of APs).

Could some one please add some sense to what's going on? I shall be grateful.

Cheers,
Faraz


[ns] Handover simulation NS-2

2011-10-14 Thread Syed Faraz Hasan

Hi Guys,

I am playing with handover simulation in NS-2 and having some difficulty in 
interpreting the results. Two 802.11 APs are placed at a certain distance such 
that their footprints are not overlapping. A mobile node is made to move from 
the footprint of one AP to the next (passing through the uncovered region). 
According to the trace file generated for this simulation, the mobile node does 
not handover to the next AP even when it enters its footprint. It is tuned to 
passive scanning. I reckon it should initiate a handover as soon as it enters 
AP footprint?

I simulated another scenario when the AP footprints are overlapping and in this 
case handover works fine. But, the authentication messages are a little 
strange. Near the edge of the AP-1 footprint, the mobile node authenticates 
with the first AP again. After moving out of AP-1 range it authenticates with 
AP-2. This may be because of ping-pong effect? If so, I didn't observe this for 
simulation where APs are highly overlapping (inter AP distance is equal to the 
range of APs).

Could some one please add some sense to what's going on? I shall be grateful.

Cheers,
Faraz


[ns] mac-802_11.cc - op

2010-06-04 Thread Syed Faraz Hasan

Hi NS Users,

I am trying to follow the mac-802_11.cc file in the NS2. I notice - 
operators used on several ocassions. Can somebody tell me what - means in C++ 
(or in the file). For instance,

ap_list-ap_id=num; what does this mean?

There are more examples like:

temp-next-ap_power= power; etc. Any help shall be highly appreciated.

Thanks for your help in advance.

Faraz


[ns] Changing the sources file

2010-05-17 Thread Syed Faraz Hasan

Hi NS2 Users,

I am trying to make some changes in the NS2 source files, attempting to modify 
the scan procedure in the 802.11 network simulations. I added an extra printf 
command in the mac/mac-802_11.cc and saved the changes. When I am running the 
tcl code for 802.11 infrastructure networks, it is not printing the extra 
message. This was just a simple check to see if the changes are working but it 
failed.
Can anyone tell me how a source file is changed in NS2?

Thanks,
Faraz


[ns] ARP in 802.11 - NS-2.33

2010-05-13 Thread Syed Faraz Hasan

Hi NS users,

I am playing with the 802.11 extensions in the NS-2.33. Following is a piece of 
the trace I got after running a code in which, the mobile node connects with an 
AP and attempts to send information. I think in the normal implementation of 
802.11, ARP comes after authentication and association. Here, I am seeing the 
ARP packet well before the authentication. Can some one clear things up for me 
please?

Early responses highly appreciated.

Regards,
Faraz

s 0.00039 _1_ MAC  --- 0 BCN 72 [0  1 393f]
s 0.001701583 _0_ MAC  --- 0 BCN 72 [0  0 5b3f]
r 0.002277870 _2_ MAC  --- 0 BCN 72 [0  0 5b3f]
M 0.1 2 (50.00, 230.00, 0.00), (750.00, 230.00), 50.00
s 0.10009 _1_ MAC  --- 0 BCN 72 [0  1 b93f]
s 0.101241583 _0_ MAC  --- 0 BCN 72 [0  0 b93f]
r 0.101817870 _2_ MAC  --- 0 BCN 72 [0  0 b93f]
s 0.200255000 _2_ MAC  --- 0 ARP 86 [0  2 806] --- [REQUEST 2/2 0/0]
r 0.200943277 _0_ MAC  --- 0 ARP 28 [0  2 806] --- [REQUEST 2/2 0/0]
s 0.201353277 _0_ MAC  --- 0 BCN 72 [0  0 c93f]
r 0.201929555 _2_ MAC  --- 0 BCN 72 [0  0 c93f]
s 0.202219277 _0_ MAC  --- 0 ARP 86 [0  0 806] --- [REPLY 0/0 2/2]
s 0.203402861 _1_ MAC  --- 0 BCN 72 [0  1 ca3f]
s 0.22059 _2_ MAC  --- 0 AUTH 58 [0 0 2 0]
r 0.221054276 _0_ MAC  --- 0 AUTH 58 [0 0 2 0]
s 0.221264276 _0_ MAC  --- 0 AUTH 58 [13a 2 0 0]
r 0.221728551 _2_ MAC  --- 0 AUTH 58 [13a 2 0 0]
s 0.221738551 _2_ MAC  --- 0 ACK 38 [0 0 0 0]
r 0.222042826 _0_ MAC  --- 0 ACK 38 [0 0 0 0]
s 0.233452551 _2_ MAC  --- 0 ACRQ 52 [0 0 2 0]
r 0.233868825 _0_ MAC  --- 0 ACRQ 52 [0 0 2 0]
s 0.234158825 _0_ MAC  --- 0 ACRP 54 [0 2 0 0]
r 0.234591100 _2_ MAC  --- 0 ACRP 54 [0 2 0 0]
s 0.234601100 _2_ MAC  --- 0 ACK 38 [0 0 0 0]
r 0.234905374 _0_ MAC  --- 0 ACK 38 [0 0 0 0]


[ns] Infra.tcl - Active/Passive scanning

2010-05-10 Thread Syed Faraz Hasan

Hi NS-2 users,



I am looking at the handovers in the 802.11 networks. I understand that an = 
infra.tcl file is out which incorporates the handing over mechanisms. Can = 
somebody please share the code with me. I have ns-2.33 installed at OpenSUSE.



Please write back soon. Thank you very much in anticipation.



Faraz



[ns] SCTP Code

2009-05-07 Thread Syed Faraz Hasan

Hello Everyone!

I am starting to explore using SCTP in NS-2, I have gone through the NS manual. 
If some one can provide me with a starting code of SCTP, I would be very 
grateful. It will help me start grasping early.

Thanks and Regards,
Faraz


[ns] 802.11p WAVE Code/Patch?

2009-04-23 Thread Syed Faraz Hasan

Hi everybody!

Can some one please provide me with the code of 802.11p WAVE. I think it is 
available in 80211p_Performance.tcl but I don't know where to get it from. Does 
there exist a separate patch for 802.11p?
Your response shall be highly appreciated.

Regards,
Faraz


[ns] Bandwidth Setting for 802.11

2009-04-23 Thread Syed Faraz Hasan

Hi Everyone!

I want to know how can I set the bandwidth in a 802.11 simulation. While 
reading in FAQs I found that BW is decided according to the basic and data 
rates. I am trying to simulate 802.11p, 27Mbps and 10MHz. I can set the data 
rate easily but how can I ensure a 10MHz bandwidth? Is there some command to 
set BW?

Thanks in advance for your help.

Faraz


[ns] UMTS Code EURANE Code - Class Simulator Error

2009-03-24 Thread Syed Faraz Hasan

Hi Everyone!

With Pats help I managed patching EURANE in NS-2.30 (OS: Linux). I am now 
trying to run test_tcp.tcl available on EURANE website. It is not executing 
correctly. I tried running each command of the program one by one to see wheres 
the error. Everything is OK till I reach...

set rnc [$ns create-Umtsnode]

which gives error:
Error when calling class Simulator: create-Umtsnode

Rest of the statements of the program are running OK (by that I mean there are 
no errors when I execute them)

Can some one help me at this please?
I am in desperate need of help!!!

Faraz



[ns] Walls and structure in ns-2

2009-03-10 Thread Syed Faraz Hasan

Hi everyone!

I am trying to add walls, roofs and structures in my simulation. I want to 
simulate two rooms, each equipped with two separate antennas and separate 
mobile devices. I wish to see the impact of one antenna in one room on another 
on another room. Motivation is to simulate femtocell some how!

Can some one help please.

Faraz


[ns] Graph plotting problem with tracegraph n NS visual trace analyzer?

2009-02-20 Thread Syed Faraz Hasan

Hi everyone!

I am using tracegraph and NS2 Visual Trace Analyzer to plot results of NS-2.33 
simulations. When I simulated wired-wireless scenarios last time, both 
softwares failed to plot its graph. I wrote to NS2 Visual Trace Analyzer's 
developer and he said his program is not compatible with lindex structure 
used in TCL code for wired-wireless simulations (He is always very kind to 
write back!). I had written to tracegraph's developer as well but have not yet 
heard from him. Can some one please direct me to some graph plotting tool which 
can overcome this problem.

Please write back soon, I am in desperate need of help.

Faraz


[ns] Wired-Wireless Trace... message at MAC layer?

2009-02-19 Thread Syed Faraz Hasan

Hi everyone!

I simulated a wired-wireless scenario in NS-2. There is one wired node, 
connected to base station node. BS is further connected to wireless node. 
Wireless node is sending TCP traffic to wired node via BS. I get the trace file 
without error but I could not understand a few messages in trace file.

For example
What does this message mean?
s 0.035412973 _1_ MAC --- 1 message 90 [0  0 800] --- [4194304:255 
-1:255 32 0]
Only MAC trace and Wired Trace is ON
Can some one please help me on this.

Faraz

A few starting lines of trace are as follows;


M 0.0 4194305 (100.00, 100.00, 0.00), (470.00, 100.00), 16.66

s 0.00047 _2_ MAC --- 0 PRRQ 52 [0  1 0]

r 0.000886300 _1_ MAC --- 0 PRRQ 52 [0  1 0]

s 0.000936300 _1_ MAC --- 0 BCN 72 [0  0 4e3f]

r 0.001512601 _2_ MAC --- 0 BCN 72 [0  0 4e3f]

s 0.001722300 _1_ MAC --- 0 PRRP 72 [0 1 0 5c3f]

r 0.002298601 _2_ MAC --- 0 PRRP 72 [0 1 0 5c3f]

s 0.002308601 _2_ MAC --- 0 ACK 38 [0 0 0 0]

r 0.002612901 _1_ MAC --- 0 ACK 38 [0 0 0 0]

s 0.01672 _2_ MAC --- 0 AUTH 58 [0 0 1 0]

r 0.017184300 _1_ MAC --- 0 AUTH 58 [0 0 1 0]

s 0.017474300 _1_ MAC --- 0 AUTH 58 [13a 1 0 0]

r 0.017938599 _2_ MAC --- 0 AUTH 58 [13a 1 0 0]

s 0.017948599 _2_ MAC --- 0 ACK 38 [0 0 0 0]

r 0.018252899 _1_ MAC --- 0 ACK 38 [0 0 0 0]

s 0.029542599 _2_ MAC --- 0 ACRQ 52 [0 0 1 0]

r 0.029958898 _1_ MAC --- 0 ACRQ 52 [0 0 1 0]

s 0.030048898 _1_ MAC --- 0 ACRP 54 [0 1 0 0]

r 0.030481198 _2_ MAC --- 0 ACRP 54 [0 1 0 0]

s 0.030491198 _2_ MAC --- 0 ACK 38 [0 0 0 0]

r 0.030795497 _1_ MAC --- 0 ACK 38 [0 0 0 0]

s 0.035412973 _1_ MAC --- 1 message 90 [0  0 800] --- [4194304:255 
-1:255 32 0]

r 0.036133272 _2_ MAC --- 1 message 32 [0  0 800] --- [4194304:255 
-1:255 32 0]

s 0.10087 _1_ MAC --- 0 BCN 72 [0  0 b93f]

r 0.101446296 _2_ MAC --- 0 BCN 72 [0  0 b93f]

s 0.185397620 _2_ MAC --- 2 message 90 [13a 0 1 800] --- [4194305:255 
-1:255 32 0]

r 0.186117912 _1_ MAC --- 2 message 32 [13a 0 1 800] --- [4194305:255 
-1:255 32 0]

r 0.186117912 _1_ MAC --- 2 message 32 [13a 0 1 800] --- [4194305:255 
-1:255 32 0]

s 0.186127912 _1_ MAC --- 0 ACK 38 [0 1 0 0]

r 0.186432203 _2_ MAC --- 0 ACK 38 [0 1 0 0]

s 0.186821912 _1_ MAC --- 2 message 90 [0  0 800] --- [4194305:255 
-1:255 32 0]

r 0.187542203 _2_ MAC --- 2 message 32 [0  0 800] --- [4194305:255 
-1:255 32 0]

D 0.187567203 _2_ RTR LOOP 2 message 32 [0  0 800] --- [4194305:255 
-1:255 32 0]


[ns] Mobile IPv6

2009-02-19 Thread Syed Faraz Hasan

Hi everyone!

I am looking to implement MIPv6 in NS-2. I have seen a few posts and they say I 
need to install MobiWan (which works only with NS-2.1b6). Can I not use Mobiwan 
(or anything else in NS-2) for implementing MIPv6?

Your help will be, as always, highly appreciated

Faraz


[ns] IP layer information NS-2

2009-02-17 Thread Syed Faraz Hasan

Hi everyone!

How do I access IP layer in NS-2. In wireless simulations, I use MAC to declare 
AP and Transport Layer by defining TCP traffic across the network. Where and 
how do I specify IP Layer? I mean, is NS-2 using IP layer when I send packets 
from one node to another? Which version of IP is NS-2 using, IPv4 or IPv6? How 
do I use either of them?

Regards,
Faraz


[ns] Proxy Registration ReQuest PRRQ in NS-2

2009-02-13 Thread Syed Faraz Hasan

Hi everybody,

I noticed Proxy Registration RQ and ResPonse whenever a mobile node connects to 
an AP. If it is made to connect to another AP during the same simulation, not 
only does it reauthenticates, reassociates, PRRP and PRRQ messages are also 
exchanged again.
Mobility architectures place a Proxy in between moving nodes and fixed internet 
infrastructure for performance enhancement, I think it is something related to 
it. Can some one shed some light on this issue please? How can I disable these?

Regards,
Faraz


[ns] How to calculate average throughput

2009-02-11 Thread Syed Faraz Hasan

Hi everybody,

I have simulated a wireless link in which a mobile node passes by an access 
point while transmitting TCP data to it. How can I calculate average throughput 
for entire data transfer. I am using tracegraph and NS visual trace analyzer; 
both display resulting graphs for throughput. Is there any other software (or 
an option with in these softwares) to evaluate the resulting throughput; I mean 
its value instead of graph.

Please write back soon.

Faraz


[ns] Throughput calculations inside code

2009-02-11 Thread Syed Faraz Hasan

Hi everybody,

How can I calculate the resulting throughput from a simulation using TCL code. 
Can someone help me by providing the required piece of code for this. I am 
currently using tracegraph for which every calculation requires a trace file to 
be fed into it. To statistically verify results, I wish to calculate and store 
several results from same simulation. Can some one please help me on this 
problem.

Faraz


[ns] OFDM in NS-2.33?

2009-02-10 Thread Syed Faraz Hasan

Hi everyone!

Can some one help me on using OFDM in my simulation of 802.11a. I found the 
code for FHSS and DSSS but these are spread spectrum techniques. Is it possible 
to include OFDM in my simulation? Please guide me to some source on the net or 
please find some time to write back.

Faraz


[ns] plotting graph in tracegraph

2009-02-06 Thread Syed Faraz Hasan

Hello,

I am using ns2 for simulations and want to use tracegraph for plotting. I have 
downloaded it and it is also running OK. However, I don't know how to display 
graphs using it. Here is what I doing...

I open tracegraph using trgraph.exe (I m using windows xp). A dialog box opens. 
I go to FILE - OPEN TRACE FILE, and open one of the traces. It dislpays which 
file is openned on the same dialog box but nothing else happens. There are 
several options to select but how to display the plot. I see X n Y axes but the 
there is not sketch on it.

Can you please tell me where I am going wrong.

Please write back soon.

Faraz


[ns] Compiling threshold.cc for receiver threshold values?

2009-02-06 Thread Syed Faraz Hasan

Hello,

I want to set different values to receiver power in the tcl code. The ns 
documentation says threshold.cc is availabe and it is to be run to get an 
executable file. That file could be used to computer receiver power for 
different scenarios. How can I compile this file? Is it compiled in the TCL 
code? Do I need a separate C compiler for this?

Can someone please help me out at this.

Regards,
Faraz



[ns] Xgraph Bandwidth? + ns 2 trace analyzer 0.3 installation ?

2009-02-04 Thread Syed Faraz Hasan

Hi Everyone!

I wrote the code to see the graph of BW occupied by one of the nodes in the 
trace. Can I display the graphs of other parameters as well. For example if I 
wish to display the graph of beacon interval vs speed of mobile, what changes 
do I need to make. Can someone please guide me to the respective tutorial.
I am trying to install trace analyzer 2009 on open suse. I have downloaded and 
extracted the files. What next? I mean what do I do to run the application. 
There is a file named Makefile but it is some piece of code.

Please write back soon.

Faraz



[ns] Defining transmission range of node?

2009-02-04 Thread Syed Faraz Hasan

Hi Everybody!

Could any one tell me how to define the transmission range of an access point 
(AP) in ns-2.33. I want to restrict its signal from reaching the mobile nodes 
outside its coverage area.

Please help me on this.

Faraz


[ns] Sending data to a specific port of a node in ns2

2009-01-30 Thread Syed Faraz Hasan

Hi everyone!

How can I send data to a specific port on a node in ns-2.33? I recently declare 
nodes and send data among them, is there any way to send data to a certain port 
of a node?

Please reply back soon.

Faraz



[ns] CBR maxpkts and interval

2009-01-30 Thread Syed Faraz Hasan

Hi,

How can I set a limit of maximum no of packets to be sent from a node in CBR 
traffic. It is
$cbr set maxpkts_ 20 (I think)
but it is not working.

Even after setting a fixed no of packets for transmission, I see more packets 
flowing from source to destination.

Can some one help me please?

Faraz


[ns] Tracing problems...

2009-01-20 Thread Syed Faraz Hasan

Hi everybody,



I am tracing the infrarstructure mode wireless networks in which, a mobile is 
passing by an AP sending TCP data to it. I have placed the MAC Tracing ON. 
Consequently, I get a trace file, it is very difficult to read and understand 
directly. How do I know what messages are sent between the mobile and AP?

Also, what is tracing? Suppose I am interested in recording the messages sent 
between mobile and AP for probing, registration and association, which tracing 
should I put ON.



Please reply soon.



Faraz


I am getting a trace like this, how do I understand this. This is a very simple 
simulation, if more nodes are added, things will get even worse?

s -t 0.00107 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt 513f
r -t 0.001646186 -Hs 0 -Hd -2 -Ni 0 -Nx 0.00 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt 513f
M 0.1 0 (0.00, 100.00, 0.00), (199.00, 100.00), 100.00
M 0.1 1 (25.00, 150.00, 0.00), (25.00, 125.00), 0.00
s -t 0.10081 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt b93f
r -t 0.101386186 -Hs 0 -Hd -2 -Ni 0 -Nx 0.14 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt b93f
s -t 0.20083 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt c93f
r -t 0.201406174 -Hs 0 -Hd -2 -Ni 0 -Nx 10.14 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt c93f
s -t 0.300075000 -Hs 0 -Hd -2 -Ni 0 -Nx 20.01 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 0 -Mt 800 -Is 0.255 -Id -1.255 -It AODV 
-Il 106 -If 0 -Ii 0 -Iv 30 -P aodv -Pt 0x2 -Ph 1 -Pb 1 -Pd 1 -Pds 0 -Ps 0 -Pss 
4 -Pc REQUEST
r -t 0.300923167 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 0 -Mt 800 -Is 0.255 -Id -1.255 -It AODV 
-Il 48 -If 0 -Ii 0 -Iv 30 -P aodv -Pt 0x2 -Ph 1 -Pb 1 -Pd 1 -Pds 0 -Ps 0 -Pss 4 
-Pc REQUEST
s -t 0.301133167 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt d33f
r -t 0.301709335 -Hs 0 -Hd -2 -Ni 0 -Nx 20.17 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt d33f
s -t 0.301999167 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt 806 -P arp -Po REQUEST -Pms 1 -Ps 
1 -Pmd 0 -Pd 0
r -t 0.302687335 -Hs 0 -Hd -2 -Ni 0 -Nx 20.27 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt 806 -P arp -Po REQUEST -Pms 1 -Ps 
1 -Pmd 0 -Pd 0
s -t 0.303002335 -Hs 0 -Hd -2 -Ni 0 -Nx 20.30 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 36b -Md 1 -Ms 0 -Mt 0
r -t 0.303354502 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 36b -Md 1 -Ms 0 -Mt 0
s -t 0.303364502 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 231 -Md 0 -Ms 0 -Mt 0
r -t 0.303668670 -Hs 0 -Hd -2 -Ni 0 -Nx 20.37 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 231 -Md 0 -Ms 0 -Mt 0
s -t 0.303678670 -Hs 0 -Hd -2 -Ni 0 -Nx 20.37 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 13a -Md 1 -Ms 0 -Mt 806 -P arp -Po REPLY -Pms 0 -Ps 0 -Pmd 
1 -Pd 1
r -t 0.303915928 -Hs 1 -Hd 0 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 13a -Md 1 -Ms 0 -Mt 806 -P arp -Po REPLY -Pms 0 -Ps 0 -Pmd 
1 -Pd 1
s -t 0.303925928 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
r -t 0.304230095 -Hs 0 -Hd -2 -Ni 0 -Nx 20.42 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md 0 -Ms 0 -Mt 0
s -t 0.304379928 -Hs 1 -Hd 0 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt 800 -P arp -Po REPLY -Pms 0 -Ps 0 
-Pmd 1 -Pd 1
s -t 0.40105 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt d93f
r -t 0.401626168 -Hs 0 -Hd -2 -Ni 0 -Nx 30.16 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt d93f
s -t 0.50067 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt e03f
r -t 0.501246174 -Hs 0 -Hd -2 -Ni 0 -Nx 40.12 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt e03f
s -t 0.60087 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt e33f
r -t 0.601446186 -Hs 0 -Hd -2 -Ni 0 -Nx 50.14 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt e33f
s -t 0.70075 -Hs 1 -Hd -2 -Ni 1 -Nx 25.00 -Ny 150.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt e63f
r -t 0.701326204 -Hs 0 -Hd -2 -Ni 0 -Nx 60.13 -Ny 100.00 -Nz 0.00 -Ne -1.00 
-Nl MAC -Nw --- -Ma 0 -Md  -Ms 1 -Mt e63f

[ns] Xgraph Bad x-value error message

2009-01-16 Thread Syed Faraz Hasan

Hi everybody,

I am trying to use xgraph. It is installed in my machine and running. I 
modified my code according to available tutorials (as far as I could) to see 
xgraph results. When the code is run, xgraph starts but displays no results. An 
error message is Bad x-value 'r' on line 6153 of file mob.tr is dislpayed. 
Same error is repeated several times on Xterm window with dfferent line numbers 
refering to the same trace file mob.tr.

Please help me out at this

Faraz

#Create a simulator object

set ns [new Simulator]



#Define different colors for data flows (for NAM)

$ns color 1 Blue

$ns color 2 Red


set tracefd [open mob.tr w]
$ns trace-all $tracefd


#Open the NAM trace file

set nf [open out.nam w]

$ns namtrace-all $nf



#Define a 'finish' procedure

proc finish {} {

global ns nf tracefd

$ns flush-trace

#Close the NAM trace file

close $nf
close $tracefd

#Execute NAM on the trace file

exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam

exec /home/faraz/Desktop/ns-allinone-2.33/ns-2.33/xgraph mob.tr 
exit 0

}


proc record {} {
global tracefd lmsink
set ns [Simulator instance]
set time 0.5
set bw [$lmsink set bytes_]
set now [$ns now]
puts $tracefd $now [expr $bw/$time*8/100]
$lmsink set bytes_ 0
$ns at [expr $now+$time] record
}


#Create four nodes

set n0 [$ns node]

set n1 [$ns node]

set n2 [$ns node]

set n3 [$ns node]



#Create links between the nodes

$ns duplex-link $n0 $n2 2Mb 10ms DropTail

$ns duplex-link $n1 $n2 2Mb 10ms DropTail

$ns duplex-link $n2 $n3 1.7Mb 20ms DropTail



#Set Queue Size of link (n2-n3) to 10

$ns queue-limit $n2 $n3 10



#Give node position (for NAM)

$ns duplex-link-op $n0 $n2 orient right-down

$ns duplex-link-op $n1 $n2 orient right-up

$ns duplex-link-op $n2 $n3 orient right



#Monitor the queue for link (n2-n3). (for NAM)

$ns duplex-link-op $n2 $n3 queuePos 0.5



set lmsink [new Agent/LossMonitor]
$ns attach-agent $n3 $lmsink



#Setup a TCP connection

set tcp [new Agent/TCP]

$tcp set class_ 2

$ns attach-agent $n0 $tcp

set sink [new Agent/TCPSink]

$ns attach-agent $n3 $sink

$ns connect $tcp $sink

$tcp set fid_ 1



#Setup a FTP over TCP connection

set ftp [new Application/FTP]

$ftp attach-agent $tcp

$ftp set type_ FTP





#Setup a UDP connection

set udp [new Agent/UDP]

$ns attach-agent $n1 $udp

set null [new Agent/Null]

$ns attach-agent $n3 $null

$ns connect $udp $null

$udp set fid_ 2



#Setup a CBR over UDP connection

set cbr [new Application/Traffic/CBR]

$cbr attach-agent $udp

$cbr set type_ CBR

$cbr set packet_size_ 1000

$cbr set rate_ 1mb

$cbr set random_ false




#Schedule events for the CBR and FTP agents

$ns set 0.0 record
$ns at 0.1 $cbr start

$ns at 1.0 $ftp start

$ns at 4.0 $ftp stop

$ns at 4.5 $cbr stop


#Detach tcp and sink agents (not really necessary)
#$ns at 4.5 $ns detach-agent $n0 $tcp ; $ns detach-agent $n3 $sink



#Call the finish procedure after 5 seconds of simulation time

$ns at 5.0 finish



#Print CBR packet size and interval

puts CBR packet size = [$cbr set packet_size_]

puts CBR interval = [$cbr set interval_]



#Run the simulation

$ns run




[ns] LAN Nodes placement

2009-01-15 Thread Syed Faraz Hasan

Hi Everybody,

I am running the following code bu every time I run, nodes appear in different 
positions and overall visualization is very bad. How can I fix the positions of 
which node to appear where (while it is still part of LAN!). Also, I send data 
between two nodes, which goes to the main bus and is distributed to all nodes. 
How can I restrict the communication between two specific nodes only.

Please reply soon.

Faraz

set ns [new Simulator]

set tracefd [open topology.tr w]
$ns trace-all $tracefd

set nf [open out.nam w]
$ns namtrace-all $nf

proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam 
exit 0
}

set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]


$ns make-lan $n1 $n2 $n3 $n4 $n5 25Mb 200ms LL Queue/DropTail Mac/Csma/Cd


set udp0 [new Agent/UDP]
$ns attach-agent $n1 $udp0

set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 1000
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0

set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

$ns connect $udp0 $null0

$ns at 0.1 $cbr0 start
$ns at 4 $cbr0 stop
$ns at 4.1 finish


$ns run


[ns] LAN Nodes not being placed in order

2009-01-15 Thread Syed Faraz Hasan

Hi.

I am running the following code bu every time I run, nodes appear in different 
positions and overall visualization is very bad. How can I fix the positions of 
which node to appear where (while it is still part of LAN!). Also, I send data 
between two nodes, which goes to the main bus and is distributed to all nodes. 
How can I restrict the communication between two specific nodes only.

Please reply soon.

Faraz

set ns [new Simulator]

set tracefd [open topology.tr w]
$ns trace-all $tracefd

set nf [open out.nam w]
$ns namtrace-all $nf

proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam 
exit 0
}

set n1 [$ns node]
set n2 [$ns node]
set n3 [$ns node]
set n4 [$ns node]
set n5 [$ns node]


$ns make-lan $n1 $n2 $n3 $n4 $n5 25Mb 200ms LL Queue/DropTail Mac/Csma/Cd


set udp0 [new Agent/UDP]
$ns attach-agent $n1 $udp0

set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 1000
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0

set null0 [new Agent/Null]
$ns attach-agent $n3 $null0

$ns connect $udp0 $null0

$ns at 0.1 $cbr0 start
$ns at 4 $cbr0 stop
$ns at 4.1 finish


$ns run



[ns] Hand over problems...

2009-01-12 Thread Syed Faraz Hasan

Hello everybody,

I am trying to simulate a hand over. Following script shows two nodes (acting 
as AP) and a node moving within their vicinity. After a certain amount of 
simulation time, node 0 gets out of range of node 1 (AP) and stops sending 
packets. This is the point it needs to get associated with node 2 (another AP). 
I dont know how to do that can some one help?
In order to make it work, I have intentionally stopped the previous connection 
and started a new one (between node 0 and new AP). How can I make hand over 
take place on its own.

Please write back soon,
Faraz

 ==

# Define options

# ==

set val(chan)   Channel/WirelessChannel;# channel type

set val(prop)   Propagation/TwoRayGround   ;# radio-propagation model


set val(netif)  Phy/WirelessPhy;#

Phy/WirelessPhy set freq_ 2.472e9  ;# network interface type
Phy/WirelessPhy set CPThresh_ 10.0 ;# Collision Threshold
Phy/WirelessPhy set CSThresh_ 5.011872e-12 ;# Carrier Sense Threshold
Phy/WirelessPhy set RXThresh_ 5.82587e-09  ;# Receiver Threshold
Phy/WirelessPhy set bandwidth_ 11Mb;# BW


set val(mac)Mac/802_11 ;# MAC type
Mac/802_11 set dataRate_ 11Mb  ;# Data Rate
Mac/802_11 set basicRate_ 1Mb  ;# Control Frame Rate


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) 3  ;# number of mobilenodes

set val(rp) AODV   ;# routing protocol

set val(x)  200   ;# x-axis of grid
set val(y)  200   ;# y-asix of grid
set opt(energymodel)EnergyModel ;
set opt(radiomodel) RadioModel ;
set opt(initialenergy)  1000;# Initial energy in Joules
set num_ms_nodes10;
set opt(nn) 3;

# ==

# Main Program

# ==





#

# Initialize Global Variables

#



#start the simulator
set ns [new Simulator]

#open the trace file
set tracefile1 [open a.tr w]
$ns trace-all $tracefile1

#Open the NAM trace file

set nf [open out.nam w]

#$ns namtrace-all $nf

$ns namtrace-all-wireless $nf $val(x) $val(y)



#Define a 'finish' procedure

proc finish {} {

global ns nf

$ns flush-trace

#Close the NAM trace file

close $nf

#Execute NAM on the trace file

exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam

exit 0

}



#define the procedure finish
#proc finish {} {
#global ns tracefile1
#$ns flush-trace
#close $tracefile1
#exit 0
#}


# set up topography object

set topo   [new Topography]


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



# Create God General Operations Director



create-god [expr $opt(nn) + $num_ms_nodes]

# Create channel #1 and #2
set chan_1_ [new $val(chan)]



#

#  Create the specified number of mobilenodes [$val(nn)] and attach them

#  to the channel.

#  Here two nodes are created : node(0) and node(1)



# configure node



$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) \

 -topoInstance $topo \

 -agentTrace OFF \

 -routerTrace ON \

 -macTrace OFF \

 -movementTrace OFF\
 -channel $chan_1_


 #-energyModel $opt(energymodel) \
 -idlePower 1.0 \
 -rxPower 1.0 \
 -txPower 1.0 \
 -sleepPower 0.001 \
 -transitionPower 0.2 \
 -transitionTime 0.005 \
 -initialEnergy $opt(initialenergy)


for {set i 0} {$i  $val(nn) } {incr i} {
   set node_($i) [$ns node]
   $node_($i) random-motion 0   ;# disable random motion
   }



$node_(0) set X_ 0.001

$node_(0) set Y_ 75.0

#$node_(0) set Z_ 0.0


$node_(1) set X_ 25.0

$node_(1) set Y_ 125.0

#$node_(1) set Z_ 0.0

$node_(2) set X_ 150.0

$node_(2) set Y_ 125.0

#$node_(2) set Z_ 0.0

set udp0 [new Agent/UDP]
$ns 

[ns] How to set up mobile nodes?

2009-01-08 Thread Syed Faraz Hasan

Hi all,

I get an error which I have enclosed when I try setting up nodes in wireless 
scenarios. I have tried a lot of different things as suggested by other 
tutorials but get the same error everytime. When I delete the lines defining 
the nodes from the code, there are no error messages. Code that I am using is 
also enclosed.

Please help me out at this, I really need help quickly.

Faraz


Re: [ns] How to set up mobile nodes?

2009-01-08 Thread Syed Faraz Hasan

Thanks a lot Mubashir, heres the code

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 ;# 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) 20 ;# number of mobilenodes

set val(rp) DumbAgent  ;# routing protocol

set val(x)  50

set val(y)  50


Mac/802_11 set dataRate_ 11Mb

#Create a simulator object

set ns_ [new Simulator]


#Open the NAM trace file

set nf [open out.nam w]

$ns_ namtrace-all $nf



#Define a 'finish' procedure

proc finish {} {

global ns_ nf

$ns_ flush-trace

#Close the NAM trace file

close $nf

#Execute NAM on the trace file

exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam out.nam

exit 0

}



# set up topography object

set topo   [new Topography]

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



# Create God

create-god $val(nn)



# Create channel

set chan_1_ [new $val(chan)]



$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) \

-topoInstance $topo \

-agentTrace OFF \

-routerTrace OFF \

-macTrace ON \

-movementTrace OFF \

-channel $chan_1_

for {set i 0} {$i  $val(nn) } {incr i} {
set node_($i) [$ns_ node]
$node_($i) random-motion 0   ;# disable random motion
}



$ns_ at 0.1 finish


puts Starting...

$ns_ run

Regards,
Faraz

From: Mubashir Rehmani [mshrehm...@gmail.com]
Sent: Thursday, January 08, 2009 2:49 AM
To: Syed Faraz Hasan
Subject: Re: [ns] How to set up mobile nodes?

Hi Faraz

Can you please write the code in your email, because ns user mailing list drops 
all the attachments.

Regards

2009/1/8 Syed Faraz Hasan 
faraz_hasa...@email.ulster.ac.ukmailto:faraz_hasa...@email.ulster.ac.uk


Hi all,

I get an error which I have enclosed when I try setting up nodes in wireless 
scenarios. I have tried a lot of different things as suggested by other 
tutorials but get the same error everytime. When I delete the lines defining 
the nodes from the code, there are no error messages. Code that I am using is 
also enclosed.

Please help me out at this, I really need help quickly.

Faraz




--
Mubashir Husain Rehmani





[ns] NAM does not run wireless simulation over ns 2

2009-01-08 Thread Syed Faraz Hasan

Hello ALL,

I am trying to visualize the entire simulation using NAM. I open the .nam file 
in the finish procedure. I have associated CBR source with one of the nodes to 
make it send packets to another node. NAM executes properly at the beginning 
(but does not show nodes at all), as soon as the scheduled time of sending 
packets arrive NAM exits. Although it generates the trace file.

Please write back soon

Heres the 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) 3  ;# number of mobilenodes

set val(rp) AODV   ;# routing protocol

set val(x)  880   ;# x-axis of grid
set val(y)  880   ;# y-axis of grid
set opt(energymodel)EnergyModel ;
set opt(radiomodel) RadioModel ;
set opt(initialenergy)  1000;# Initial energy in Joules
set num_ms_nodes10;
set opt(nn) 2;

# ==

# Main Program

# ==





#

# Initialize Global Variables

#



#start the simulator
set ns [new Simulator]

#open the trace file
set tracefile1 [open a.tr w]
$ns trace-all $tracefile1

#Open NAM file
set nf [open attachment.nam w]
$ns namtrace-all $nf


#define the procedure finish
#proc finish {} {
#global ns tracefile1
#$ns flush-trace
#close $tracefile1
#exit 0
#}

proc finish {} {
global ns nf
$ns flush-trace
close $nf
exec /home/faraz/Desktop/ns-allinone-2.33/nam-1.13/nam attachment.nam 
exit 0
}


# set up topography object

set topo   [new Topography]


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



# Create God General Operations Director



create-god [expr $opt(nn) + $num_ms_nodes]

# Create channel #1 and #2
set chan_1_ [new $val(chan)]



#

#  Create the specified number of mobilenodes [$val(nn)] and attach them

#  to the channel.

#  Here two nodes are created : node(0) and node(1)



# configure node



$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) \

 -topoInstance $topo \

 -agentTrace OFF \

 -routerTrace ON \

 -macTrace OFF \

 -movementTrace OFF\
 -channel $chan_1_


 #-energyModel $opt(energymodel) \
 -idlePower 1.0 \
 -rxPower 1.0 \
 -txPower 1.0 \
 -sleepPower 0.001 \
 -transitionPower 0.2 \
 -transitionTime 0.005 \
 -initialEnergy $opt(initialenergy)


for {set i 0} {$i  $val(nn) } {incr i} {
   set node_($i) [$ns node]
   $node_($i) random-motion 0   ;# disable random motion
   }


set udp0 [new Agent/UDP]
$ns attach-agent $node_(0) $udp0

set cbr0 [new Application/Traffic/CBR]
$cbr0 set packetSize_ 1000
$cbr0 set interval_ 0.005
$cbr0 attach-agent $udp0

set null0 [new Agent/Null]
$ns attach-agent $node_(1) $null0

$ns connect $udp0 $null0

$ns at 1 $cbr0 start
$ns at 4 $cbr0 stop
$ns at 4.1 finish

puts Starting Simulation...
$ns run



[ns] LAN Layout help

2009-01-07 Thread Syed Faraz Hasan

Hi Everybody,

I enclose the NAM layout of a code given as under. I am trying to simulate a 
LAN with CSMA/MAC/CD. The resulting diagram of the LAN is not very clear. Is 
there any way to shape it up properly like a LAN. I know only the orient 
command use with setting duplex links but here the links between the nodes are 
already set up.
Also, I get a warning the CSMA/MAC/CD is now out of date, what does that mean?

Hope you will write back at the earliest.

Faraz


[ns] Looking for LAN example in NS2

2009-01-06 Thread Syed Faraz Hasan

Hello everyone,

I am looking for a simple LAN example in NS 2. I am following the isi tutorial 
but it seems to have given only the lan command structure. I am looking for a 
proper syntax to work out at LANs in NS2 environment.

Can some one help please?

Regards,
Faraz


[ns] Routing Protocols for Infrastructure mode

2008-12-19 Thread Syed Faraz Hasan

Hi everyone,

I am interested in implementing infrastructure mode on a wireless network. I am 
using http://www.isi.edu/nsnam/ns/doc/node173.html tutorial. It talks only 
about the adhoc protocols, can't I configure a mobile node with infrastructure 
routing protocols. I am not clear about the different between the protocols 
implemented in these two modes.
Also, can some one guide me to a basic mobile program. I am a beginner at ns-2 
and am loooking for a simple example to begin with mobility in ns2 simulations.

Thanks,
Faraz



[ns] Using NAM with NS2? couldnt execute nam?

2008-12-08 Thread Syed Faraz Hasan

Hi all,

I have used two sample programs for executing the traces on NAM using the 
ns2.33. All goes well until...

exec nam out.nam  command is executed, from the following FINISH function.

proc finish {} {
global ns nam_file
$ns flush-trace
close $nam_file
exec nam out.nam 
exit 0
}

The error message is
ns: finish: could not execute nam: no such file or directory
while executing
exec nam out.nam  (procedure FINISH line 5)
invoked from within
finish

I am using NAM 1.13, the nam executes without any problem when I type
%./nam
(on ns2 prompt)

I have no idea how to resolve this. Can some one help me please?

Faraz



[ns] Where can I find OTcl tutorials?

2008-12-03 Thread Syed Faraz Hasan

Hello!

Can anyone guide me to a good tutorial of OTcl please. I can play around a 
little with Tcl but in order to use NS2, I am trying to find some good tutorial 
on OTcl.
Hope to hear back soon.

Best Regards,
Faraz